Preparing report...

Report for github.com/utchain/go-utchain

A    Great!    Found 394 issues across 835 files

Tweet

gofmt84%

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!


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.

    • go-utchain/p2p/discv5/net.go
    • Line 364: warning: cyclomatic complexity 54 of function (*Network).loop() is high (> 15) (gocyclo)
    • Line 875: warning: cyclomatic complexity 28 of function init() is high (> 15) (gocyclo)
    • Line 1151: warning: cyclomatic complexity 18 of function (*Network).handleQueryEvent() is high (> 15) (gocyclo)
    • go-utchain/tststats/ethstats.go
    • Line 137: warning: cyclomatic complexity 31 of function (*Service).loop() is high (> 15) (gocyclo)
    • Line 280: warning: cyclomatic complexity 17 of function (*Service).readLoop() is high (> 15) (gocyclo)
    • go-utchain/core/blockchain.go
    • Line 1008: warning: cyclomatic complexity 31 of function (*BlockChain).insertChain() is high (> 15) (gocyclo)
    • Line 868: warning: cyclomatic complexity 30 of function (*BlockChain).WriteBlockWithState() is high (> 15) (gocyclo)
    • Line 1243: warning: cyclomatic complexity 23 of function (*BlockChain).reorg() is high (> 15) (gocyclo)
    • Line 761: warning: cyclomatic complexity 18 of function (*BlockChain).InsertReceiptChain() is high (> 15) (gocyclo)
    • go-utchain/core/blockchain_test.go
    • Line 568: warning: cyclomatic complexity 18 of function TestFastVsFullChains() is high (> 15) (gocyclo)
    • Line 1025: warning: cyclomatic complexity 17 of function TestEIP155Transition() is high (> 15) (gocyclo)
    • Line 736: warning: cyclomatic complexity 17 of function TestChainTxReorgs() is high (> 15) (gocyclo)
    • Line 354: warning: cyclomatic complexity 17 of function testReorg() is high (> 15) (gocyclo)
    • go-utchain/core/tx_pool_test.go
    • Line 1272: warning: cyclomatic complexity 19 of function TestTransactionPoolUnderpricing() is high (> 15) (gocyclo)
    • Line 1457: warning: cyclomatic complexity 19 of function testTransactionJournaling() is high (> 15) (gocyclo)
    • Line 462: warning: cyclomatic complexity 19 of function TestTransactionDropping() is high (> 15) (gocyclo)
    • Line 1110: warning: cyclomatic complexity 18 of function TestTransactionPoolRepricing() is high (> 15) (gocyclo)
    • Line 557: warning: cyclomatic complexity 18 of function TestTransactionPostponing() is high (> 15) (gocyclo)
    • Line 1374: warning: cyclomatic complexity 17 of function TestTransactionReplacement() is high (> 15) (gocyclo)
    • go-utchain/cmd/wnode/main.go
    • Line 174: warning: cyclomatic complexity 21 of function initialize() is high (> 15) (gocyclo)
    • Line 319: warning: cyclomatic complexity 20 of function configureNode() is high (> 15) (gocyclo)
    • go-utchain/trie/trie.go
    • Line 309: warning: cyclomatic complexity 25 of function (*Trie).delete() is high (> 15) (gocyclo)
    • Line 218: warning: cyclomatic complexity 19 of function (*Trie).insert() is high (> 15) (gocyclo)
    • go-utchain/les/handler.go
    • Line 337: warning: cyclomatic complexity 149 of function (*ProtocolManager).handleMsg() is high (> 15) (gocyclo)
    • Line 262: warning: cyclomatic complexity 17 of function (*ProtocolManager).handle() is high (> 15) (gocyclo)
    • go-utchain/swarm/api/filesystem.go
    • Line 49: warning: cyclomatic complexity 24 of function (*FileSystem).Upload() is high (> 15) (gocyclo)
    • Line 176: warning: cyclomatic complexity 19 of function (*FileSystem).Download() is high (> 15) (gocyclo)
    • go-utchain/whisper/whisperv5/api.go
    • Line 311: warning: cyclomatic complexity 26 of function (*PublicWhisperAPI).Messages() is high (> 15) (gocyclo)
    • Line 216: warning: cyclomatic complexity 18 of function (*PublicWhisperAPI).Post() is high (> 15) (gocyclo)
    • go-utchain/whisper/whisperv6/api.go
    • Line 330: warning: cyclomatic complexity 26 of function (*PublicWhisperAPI).Messages() is high (> 15) (gocyclo)
    • Line 235: warning: cyclomatic complexity 18 of function (*PublicWhisperAPI).Post() is high (> 15) (gocyclo)
    • go-utchain/whisper/whisperv6/filter_test.go
    • Line 639: warning: cyclomatic complexity 26 of function TestWatchers() is high (> 15) (gocyclo)
    • Line 288: warning: cyclomatic complexity 23 of function TestMatchEnvelope() is high (> 15) (gocyclo)
    • Line 431: warning: cyclomatic complexity 16 of function TestMatchMessageSym() is high (> 15) (gocyclo)
    • go-utchain/cmd/swarm/config.go
    • Line 230: warning: cyclomatic complexity 19 of function envVarsOverride() is high (> 15) (gocyclo)
    • Line 159: warning: cyclomatic complexity 19 of function cmdLineOverride() is high (> 15) (gocyclo)
    • go-utchain/p2p/server.go
    • Line 538: warning: cyclomatic complexity 30 of function (*Server).run() is high (> 15) (gocyclo)
    • Line 384: warning: cyclomatic complexity 26 of function (*Server).Start() is high (> 15) (gocyclo)
    • go-utchain/whisper/whisperv5/filter_test.go
    • Line 258: warning: cyclomatic complexity 26 of function TestMatchEnvelope() is high (> 15) (gocyclo)
    • Line 621: warning: cyclomatic complexity 26 of function TestWatchers() is high (> 15) (gocyclo)
    • Line 415: warning: cyclomatic complexity 16 of function TestMatchMessageSym() is high (> 15) (gocyclo)
    • go-utchain/cmd/faucet/faucet.go
    • Line 304: warning: cyclomatic complexity 46 of function (*faucet).apiHandler() is high (> 15) (gocyclo)
    • Line 527: warning: cyclomatic complexity 18 of function (*faucet).loop() is high (> 15) (gocyclo)
    • Line 94: warning: cyclomatic complexity 17 of function main() is high (> 15) (gocyclo)
    • go-utchain/swarm/storage/pyramid.go
    • Line 377: warning: cyclomatic complexity 19 of function (*PyramidChunker).prepareChunks() is high (> 15) (gocyclo)
    • Line 500: warning: cyclomatic complexity 18 of function (*PyramidChunker).buildTree() is high (> 15) (gocyclo)
    • go-utchain/core/tx_pool.go
    • Line 909: warning: cyclomatic complexity 41 of function (*TxPool).promoteExecutables() is high (> 15) (gocyclo)
    • Line 263: warning: cyclomatic complexity 18 of function (*TxPool).loop() is high (> 15) (gocyclo)
    • go-utchain/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 826: warning: cyclomatic complexity 17 of function TestBloom() is high (> 15) (gocyclo)
    • Line 512: warning: cyclomatic complexity 16 of function TestCustomization() is high (> 15) (gocyclo)
    • go-utchain/whisper/whisperv5/whisper_test.go
    • Line 272: warning: cyclomatic complexity 55 of function TestWhisperSymKeyManagement() is high (> 15) (gocyclo)
    • Line 154: warning: cyclomatic complexity 32 of function TestWhisperIdentityManagement() is high (> 15) (gocyclo)
    • Line 29: warning: cyclomatic complexity 24 of function TestWhisperBasic() is high (> 15) (gocyclo)
    • Line 534: warning: cyclomatic complexity 17 of function TestCustomization() is high (> 15) (gocyclo)
    • go-utchain/miner/worker.go
    • Line 389: warning: cyclomatic complexity 21 of function (*worker).commitNewWork() is high (> 15) (gocyclo)
    • Line 509: warning: cyclomatic complexity 16 of function (*Work).commitTransactions() is high (> 15) (gocyclo)
    • go-utchain/metrics/ewma_test.go
    • Line 152: warning: cyclomatic complexity 17 of function TestEWMA15() is high (> 15) (gocyclo)
    • Line 14: warning: cyclomatic complexity 17 of function TestEWMA1() is high (> 15) (gocyclo)
    • Line 83: warning: cyclomatic complexity 17 of function TestEWMA5() is high (> 15) (gocyclo)
    • go-utchain/tst/downloader/downloader.go
    • Line 585: warning: cyclomatic complexity 44 of function (*Downloader).findAncestor() is high (> 15) (gocyclo)
    • Line 990: warning: cyclomatic complexity 43 of function (*Downloader).fetchParts() is high (> 15) (gocyclo)
    • Line 1153: warning: cyclomatic complexity 40 of function (*Downloader).processHeaders() is high (> 15) (gocyclo)
    • Line 757: warning: cyclomatic complexity 27 of function (*Downloader).fetchHeaders() is high (> 15) (gocyclo)
    • Line 1355: warning: cyclomatic complexity 23 of function (*Downloader).processFastSyncContent() is high (> 15) (gocyclo)
    • go-utchain/cmd/swarm/manifest.go
    • Line 191: warning: cyclomatic complexity 16 of function updateEntryInManifest() is high (> 15) (gocyclo)
    • Line 267: warning: cyclomatic complexity 16 of function removeEntryFromManifest() is high (> 15) (gocyclo)
    • go-utchain/les/fetcher.go
    • Line 129: warning: cyclomatic complexity 23 of function (*lightFetcher).syncLoop() is high (> 15) (gocyclo)
    • Line 245: warning: cyclomatic complexity 20 of function (*lightFetcher).announce() is high (> 15) (gocyclo)
    • Line 394: warning: cyclomatic complexity 19 of function (*lightFetcher).nextRequest() is high (> 15) (gocyclo)
    • Line 551: warning: cyclomatic complexity 17 of function (*lightFetcher).checkAnnouncedHeaders() is high (> 15) (gocyclo)
    • go-utchain/console/console.go
    • Line 107: warning: cyclomatic complexity 27 of function (*Console).init() is high (> 15) (gocyclo)
    • Line 308: warning: cyclomatic complexity 19 of function (*Console).Interactive() is high (> 15) (gocyclo)
    • Line 384: warning: cyclomatic complexity 16 of function countIndents() 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!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!