Preparing report...

Report for github.com/go-daq/tdaq

A+    Excellent!    Found 31 issues across 46 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo73%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • tdaq/decoder.go
    • Line 27: warning: cyclomatic complexity 19 of function (*Decoder).Decode() is high (> 15) (gocyclo)
    • tdaq/rw_test.go
    • Line 16: warning: cyclomatic complexity 18 of function TestTranscoder() is high (> 15) (gocyclo)
    • tdaq/encoder.go
    • Line 30: warning: cyclomatic complexity 17 of function (*Encoder).Encode() is high (> 15) (gocyclo)
    • tdaq/runctl_test.go
    • Line 414: warning: cyclomatic complexity 25 of function TestRunControlWithMissingInput() is high (> 15) (gocyclo)
    • Line 262: warning: cyclomatic complexity 25 of function TestRunControlWithDuplicateOutput() is high (> 15) (gocyclo)
    • tdaq/runctl.go
    • Line 210: warning: cyclomatic complexity 24 of function (*RunControl).handleCtlConn() is high (> 15) (gocyclo)
    • tdaq/server.go
    • Line 289: warning: cyclomatic complexity 16 of function (*Server).handleCmd() is high (> 15) (gocyclo)

golint52%

Golint is a linter for Go source code.

    • tdaq/command.go
    • Line 21: warning: exported const CmdUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 73: warning: exported type Cmder should have comment or be unexported (golint)
    • Line 80: warning: exported type Cmd should have comment or be unexported (golint)
    • Line 96: warning: exported function SendCmd should have comment or be unexported (golint)
    • Line 112: warning: exported type JoinCmd should have comment or be unexported (golint)
    • Line 140: warning: exported method JoinCmd.CmdType should have comment or be unexported (golint)
    • Line 142: warning: exported method JoinCmd.MarshalTDAQ should have comment or be unexported (golint)
    • Line 166: warning: exported method JoinCmd.UnmarshalTDAQ should have comment or be unexported (golint)
    • Line 194: warning: exported type ConfigCmd should have comment or be unexported (golint)
    • Line 219: warning: exported method ConfigCmd.CmdType should have comment or be unexported (golint)
    • Line 221: warning: exported method ConfigCmd.MarshalTDAQ should have comment or be unexported (golint)
    • Line 242: warning: exported method ConfigCmd.UnmarshalTDAQ should have comment or be unexported (golint)
    • Line 267: warning: exported type StatusCmd should have comment or be unexported (golint)
    • Line 291: warning: exported method StatusCmd.CmdType should have comment or be unexported (golint)
    • Line 293: warning: exported method StatusCmd.MarshalTDAQ should have comment or be unexported (golint)
    • Line 301: warning: exported method StatusCmd.UnmarshalTDAQ should have comment or be unexported (golint)
    • tdaq/encoder.go
    • Line 27: warning: exported method Encoder.Err should have comment or be unexported (golint)
    • Line 78: warning: exported method Encoder.WriteBool should have comment or be unexported (golint)
    • Line 91: warning: exported method Encoder.WriteI8 should have comment or be unexported (golint)
    • Line 99: warning: exported method Encoder.WriteI16 should have comment or be unexported (golint)
    • Line 107: warning: exported method Encoder.WriteI32 should have comment or be unexported (golint)
    • Line 115: warning: exported method Encoder.WriteI64 should have comment or be unexported (golint)
    • Line 123: warning: exported method Encoder.WriteU8 should have comment or be unexported (golint)
    • Line 131: warning: exported method Encoder.WriteU16 should have comment or be unexported (golint)
    • Line 139: warning: exported method Encoder.WriteU32 should have comment or be unexported (golint)
    • Line 147: warning: exported method Encoder.WriteU64 should have comment or be unexported (golint)
    • Line 155: warning: exported method Encoder.WriteF32 should have comment or be unexported (golint)
    • Line 163: warning: exported method Encoder.WriteF64 should have comment or be unexported (golint)
    • Line 171: warning: exported method Encoder.WriteStr should have comment or be unexported (golint)
    • tdaq/runctl.go
    • Line 30: warning: exported type RunControl should have comment or be unexported (golint)
    • Line 53: warning: exported function NewRunControl should have comment or be unexported (golint)
    • Line 117: warning: exported method RunControl.Run should have comment or be unexported (golint)
    • tdaq/xdaq/scaler.go
    • Line 22: warning: exported method Scaler.OnConfig should have comment or be unexported (golint)
    • Line 27: warning: exported method Scaler.OnInit should have comment or be unexported (golint)
    • Line 38: warning: exported method Scaler.OnReset should have comment or be unexported (golint)
    • Line 46: warning: exported method Scaler.OnStart should have comment or be unexported (golint)
    • Line 51: warning: exported method Scaler.OnStop should have comment or be unexported (golint)
    • Line 58: warning: exported method Scaler.OnQuit should have comment or be unexported (golint)
    • Line 63: warning: exported method Scaler.Input should have comment or be unexported (golint)
    • Line 81: warning: exported method Scaler.Output should have comment or be unexported (golint)
    • tdaq/log/log.go
    • Line 26: warning: exported method Level.MsgString should have comment or be unexported (golint)
    • Line 72: warning: exported var Default should have comment or be unexported (golint)
    • tdaq/server.go
    • Line 27: warning: exported type Server should have comment or be unexported (golint)
    • Line 66: warning: exported function New should have comment or be unexported (golint)
    • Line 95: warning: exported method Server.CmdHandle should have comment or be unexported (golint)
    • Line 99: warning: exported method Server.InputHandle should have comment or be unexported (golint)
    • Line 103: warning: exported method Server.OutputHandle should have comment or be unexported (golint)
    • Line 107: warning: exported method Server.RunHandle should have comment or be unexported (golint)
    • Line 113: warning: exported method Server.Run should have comment or be unexported (golint)
    • tdaq/xdaq/i64dumper.go
    • Line 19: warning: exported method I64Dumper.OnConfig should have comment or be unexported (golint)
    • Line 24: warning: exported method I64Dumper.OnInit should have comment or be unexported (golint)
    • Line 31: warning: exported method I64Dumper.OnReset should have comment or be unexported (golint)
    • Line 37: warning: exported method I64Dumper.OnStart should have comment or be unexported (golint)
    • Line 42: warning: exported method I64Dumper.OnStop should have comment or be unexported (golint)
    • Line 49: warning: exported method I64Dumper.OnQuit should have comment or be unexported (golint)
    • Line 54: warning: exported method I64Dumper.Input should have comment or be unexported (golint)
    • tdaq/xdaq/i64gen.go
    • Line 24: warning: exported method I64Gen.OnConfig should have comment or be unexported (golint)
    • Line 29: warning: exported method I64Gen.OnInit should have comment or be unexported (golint)
    • Line 40: warning: exported method I64Gen.OnReset should have comment or be unexported (golint)
    • Line 48: warning: exported method I64Gen.OnStart should have comment or be unexported (golint)
    • Line 53: warning: exported method I64Gen.OnStop should have comment or be unexported (golint)
    • Line 60: warning: exported method I64Gen.OnQuit should have comment or be unexported (golint)
    • Line 65: warning: exported method I64Gen.Output should have comment or be unexported (golint)
    • Line 77: warning: exported method I64Gen.Loop should have comment or be unexported (golint)
    • tdaq/xdaq/splitter.go
    • Line 24: warning: exported method Splitter.OnConfig should have comment or be unexported (golint)
    • Line 29: warning: exported method Splitter.OnInit should have comment or be unexported (golint)
    • Line 41: warning: exported method Splitter.OnReset should have comment or be unexported (golint)
    • Line 50: warning: exported method Splitter.OnStart should have comment or be unexported (golint)
    • Line 55: warning: exported method Splitter.OnStop should have comment or be unexported (golint)
    • Line 62: warning: exported method Splitter.OnQuit should have comment or be unexported (golint)
    • Line 67: warning: exported method Splitter.Input should have comment or be unexported (golint)
    • Line 92: warning: exported method Splitter.Left should have comment or be unexported (golint)
    • Line 104: warning: exported method Splitter.Right should have comment or be unexported (golint)
    • tdaq/flags/flag.go
    • Line 21: warning: exported function New should have comment or be unexported (golint)
    • Line 49: warning: exported function NewRunControl should have comment or be unexported (golint)
    • tdaq/internal/iomux/iomux.go
    • Line 22: warning: exported function NewWriter should have comment or be unexported (golint)
    • Line 41: warning: exported method Writer.Close should have comment or be unexported (golint)
    • Line 55: warning: exported type Socket should have comment or be unexported (golint)
    • Line 68: warning: exported method Socket.Send should have comment or be unexported (golint)
    • Line 73: warning: exported method Socket.Recv should have comment or be unexported (golint)
    • tdaq/internal/dflow/dflow.go
    • Line 18: warning: exported type Graph should have comment or be unexported (golint)
    • Line 41: warning: exported function New should have comment or be unexported (golint)
    • Line 49: warning: exported method Graph.Has should have comment or be unexported (golint)
    • Line 54: warning: exported method Graph.Add should have comment or be unexported (golint)
    • Line 150: warning: exported method Graph.Analyze should have comment or be unexported (golint)
    • tdaq/decoder.go
    • Line 79: warning: exported method Decoder.Err should have comment or be unexported (golint)
    • Line 89: warning: exported method Decoder.ReadBool should have comment or be unexported (golint)
    • Line 94: warning: exported method Decoder.ReadI8 should have comment or be unexported (golint)
    • Line 99: warning: exported method Decoder.ReadI16 should have comment or be unexported (golint)
    • Line 104: warning: exported method Decoder.ReadI32 should have comment or be unexported (golint)
    • Line 109: warning: exported method Decoder.ReadI64 should have comment or be unexported (golint)
    • Line 114: warning: exported method Decoder.ReadU8 should have comment or be unexported (golint)
    • Line 119: warning: exported method Decoder.ReadU16 should have comment or be unexported (golint)
    • Line 124: warning: exported method Decoder.ReadU32 should have comment or be unexported (golint)
    • Line 129: warning: exported method Decoder.ReadU64 should have comment or be unexported (golint)
    • Line 134: warning: exported method Decoder.ReadF32 should have comment or be unexported (golint)
    • Line 139: warning: exported method Decoder.ReadF64 should have comment or be unexported (golint)
    • Line 144: warning: exported method Decoder.ReadStr should have comment or be unexported (golint)
    • tdaq/event.go
    • Line 7: warning: exported type Event should have comment or be unexported (golint)
    • tdaq/config/config.go
    • Line 5: warning: package comment should be of the form "Package config ..." (golint)
    • Line 40: warning: exported method RunCtl.Addr should have comment or be unexported (golint)
    • Line 44: warning: exported method Process.Addr should have comment or be unexported (golint)
    • tdaq/xdaq/i64adder.go
    • Line 23: warning: exported method I64Adder.OnConfig should have comment or be unexported (golint)
    • Line 28: warning: exported method I64Adder.OnInit should have comment or be unexported (golint)
    • Line 37: warning: exported method I64Adder.OnReset should have comment or be unexported (golint)
    • Line 46: warning: exported method I64Adder.OnStart should have comment or be unexported (golint)
    • Line 51: warning: exported method I64Adder.OnStop should have comment or be unexported (golint)
    • Line 58: warning: exported method I64Adder.OnQuit should have comment or be unexported (golint)
    • Line 63: warning: exported method I64Adder.Left should have comment or be unexported (golint)
    • Line 74: warning: exported method I64Adder.Right should have comment or be unexported (golint)
    • Line 85: warning: exported method I64Adder.Output should have comment or be unexported (golint)
    • tdaq/tdaq.go
    • Line 16: warning: exported type Context should have comment or be unexported (golint)
    • Line 21: warning: exported type Marshaler should have comment or be unexported (golint)
    • Line 25: warning: exported type Unmarshaler should have comment or be unexported (golint)
    • Line 29: warning: exported type Sender should have comment or be unexported (golint)
    • Line 33: warning: exported type Recver should have comment or be unexported (golint)
    • Line 62: warning: exported const FrameUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 96: warning: exported function SendMsg should have comment or be unexported (golint)
    • Line 104: warning: exported function SendFrame should have comment or be unexported (golint)
    • Line 122: warning: exported function RecvFrame should have comment or be unexported (golint)
    • Line 141: warning: exported type MsgFrame should have comment or be unexported (golint)
    • Line 147: warning: exported method MsgFrame.MarshalTDAQ should have comment or be unexported (golint)
    • Line 157: warning: exported method MsgFrame.UnmarshalTDAQ should have comment or be unexported (golint)
    • Line 165: warning: exported type EndPoint should have comment or be unexported (golint)
    • Line 171: warning: exported method EndPoint.MarshalTDAQ should have comment or be unexported (golint)
    • Line 181: warning: exported method EndPoint.UnmarshalTDAQ should have comment or be unexported (golint)
    • tdaq/iomgr.go
    • Line 22: warning: exported type RunHandler should have comment or be unexported (golint)
    • Line 23: warning: exported type CmdHandler should have comment or be unexported (golint)
    • Line 24: warning: exported type InputHandler should have comment or be unexported (golint)
    • Line 25: warning: exported type OutputHandler should have comment or be unexported (golint)
    • tdaq/zsockets.go
    • Line 14: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • tdaq/fsm/fsm.go
    • Line 15: warning: exported const UnConf should have comment (or a comment on this block) or be unexported (golint)
    • tdaq/xdaq/i64proc.go
    • Line 22: warning: exported method I64Processor.OnConfig should have comment or be unexported (golint)
    • Line 27: warning: exported method I64Processor.OnInit should have comment or be unexported (golint)
    • Line 35: warning: exported method I64Processor.OnReset should have comment or be unexported (golint)
    • Line 42: warning: exported method I64Processor.OnStart should have comment or be unexported (golint)
    • Line 47: warning: exported method I64Processor.OnStop should have comment or be unexported (golint)
    • Line 54: warning: exported method I64Processor.OnQuit should have comment or be unexported (golint)
    • Line 59: warning: exported method I64Processor.Input should have comment or be unexported (golint)
    • Line 71: warning: exported method I64Processor.Output should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell97%

Misspell Finds commonly misspelled English words