Preparing report...

Report for github.com/vechain/thor

(v1.7.4)

A+    Excellent!    Found 56 issues across 342 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!


gofmt91%

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!


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.

    • packer/flow.go
    • Line 80: warning: cyclomatic complexity 16 of function (*Flow).Adopt() is high (> 15) (gocyclo)
    • cmd/thor/node/node.go
    • Line 287: warning: cyclomatic complexity 22 of function (*Node).processBlock() is high (> 15) (gocyclo)
    • Line 149: warning: cyclomatic complexity 20 of function (*Node).houseKeeping() is high (> 15) (gocyclo)
    • consensus/validator.go
    • Line 23: warning: cyclomatic complexity 18 of function (*Consensus).validate() is high (> 15) (gocyclo)
    • Line 251: warning: cyclomatic complexity 17 of function (*Consensus).verifyBlock() is high (> 15) (gocyclo)
    • state/state.go
    • Line 410: warning: cyclomatic complexity 24 of function (*State).Stage() is high (> 15) (gocyclo)
    • vm/evm.go
    • Line 428: warning: cyclomatic complexity 21 of function (*EVM).create() is high (> 15) (gocyclo)
    • logdb/logdb.go
    • Line 412: warning: cyclomatic complexity 19 of function (*Writer).Write() is high (> 15) (gocyclo)
    • comm/sync.go
    • Line 123: warning: cyclomatic complexity 17 of function findCommonAncestor() is high (> 15) (gocyclo)
    • txpool/tx_pool.go
    • Line 348: warning: cyclomatic complexity 25 of function (*TxPool).wash() is high (> 15) (gocyclo)
    • Line 207: warning: cyclomatic complexity 17 of function (*TxPool).add() is high (> 15) (gocyclo)
    • trie/trie.go
    • Line 310: warning: cyclomatic complexity 23 of function (*Trie).delete() is high (> 15) (gocyclo)
    • Line 217: warning: cyclomatic complexity 19 of function (*Trie).insert() is high (> 15) (gocyclo)
    • cmd/thor/sync_logdb.go
    • Line 157: warning: cyclomatic complexity 16 of function verifyLogDB() is high (> 15) (gocyclo)
    • Line 25: warning: cyclomatic complexity 16 of function syncLogDB() is high (> 15) (gocyclo)
    • Line 359: warning: cyclomatic complexity 16 of function pumpBlockAndReceipts() is high (> 15) (gocyclo)
    • cmd/thor/node/packer_loop.go
    • Line 24: warning: cyclomatic complexity 19 of function (*Node).packerLoop() is high (> 15) (gocyclo)
    • Line 109: warning: cyclomatic complexity 16 of function (*Node).pack() is high (> 15) (gocyclo)
    • p2psrv/discv5/net.go
    • Line 363: warning: cyclomatic complexity 54 of function (*Network).loop() is high (> 15) (gocyclo)
    • Line 873: warning: cyclomatic complexity 21 of function init() is high (> 15) (gocyclo)
    • Line 1152: warning: cyclomatic complexity 17 of function (*Network).handleQueryEvent() is high (> 15) (gocyclo)
    • poa/seed_test.go
    • Line 24: warning: cyclomatic complexity 27 of function TestSeeder_Generate() is high (> 15) (gocyclo)
    • comm/handle_rpc.go
    • Line 23: warning: cyclomatic complexity 34 of function (*Communicator).handleRPC() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!