Preparing report...

Report for github.com/c3systems/c3-go

A+    Excellent!    Found 31 issues across 156 files

Tweet

gofmt93%

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!


gocyclo90%

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.

    • c3-go/core/miner/service.go
    • Line 479: warning: cyclomatic complexity 24 of function (*Service).buildStateblocksAndDiffsFromStateAndTransactions() is high (> 15) (gocyclo)
    • Line 321: warning: cyclomatic complexity 16 of function (Service).buildNextStates() is high (> 15) (gocyclo)
    • c3-go/core/miner/util.go
    • Line 320: warning: cyclomatic complexity 66 of function VerifyStateBlocksFromMinedBlock() is high (> 15) (gocyclo)
    • Line 133: warning: cyclomatic complexity 31 of function VerifyMinedBlock() is high (> 15) (gocyclo)
    • Line 1092: warning: cyclomatic complexity 20 of function generateCombinedDiffs() is high (> 15) (gocyclo)
    • Line 691: warning: cyclomatic complexity 19 of function buildNextStateFromPrevState() is high (> 15) (gocyclo)
    • Line 1196: warning: cyclomatic complexity 16 of function VerifyMerkleTreeFromMinedBlock() is high (> 15) (gocyclo)
    • c3-go/core/miner/minedblock.go
    • Line 163: warning: cyclomatic complexity 27 of function BuildBlockFromCoder() is high (> 15) (gocyclo)
    • Line 78: warning: cyclomatic complexity 20 of function BuildCoderFromBlock() is high (> 15) (gocyclo)
    • c3-go/node/service.go
    • Line 93: warning: cyclomatic complexity 38 of function NewFullNode() is high (> 15) (gocyclo)
    • Line 652: warning: cyclomatic complexity 20 of function (*Service).handleReceiptOfMinedBlock() is high (> 15) (gocyclo)
    • Line 384: warning: cyclomatic complexity 19 of function (*Service).spawnMinerListener() is high (> 15) (gocyclo)
    • Line 815: warning: cyclomatic complexity 17 of function (*Service).setMinedBlockData() is high (> 15) (gocyclo)

golint98%

Golint is a linter for Go source code.

    • c3-go/common/base58/base58.go
    • Line 8: warning: comment on exported const BTCAlphabet should be of the form "BTCAlphabet ..." (golint)
    • Line 10: warning: exported const FlickrAlphabet should have comment or be unexported (golint)
    • Line 58: warning: comment on exported function EncodeAlphabet should be of the form "EncodeAlphabet ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words