Preparing report...

Report for github.com/simplechain-org/go-simplechain

A    Great!    Found 297 issues across 1063 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!


golint0%

Golint is a linter for Go source code.

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


gocyclo84%

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.

    • go-simplechain/eth/api_tracer.go
    • Line 140: warning: cyclomatic complexity 41 of function (*PrivateDebugAPI).traceChain() is high (> 15) (gocyclo)
    • Line 526: warning: cyclomatic complexity 19 of function (*PrivateDebugAPI).standardTraceBlockToFile() is high (> 15) (gocyclo)
    • go-simplechain/console/console.go
    • Line 109: warning: cyclomatic complexity 27 of function (*Console).init() is high (> 15) (gocyclo)
    • Line 318: warning: cyclomatic complexity 19 of function (*Console).Interactive() is high (> 15) (gocyclo)
    • Line 394: warning: cyclomatic complexity 16 of function countIndents() is high (> 15) (gocyclo)
    • go-simplechain/core/tx_pool_test.go
    • Line 580: warning: cyclomatic complexity 28 of function TestTransactionPostponing() is high (> 15) (gocyclo)
    • Line 1114: warning: cyclomatic complexity 24 of function TestTransactionPoolRepricing() is high (> 15) (gocyclo)
    • Line 1297: warning: cyclomatic complexity 20 of function TestTransactionPoolUnderpricing() is high (> 15) (gocyclo)
    • Line 485: warning: cyclomatic complexity 19 of function TestTransactionDropping() is high (> 15) (gocyclo)
    • Line 1617: warning: cyclomatic complexity 19 of function testTransactionJournaling() is high (> 15) (gocyclo)
    • Line 1534: warning: cyclomatic complexity 17 of function TestTransactionReplacement() is high (> 15) (gocyclo)
    • Line 1468: warning: cyclomatic complexity 17 of function TestTransactionDeduplication() is high (> 15) (gocyclo)
    • go-simplechain/core/blockchain.go
    • Line 967: warning: cyclomatic complexity 55 of function (*BlockChain).InsertReceiptChain() is high (> 15) (gocyclo)
    • Line 1503: warning: cyclomatic complexity 49 of function (*BlockChain).insertChain() is high (> 15) (gocyclo)
    • Line 1908: warning: cyclomatic complexity 34 of function (*BlockChain).reorg() is high (> 15) (gocyclo)
    • Line 1291: warning: cyclomatic complexity 32 of function (*BlockChain).writeBlockWithState() is high (> 15) (gocyclo)
    • Line 188: warning: cyclomatic complexity 21 of function NewBlockChain() is high (> 15) (gocyclo)
    • Line 1788: warning: cyclomatic complexity 21 of function (*BlockChain).insertSideChain() is high (> 15) (gocyclo)
    • go-simplechain/internal/ethapi/api.go
    • Line 762: warning: cyclomatic complexity 26 of function DoCall() is high (> 15) (gocyclo)
    • Line 1379: warning: cyclomatic complexity 16 of function (*SendTxArgs).setDefaults() is high (> 15) (gocyclo)
    • Line 892: warning: cyclomatic complexity 16 of function DoEstimateGas() is high (> 15) (gocyclo)
    • go-simplechain/whisper/whisperv6/whisper_test.go
    • Line 262: warning: cyclomatic complexity 51 of function TestWhisperSymKeyManagement() is high (> 15) (gocyclo)
    • Line 144: warning: cyclomatic complexity 32 of function TestWhisperIdentityManagement() is high (> 15) (gocyclo)
    • Line 31: warning: cyclomatic complexity 21 of function TestWhisperBasic() is high (> 15) (gocyclo)
    • Line 832: warning: cyclomatic complexity 17 of function TestBloom() is high (> 15) (gocyclo)
    • Line 518: warning: cyclomatic complexity 16 of function TestCustomization() is high (> 15) (gocyclo)
    • go-simplechain/p2p/server.go
    • Line 645: warning: cyclomatic complexity 31 of function (*Server).run() is high (> 15) (gocyclo)
    • Line 534: warning: cyclomatic complexity 17 of function (*Server).setupDiscovery() is high (> 15) (gocyclo)
    • go-simplechain/consensus/dpos/dpos.go
    • Line 446: warning: cyclomatic complexity 23 of function (*DPoS).verifySeal() is high (> 15) (gocyclo)
    • Line 574: warning: cyclomatic complexity 20 of function (*DPoS).Finalize() is high (> 15) (gocyclo)
    • Line 351: warning: cyclomatic complexity 17 of function (*DPoS).snapshot() is high (> 15) (gocyclo)
    • go-simplechain/core/tx_pool.go
    • Line 1264: warning: cyclomatic complexity 21 of function (*TxPool).truncatePending() is high (> 15) (gocyclo)
    • Line 328: warning: cyclomatic complexity 17 of function (*TxPool).loop() is high (> 15) (gocyclo)
    • Line 582: warning: cyclomatic complexity 16 of function (*TxPool).add() is high (> 15) (gocyclo)
    • go-simplechain/miner/worker.go
    • Line 337: warning: cyclomatic complexity 30 of function (*worker).newWorkLoop() is high (> 15) (gocyclo)
    • Line 468: warning: cyclomatic complexity 28 of function (*worker).mainLoop() is high (> 15) (gocyclo)
    • Line 887: warning: cyclomatic complexity 21 of function (*worker).commitNewWork() is high (> 15) (gocyclo)
    • Line 780: warning: cyclomatic complexity 19 of function (*worker).commitTransactions() is high (> 15) (gocyclo)
    • go-simplechain/consensus/clique/clique.go
    • Line 244: warning: cyclomatic complexity 21 of function (*Clique).verifyHeader() is high (> 15) (gocyclo)
    • Line 344: warning: cyclomatic complexity 21 of function (*Clique).snapshot() is high (> 15) (gocyclo)
    • Line 581: warning: cyclomatic complexity 16 of function (*Clique).Seal() is high (> 15) (gocyclo)
    • go-simplechain/sub/api_tracer.go
    • Line 140: warning: cyclomatic complexity 41 of function (*PrivateDebugAPI).traceChain() is high (> 15) (gocyclo)
    • Line 526: warning: cyclomatic complexity 19 of function (*PrivateDebugAPI).standardTraceBlockToFile() is high (> 15) (gocyclo)
    • go-simplechain/trie/trie.go
    • Line 273: warning: cyclomatic complexity 25 of function (*Trie).delete() is high (> 15) (gocyclo)
    • Line 182: warning: cyclomatic complexity 19 of function (*Trie).insert() is high (> 15) (gocyclo)
    • go-simplechain/les/fetcher.go
    • Line 253: warning: cyclomatic complexity 24 of function (*lightFetcher).announce() is high (> 15) (gocyclo)
    • Line 138: warning: cyclomatic complexity 21 of function (*lightFetcher).syncLoop() is high (> 15) (gocyclo)
    • Line 627: warning: cyclomatic complexity 17 of function (*lightFetcher).checkAnnouncedHeaders() is high (> 15) (gocyclo)
    • go-simplechain/les/sync_test.go
    • Line 43: warning: cyclomatic complexity 18 of function testCheckpointSyncing() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 16 of function testMissOracleBackend() is high (> 15) (gocyclo)
    • go-simplechain/metrics/ewma_test.go
    • Line 155: warning: cyclomatic complexity 17 of function TestEWMA15() is high (> 15) (gocyclo)
    • Line 86: warning: cyclomatic complexity 17 of function TestEWMA5() is high (> 15) (gocyclo)
    • Line 17: warning: cyclomatic complexity 17 of function TestEWMA1() is high (> 15) (gocyclo)
    • go-simplechain/eth/downloader/downloader.go
    • Line 713: warning: cyclomatic complexity 45 of function (*Downloader).findAncestor() is high (> 15) (gocyclo)
    • Line 1197: warning: cyclomatic complexity 44 of function (*Downloader).fetchParts() is high (> 15) (gocyclo)
    • Line 1372: warning: cyclomatic complexity 42 of function (*Downloader).processHeaders() is high (> 15) (gocyclo)
    • Line 923: warning: cyclomatic complexity 35 of function (*Downloader).fetchHeaders() is high (> 15) (gocyclo)
    • Line 428: warning: cyclomatic complexity 24 of function (*Downloader).syncWithPeer() is high (> 15) (gocyclo)
    • Line 1587: warning: cyclomatic complexity 22 of function (*Downloader).processFastSyncContent() is high (> 15) (gocyclo)
    • Line 1971: warning: cyclomatic complexity 22 of function (*Downloader).fetchBoundedHeaders() is high (> 15) (gocyclo)
    • Line 351: warning: cyclomatic complexity 19 of function (*Downloader).synchronise() is high (> 15) (gocyclo)
    • go-simplechain/node/api.go
    • Line 146: warning: cyclomatic complexity 25 of function (*PrivateAdminAPI).StartRPC() is high (> 15) (gocyclo)
    • Line 264: warning: cyclomatic complexity 21 of function (*PrivateAdminAPI).StartWS() is high (> 15) (gocyclo)
    • go-simplechain/cmd/sipe/retesteth.go
    • Line 271: warning: cyclomatic complexity 17 of function (*RetestethAPI).SetChainParams() is high (> 15) (gocyclo)
    • Line 665: warning: cyclomatic complexity 16 of function (*RetestethAPI).StorageRangeAt() is high (> 15) (gocyclo)
    • go-simplechain/p2p/discv5/net.go
    • Line 354: warning: cyclomatic complexity 53 of function (*Network).loop() is high (> 15) (gocyclo)
    • Line 863: warning: cyclomatic complexity 28 of function init() is high (> 15) (gocyclo)
    • Line 1139: warning: cyclomatic complexity 18 of function (*Network).handleQueryEvent() is high (> 15) (gocyclo)
    • go-simplechain/les/api.go
    • Line 120: warning: cyclomatic complexity 18 of function (*PrivateLightServerAPI).setParams() is high (> 15) (gocyclo)
    • Line 211: warning: cyclomatic complexity 17 of function (*PrivateLightServerAPI).Benchmark() is high (> 15) (gocyclo)
    • go-simplechain/core/blockchain_test.go
    • Line 590: warning: cyclomatic complexity 28 of function TestFastVsFullChains() is high (> 15) (gocyclo)
    • Line 1719: warning: cyclomatic complexity 20 of function testInsertKnownChainData() is high (> 15) (gocyclo)
    • Line 983: warning: cyclomatic complexity 19 of function TestLogRebirth() is high (> 15) (gocyclo)
    • Line 818: warning: cyclomatic complexity 17 of function TestChainTxReorgs() is high (> 15) (gocyclo)
    • Line 376: warning: cyclomatic complexity 17 of function testReorg() is high (> 15) (gocyclo)
    • Line 707: warning: cyclomatic complexity 16 of function TestLightVsFastVsFullChainHeads() is high (> 15) (gocyclo)

ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


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!