Preparing report...

Report for github.com/bio-routing/tflow2

A+    Excellent!    Found 14 issues across 54 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!


gocyclo87%

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.

    • tflow2/nfserver/nfserver.go
    • Line 184: warning: cyclomatic complexity 24 of function (*NetflowServer).processFlowSet() is high (> 15) (gocyclo)
    • Line 306: warning: cyclomatic complexity 19 of function generateFieldMap() is high (> 15) (gocyclo)
    • tflow2/database/breakdown.go
    • Line 201: warning: cyclomatic complexity 24 of function breakdown() is high (> 15) (gocyclo)
    • Line 101: warning: cyclomatic complexity 19 of function (*BreakdownFlags).Set() is high (> 15) (gocyclo)
    • Line 145: warning: cyclomatic complexity 17 of function (*BreakdownFlags).Count() is high (> 15) (gocyclo)
    • tflow2/ifserver/ifserver.go
    • Line 181: warning: cyclomatic complexity 20 of function (*IPFIXServer).processFlowSet() is high (> 15) (gocyclo)
    • Line 298: warning: cyclomatic complexity 18 of function generateFieldMap() is high (> 15) (gocyclo)

golint87%

Golint is a linter for Go source code.

    • tflow2/packet/ipv6.go
    • Line 20: warning: exported var SizeOfIPv6Header should have comment or be unexported (golint)
    • Line 23: warning: exported type IPv6Header should have comment or be unexported (golint)
    • Line 32: warning: exported function DecodeIPv6 should have comment or be unexported (golint)
    • tflow2/packet/tcp.go
    • Line 21: warning: exported const TCP should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported var SizeOfTCPHeader should have comment or be unexported (golint)
    • Line 28: warning: exported type TCPHeader should have comment or be unexported (golint)
    • Line 40: warning: exported function DecodeTCP should have comment or be unexported (golint)
    • tflow2/iana/protocols.go
    • Line 3: warning: exported type IANA should have comment or be unexported (golint)
    • Line 8: warning: exported function New should have comment or be unexported (golint)
    • Line 168: warning: exported method IANA.GetIPProtocolsByID should have comment or be unexported (golint)
    • Line 172: warning: exported method IANA.GetIPProtocolsByName should have comment or be unexported (golint)
    • tflow2/packet/ipv4.go
    • Line 20: warning: exported var SizeOfIPv4Header should have comment or be unexported (golint)
    • Line 23: warning: exported type IPv4Header should have comment or be unexported (golint)
    • Line 36: warning: exported function DecodeIPv4 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!