Preparing report...

Report for github.com/ipfs/ipfs-cluster

(v1.0.1)

A+    Excellent!    Found 27 issues across 163 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!


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.

    • api/add.go
    • Line 114: warning: cyclomatic complexity 18 of function AddParamsFromQuery() is high (> 15) (gocyclo)
    • ipfscluster_test.go
    • Line 1208: warning: cyclomatic complexity 24 of function TestClustersReplicationOverall() is high (> 15) (gocyclo)
    • Line 1869: warning: cyclomatic complexity 22 of function validateClusterGraph() is high (> 15) (gocyclo)
    • Line 645: warning: cyclomatic complexity 18 of function TestClustersPin() is high (> 15) (gocyclo)
    • Line 941: warning: cyclomatic complexity 17 of function TestClustersStatusAllWithErrors() is high (> 15) (gocyclo)
    • cluster.go
    • Line 764: warning: cyclomatic complexity 23 of function (*Cluster).Shutdown() is high (> 15) (gocyclo)
    • Line 1999: warning: cyclomatic complexity 16 of function (*Cluster).globalPinInfoStream() is high (> 15) (gocyclo)
    • api/ipfsproxy/ipfsproxy_test.go
    • Line 318: warning: cyclomatic complexity 18 of function TestIPFSProxyPinUpdate() is high (> 15) (gocyclo)
    • Line 420: warning: cyclomatic complexity 17 of function TestIPFSProxyPinLs() is high (> 15) (gocyclo)
    • api/types.go
    • Line 876: warning: cyclomatic complexity 21 of function (*PinOptions).FromQuery() is high (> 15) (gocyclo)
    • Line 768: warning: cyclomatic complexity 17 of function (PinOptions).Equals() is high (> 15) (gocyclo)
    • peer_manager_test.go
    • Line 407: warning: cyclomatic complexity 18 of function TestClustersPeerRemoveReallocsPins() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell95%

Misspell Finds commonly misspelled English words

    • api/types.go
    • Line 455: warning: "retuns" is a misspelling of "returns" (misspell)
    • Line 687: warning: "converst" is a misspelling of "converts" (misspell)
    • Line 1389: warning: "compatiblity" is a misspelling of "compatibility" (misspell)