Preparing report...

Report for github.com/dreadl0ck/netcap

A+    Excellent!    Found 62 issues across 512 files

Tweet

gofmt99%

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


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!


gocyclo91%

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.

    • netcap/reassembly/tcpcheck.go
    • Line 173: warning: cyclomatic complexity 36 of function (*TCPSimpleFSM).CheckState() is high (> 15) (gocyclo)
    • Line 57: warning: cyclomatic complexity 18 of function (*TCPOptionCheck).Accept() is high (> 15) (gocyclo)
    • netcap/decoder/stream/ssh/messages.go
    • Line 404: warning: cyclomatic complexity 35 of function Unmarshal() is high (> 15) (gocyclo)
    • Line 806: warning: cyclomatic complexity 30 of function decode() is high (> 15) (gocyclo)
    • Line 532: warning: cyclomatic complexity 23 of function marshalStruct() is high (> 15) (gocyclo)
    • netcap/label/suricata.go
    • Line 77: warning: cyclomatic complexity 27 of function Suricata() is high (> 15) (gocyclo)
    • Line 247: warning: cyclomatic complexity 24 of function parseSuricataFastLog() is high (> 15) (gocyclo)
    • netcap/reassembly/assembler.go
    • Line 318: warning: cyclomatic complexity 32 of function (*Assembler).checkOverlap() is high (> 15) (gocyclo)
    • Line 181: warning: cyclomatic complexity 28 of function (*Assembler).AssembleWithContext() is high (> 15) (gocyclo)

golint97%

Golint is a linter for Go source code.

    • netcap/decoder/packet/gopacketDecoder.go
    • Line 59: warning: exported method GoPacketDecoder.PostInitFunc should have comment or be unexported (golint)
    • Line 63: warning: exported method GoPacketDecoder.DeInitFunc should have comment or be unexported (golint)
    • Line 67: warning: exported method GoPacketDecoder.GetName should have comment or be unexported (golint)
    • Line 71: warning: exported method GoPacketDecoder.SetWriter should have comment or be unexported (golint)
    • Line 75: warning: exported method GoPacketDecoder.GetType should have comment or be unexported (golint)
    • Line 79: warning: exported method GoPacketDecoder.GetDescription should have comment or be unexported (golint)
    • Line 83: warning: exported method GoPacketDecoder.NumRecords should have comment or be unexported (golint)
    • Line 268: warning: receiver name cd should be consistent with previous receiver name dec for GoPacketDecoder (golint)
    • netcap/decoder/stream/ssh/messages.go
    • Line 38: warning: comment on exported type DisconnectMsg should be of the form "DisconnectMsg ..." (with optional leading article) (golint)
    • Line 53: warning: exported type KexInitMsg should have comment or be unexported (golint)
    • Line 74: warning: exported type KexDHInitMsg should have comment or be unexported (golint)
    • Line 80: warning: exported type KexECDHInitMsg should have comment or be unexported (golint)
    • Line 86: warning: exported type KexECDHReplyMsg should have comment or be unexported (golint)
    • Line 94: warning: exported type KexDHReplyMsg should have comment or be unexported (golint)
    • Line 103: warning: exported type KexDHGexGroupMsg should have comment or be unexported (golint)
    • Line 110: warning: exported type KexDHGexInitMsg should have comment or be unexported (golint)
    • Line 116: warning: exported type KexDHGexReplyMsg should have comment or be unexported (golint)
    • Line 124: warning: exported type KexDHGexRequestMsg should have comment or be unexported (golint)
    • Line 133: warning: exported type ServiceRequestMsg should have comment or be unexported (golint)
    • Line 140: warning: exported type ServiceAcceptMsg should have comment or be unexported (golint)
    • Line 147: warning: exported type UserAuthRequestMsg should have comment or be unexported (golint)
    • Line 154: warning: comment on exported type UserAuthSuccessMsg should be of the form "UserAuthSuccessMsg ..." (with optional leading article) (golint)
    • Line 161: warning: exported type UserAuthFailureMsg should have comment or be unexported (golint)
    • Line 172: warning: exported type UserAuthBannerMsg should have comment or be unexported (golint)
    • Line 184: warning: exported type UserAuthInfoRequestMsg should have comment or be unexported (golint)
    • Line 195: warning: exported type ChannelOpenMsg should have comment or be unexported (golint)
    • Line 208: warning: comment on exported type ChannelDataMsg should be of the form "ChannelDataMsg ..." (with optional leading article) (golint)
    • Line 218: warning: exported type ChannelOpenConfirmMsg should have comment or be unexported (golint)
    • Line 229: warning: exported type ChannelOpenFailureMsg should have comment or be unexported (golint)
    • Line 241: warning: exported const Prohibited should have comment (or a comment on this block) or be unexported (golint)
    • Line 264: warning: exported type ChannelRequestMsg should have comment or be unexported (golint)
    • Line 274: warning: exported type ChannelRequestSuccessMsg should have comment or be unexported (golint)
    • Line 281: warning: exported type ChannelRequestFailureMsg should have comment or be unexported (golint)
    • Line 288: warning: exported type ChannelCloseMsg should have comment or be unexported (golint)
    • Line 295: warning: exported type ChannelEOFMsg should have comment or be unexported (golint)
    • Line 302: warning: exported type GlobalRequestMsg should have comment or be unexported (golint)
    • Line 311: warning: exported type GlobalRequestSuccessMsg should have comment or be unexported (golint)
    • Line 318: warning: exported type GlobalRequestFailureMsg should have comment or be unexported (golint)
    • Line 325: warning: exported type WindowAdjustMsg should have comment or be unexported (golint)
    • Line 333: warning: exported type UserAuthPubKeyOkMsg should have comment or be unexported (golint)
    • Line 347: warning: exported type UserAuthGSSAPIToken should have comment or be unexported (golint)
    • Line 353: warning: exported type UserAuthGSSAPIMIC should have comment or be unexported (golint)
    • Line 360: warning: exported type UserAuthGSSAPIErrTok should have comment or be unexported (golint)
    • Line 367: warning: exported type UserAuthGSSAPIError should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell99%

Misspell Finds commonly misspelled English words