Preparing report...

Report for github.com/google/netstack

A+    Excellent!    Found 35 issues across 159 files

Tweet

gofmt97%

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!


gocyclo81%

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.

    • netstack/tcpip/transport/udp/endpoint.go
    • Line 457: warning: cyclomatic complexity 46 of function (*endpoint).SetSockOpt() is high (> 15) (gocyclo)
    • Line 334: warning: cyclomatic complexity 24 of function (*endpoint).write() is high (> 15) (gocyclo)
    • Line 685: warning: cyclomatic complexity 20 of function (*endpoint).GetSockOpt() is high (> 15) (gocyclo)
    • netstack/tcpip/transport/tcp/endpoint.go
    • Line 1215: warning: cyclomatic complexity 37 of function (*endpoint).SetSockOpt() is high (> 15) (gocyclo)
    • Line 1458: warning: cyclomatic complexity 32 of function (*endpoint).GetSockOpt() is high (> 15) (gocyclo)
    • Line 1675: warning: cyclomatic complexity 27 of function (*endpoint).connect() is high (> 15) (gocyclo)
    • Line 77: warning: cyclomatic complexity 17 of function (EndpointState).String() is high (> 15) (gocyclo)
    • Line 1133: warning: cyclomatic complexity 17 of function (*endpoint).SetSockOptInt() is high (> 15) (gocyclo)
    • netstack/tcpip/transport/tcp/snd.go
    • Line 1043: warning: cyclomatic complexity 28 of function (*sender).handleRcvdSegment() is high (> 15) (gocyclo)
    • Line 598: warning: cyclomatic complexity 22 of function (*sender).maybeSendSegment() is high (> 15) (gocyclo)
    • Line 791: warning: cyclomatic complexity 18 of function (*sender).sendData() is high (> 15) (gocyclo)
    • netstack/tcpip/stack/stack_test.go
    • Line 719: warning: cyclomatic complexity 24 of function TestEndpointExpiration() is high (> 15) (gocyclo)
    • Line 2056: warning: cyclomatic complexity 24 of function TestNewPEBOnPromotionToPermanent() is high (> 15) (gocyclo)
    • netstack/tcpip/transport/tcp/tcp_test.go
    • Line 3780: warning: cyclomatic complexity 43 of function TestConnectAvoidsBoundPorts() is high (> 15) (gocyclo)
    • Line 4341: warning: cyclomatic complexity 18 of function TestListenBacklogFull() is high (> 15) (gocyclo)
    • Line 4947: warning: cyclomatic complexity 17 of function TestEndpointBindListenAcceptState() is high (> 15) (gocyclo)
    • Line 3420: warning: cyclomatic complexity 16 of function TestReusePort() is high (> 15) (gocyclo)
    • netstack/tcpip/transport/tcp/rcv.go
    • Line 113: warning: cyclomatic complexity 18 of function (*receiver).consumeSegment() is high (> 15) (gocyclo)
    • Line 262: warning: cyclomatic complexity 16 of function (*receiver).handleRcvdSegmentClosing() is high (> 15) (gocyclo)
    • netstack/tcpip/stack/ndp_test.go
    • Line 593: warning: cyclomatic complexity 25 of function TestSetNDPConfigurations() is high (> 15) (gocyclo)
    • Line 233: warning: cyclomatic complexity 20 of function TestDADResolve() is high (> 15) (gocyclo)
    • Line 911: warning: cyclomatic complexity 18 of function TestRouterDiscovery() is high (> 15) (gocyclo)
    • Line 1228: warning: cyclomatic complexity 18 of function TestPrefixDiscovery() is high (> 15) (gocyclo)
    • netstack/tcpip/header/tcp.go
    • Line 318: warning: cyclomatic complexity 23 of function ParseSynOptions() is high (> 15) (gocyclo)
    • Line 399: warning: cyclomatic complexity 16 of function ParseTCPOptions() is high (> 15) (gocyclo)

golint96%

Golint is a linter for Go source code.


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell95%

Misspell Finds commonly misspelled English words