Preparing report...

Report for github.com/cybozu-go/coil

A+    Excellent!    Found 17 issues across 159 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!


gocyclo89%

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.

    • coil/v2/pkg/nodenet/pod.go
    • Line 177: warning: cyclomatic complexity 34 of function (*podNetwork).Setup() is high (> 15) (gocyclo)
    • Line 419: warning: cyclomatic complexity 20 of function (*podNetwork).List() is high (> 15) (gocyclo)
    • coil/v2/pkg/founat/fou_test.go
    • Line 19: warning: cyclomatic complexity 31 of function testFoUDual() is high (> 15) (gocyclo)
    • Line 141: warning: cyclomatic complexity 20 of function testFoUV4() is high (> 15) (gocyclo)
    • Line 222: warning: cyclomatic complexity 20 of function testFoUV6() is high (> 15) (gocyclo)
    • coil/v1/coild/ip.go
    • Line 65: warning: cyclomatic complexity 19 of function (*Server).handleNewIP() is high (> 15) (gocyclo)
    • Line 218: warning: cyclomatic complexity 19 of function (*Server).handleIPDelete() is high (> 15) (gocyclo)
    • coil/v2/pkg/ipam/allocator_test.go
    • Line 161: warning: cyclomatic complexity 20 of function testAllocatorDual() is high (> 15) (gocyclo)
    • Line 88: warning: cyclomatic complexity 20 of function testAllocatorV6() is high (> 15) (gocyclo)
    • Line 15: warning: cyclomatic complexity 20 of function testAllocatorV4() is high (> 15) (gocyclo)
    • coil/v2/pkg/founat/egress_test.go
    • Line 20: warning: cyclomatic complexity 29 of function testEgressDual() is high (> 15) (gocyclo)
    • Line 144: warning: cyclomatic complexity 20 of function testEgressV4() is high (> 15) (gocyclo)
    • Line 232: warning: cyclomatic complexity 20 of function testEgressV6() is high (> 15) (gocyclo)

golint98%

Golint is a linter for Go source code.

    • coil/v2/pkg/founat/client_test.go
    • Line 54: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 61: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 68: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 78: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 90: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 97: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 104: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 111: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • coil/v2/pkg/founat/egress_test.go
    • Line 70: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 85: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 189: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 285: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • coil/v2/pkg/founat/fou_test.go
    • Line 80: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 101: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 191: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 276: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (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!