Preparing report...

Report for github.com/vitelabs/go-vite

(v1.3.2)

An error occurred while generating the report.    Found 301 issues across 577 files

Tweet

gofmt91%

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!


gocyclo91%

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.

    • node/node.go
    • Line 359: warning: cyclomatic complexity 17 of function (*Node).startRPC() is high (> 15) (gocyclo)
    • trie/trie.go
    • Line 256: warning: cyclomatic complexity 20 of function (*Trie).setValue() is high (> 15) (gocyclo)
    • rpc/client.go
    • Line 519: warning: cyclomatic complexity 19 of function (*Client).dispatch() is high (> 15) (gocyclo)
    • rpc/server.go
    • Line 383: warning: cyclomatic complexity 17 of function (*Server).readRequest() is high (> 15) (gocyclo)
    • Line 259: warning: cyclomatic complexity 16 of function (*Server).handle() is high (> 15) (gocyclo)
    • onroad/taskprocessor.go
    • Line 79: warning: cyclomatic complexity 25 of function (*ContractTaskProcessor).processOneAddress() is high (> 15) (gocyclo)
    • rpcapi/api/tx.go
    • Line 67: warning: cyclomatic complexity 18 of function (Tx).SendTxWithPrivateKey() is high (> 15) (gocyclo)
    • trie/iterator.go
    • Line 38: warning: cyclomatic complexity 16 of function (*Iterator).Next() is high (> 15) (gocyclo)
    • metrics/ewma_test.go
    • Line 192: warning: cyclomatic complexity 17 of function TestEWMA15() is high (> 15) (gocyclo)
    • Line 54: warning: cyclomatic complexity 17 of function TestEWMA1() is high (> 15) (gocyclo)
    • Line 123: warning: cyclomatic complexity 17 of function TestEWMA5() is high (> 15) (gocyclo)
    • vm/vm_test.go
    • Line 411: warning: cyclomatic complexity 76 of function TestCalcQuotaV2() is high (> 15) (gocyclo)
    • Line 35: warning: cyclomatic complexity 40 of function TestVmRun() is high (> 15) (gocyclo)
    • Line 292: warning: cyclomatic complexity 28 of function TestCall() is high (> 15) (gocyclo)
    • Line 916: warning: cyclomatic complexity 25 of function TestVm() is high (> 15) (gocyclo)
    • Line 718: warning: cyclomatic complexity 21 of function TestCheckDepth() is high (> 15) (gocyclo)
    • vm/abi/type.go
    • Line 47: warning: cyclomatic complexity 21 of function NewType() is high (> 15) (gocyclo)
    • rpc/utils.go
    • Line 110: warning: cyclomatic complexity 19 of function suitableCallbacks() is high (> 15) (gocyclo)
    • rpcapi/apis.go
    • Line 17: warning: cyclomatic complexity 19 of function GetApi() is high (> 15) (gocyclo)
    • vm/contracts_test.go
    • Line 1386: warning: cyclomatic complexity 150 of function TestContractsMintageV2() is high (> 15) (gocyclo)
    • Line 697: warning: cyclomatic complexity 77 of function TestContractsPledge() is high (> 15) (gocyclo)
    • Line 202: warning: cyclomatic complexity 57 of function TestContractsRegister() is high (> 15) (gocyclo)
    • Line 522: warning: cyclomatic complexity 39 of function TestContractsVote() is high (> 15) (gocyclo)
    • Line 96: warning: cyclomatic complexity 29 of function TestContractsRefund() is high (> 15) (gocyclo)
    • Line 1278: warning: cyclomatic complexity 26 of function TestContractsMintage() is high (> 15) (gocyclo)
    • chain/snapshot_chain.go
    • Line 521: warning: cyclomatic complexity 21 of function (*chain).DeleteSnapshotBlocksToHeight() is high (> 15) (gocyclo)
    • Line 430: warning: cyclomatic complexity 17 of function (*chain).calculateNeedSnapshot() is high (> 15) (gocyclo)
    • generator/utils.go
    • Line 17: warning: cyclomatic complexity 22 of function GetFittestGeneratorSnapshotHash() is high (> 15) (gocyclo)
    • vm/vm.go
    • Line 403: warning: cyclomatic complexity 20 of function (*VM).receiveCall() is high (> 15) (gocyclo)
    • Line 158: warning: cyclomatic complexity 17 of function (*VM).Run() is high (> 15) (gocyclo)
    • vm/interpreter.go
    • Line 39: warning: cyclomatic complexity 17 of function (*Interpreter).Run() is high (> 15) (gocyclo)

golint0%

Golint is a linter for Go source code.

An error occurred while running this test (exit status 3)


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!