Preparing report...

Report for github.com/moby/swarmkit

(v1.12.0)

A+    Excellent!    Found 36 issues across 219 files

Tweet

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!


gofmt99%

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


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo86%

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.

    • manager/allocator/network.go
    • Line 70: warning: cyclomatic complexity 38 of function (*Allocator).doNetworkInit() is high (> 15) (gocyclo)
    • Line 280: warning: cyclomatic complexity 18 of function (*Allocator).doNetworkAlloc() is high (> 15) (gocyclo)
    • agent/task.go
    • Line 67: warning: cyclomatic complexity 32 of function (*taskManager).run() is high (> 15) (gocyclo)
    • manager/dispatcher/dispatcher.go
    • Line 509: warning: cyclomatic complexity 26 of function (*Dispatcher).Tasks() is high (> 15) (gocyclo)
    • Line 665: warning: cyclomatic complexity 23 of function (*Dispatcher).Session() is high (> 15) (gocyclo)
    • Line 153: warning: cyclomatic complexity 19 of function (*Dispatcher).Run() is high (> 15) (gocyclo)
    • manager/controlapi/node.go
    • Line 75: warning: cyclomatic complexity 31 of function (*Server).ListNodes() is high (> 15) (gocyclo)
    • Line 193: warning: cyclomatic complexity 17 of function (*Server).UpdateNode() is high (> 15) (gocyclo)
    • manager/state/raft/raft.go
    • Line 327: warning: cyclomatic complexity 29 of function (*Node).Run() is high (> 15) (gocyclo)
    • Line 500: warning: cyclomatic complexity 16 of function (*Node).Join() is high (> 15) (gocyclo)
    • agent/agent.go
    • Line 131: warning: cyclomatic complexity 19 of function (*Agent).run() is high (> 15) (gocyclo)
    • Line 227: warning: cyclomatic complexity 16 of function (*Agent).handleSessionMessage() is high (> 15) (gocyclo)
    • manager/orchestrator/restart.go
    • Line 93: warning: cyclomatic complexity 16 of function (*RestartSupervisor).Restart() is high (> 15) (gocyclo)
    • Line 172: warning: cyclomatic complexity 16 of function (*RestartSupervisor).shouldRestart() is high (> 15) (gocyclo)
    • agent/node.go
    • Line 162: warning: cyclomatic complexity 32 of function (*Node).run() is high (> 15) (gocyclo)
    • ca/config.go
    • Line 188: warning: cyclomatic complexity 17 of function LoadOrCreateSecurityConfig() is high (> 15) (gocyclo)
    • manager/manager.go
    • Line 235: warning: cyclomatic complexity 28 of function (*Manager).Run() is high (> 15) (gocyclo)
    • Line 112: warning: cyclomatic complexity 19 of function New() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell96%

Misspell Finds commonly misspelled English words