Preparing report...

Report for github.com/clanetcnc/go-clanetdiuma

(v0.0.0-20220818080137-e320ce21cc16)

A+    Excellent!    Found 192 issues across 841 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!


gofmt90%

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!


gocyclo85%

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 162: warning: cyclomatic complexity 17 of function (*Node).Start() is high (> 15) (gocyclo)
    • core/vm/evm.go
    • Line 377: warning: cyclomatic complexity 24 of function (*EVM).create() is high (> 15) (gocyclo)
    • Line 186: warning: cyclomatic complexity 16 of function (*EVM).Call() is high (> 15) (gocyclo)
    • dashboard/log.go
    • Line 134: warning: cyclomatic complexity 26 of function (*Dashboard).streamLogs() is high (> 15) (gocyclo)
    • Line 59: warning: cyclomatic complexity 21 of function (*Dashboard).handleLogRequest() is high (> 15) (gocyclo)
    • p2p/discv5/net.go
    • Line 363: warning: cyclomatic complexity 54 of function (*Network).loop() is high (> 15) (gocyclo)
    • Line 872: warning: cyclomatic complexity 21 of function init() is high (> 15) (gocyclo)
    • Line 1148: warning: cyclomatic complexity 17 of function (*Network).handleQueryEvent() is high (> 15) (gocyclo)
    • p2p/simulations/network_test.go
    • Line 37: warning: cyclomatic complexity 48 of function TestSnapshot() is high (> 15) (gocyclo)
    • Line 285: warning: cyclomatic complexity 19 of function TestNetworkSimulation() is high (> 15) (gocyclo)
    • dashboard/peers.go
    • Line 371: warning: cyclomatic complexity 22 of function (*Dashboard).collectPeerData() is high (> 15) (gocyclo)
    • rlp/decode.go
    • Line 209: warning: cyclomatic complexity 16 of function makeDecoder() is high (> 15) (gocyclo)
    • console/bridge.go
    • Line 90: warning: cyclomatic complexity 21 of function (*bridge).OpenWallet() is high (> 15) (gocyclo)
    • les/sync.go
    • Line 119: warning: cyclomatic complexity 21 of function (*ProtocolManager).synchronise() is high (> 15) (gocyclo)
    • eth/filters/filter_system.go
    • Line 320: warning: cyclomatic complexity 23 of function (*EventSystem).broadcast() is high (> 15) (gocyclo)
    • Line 448: warning: cyclomatic complexity 17 of function (*EventSystem).eventLoop() is high (> 15) (gocyclo)
    • signer/core/signed_data.go
    • Line 854: warning: cyclomatic complexity 99 of function isPrimitiveTypeValid() is high (> 15) (gocyclo)
    • Line 538: warning: cyclomatic complexity 19 of function (*TypedData).EncodePrimitiveValue() is high (> 15) (gocyclo)
    • 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)
    • core/tx_pool_test.go
    • Line 556: warning: cyclomatic complexity 28 of function TestTransactionPostponing() is high (> 15) (gocyclo)
    • Line 1088: warning: cyclomatic complexity 24 of function TestTransactionPoolRepricing() is high (> 15) (gocyclo)
    • Line 1271: warning: cyclomatic complexity 20 of function TestTransactionPoolUnderpricing() is high (> 15) (gocyclo)
    • Line 1526: warning: cyclomatic complexity 19 of function testTransactionJournaling() is high (> 15) (gocyclo)
    • Line 461: warning: cyclomatic complexity 19 of function TestTransactionDropping() is high (> 15) (gocyclo)
    • Line 1443: warning: cyclomatic complexity 17 of function TestTransactionReplacement() is high (> 15) (gocyclo)
    • 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)
    • cmd/puppeth/wizard_netstats.go
    • Line 201: warning: cyclomatic complexity 28 of function (serverStats).render() is high (> 15) (gocyclo)
    • Line 73: warning: cyclomatic complexity 23 of function (*wizard).gatherStats() is high (> 15) (gocyclo)
    • eth/filters/api.go
    • Line 460: warning: cyclomatic complexity 24 of function (*FilterCriteria).UnmarshalJSON() is high (> 15) (gocyclo)
    • les/distributor.go
    • Line 183: warning: cyclomatic complexity 18 of function (*requestDistributor).nextRequest() is high (> 15) (gocyclo)
    • p2p/server.go
    • Line 619: warning: cyclomatic complexity 30 of function (*Server).run() is high (> 15) (gocyclo)
    • core/bloombits/matcher.go
    • Line 260: warning: cyclomatic complexity 30 of function (*Matcher).subMatch() is high (> 15) (gocyclo)
    • Line 382: warning: cyclomatic complexity 24 of function (*Matcher).distributor() is high (> 15) (gocyclo)
    • accounts/scwallet/wallet.go
    • Line 440: warning: cyclomatic complexity 25 of function (*Wallet).selfDerive() is high (> 15) (gocyclo)
    • Line 338: warning: cyclomatic complexity 16 of function (*Wallet).Open() is high (> 15) (gocyclo)
    • les/handler.go
    • Line 336: warning: cyclomatic complexity 171 of function (*ProtocolManager).handleMsg() is high (> 15) (gocyclo)
    • Line 262: warning: cyclomatic complexity 16 of function (*ProtocolManager).handle() is high (> 15) (gocyclo)
    • cmd/gcnc/retesteth.go
    • Line 274: warning: cyclomatic complexity 24 of function (*RetestethAPI).SetChainParams() is high (> 15) (gocyclo)
    • Line 446: warning: cyclomatic complexity 19 of function (*RetestethAPI).mineBlock() is high (> 15) (gocyclo)
    • Line 717: warning: cyclomatic complexity 16 of function (*RetestethAPI).StorageRangeAt() is high (> 15) (gocyclo)
    • core/blockchain.go
    • Line 938: warning: cyclomatic complexity 55 of function (*BlockChain).InsertReceiptChain() is high (> 15) (gocyclo)
    • Line 1447: warning: cyclomatic complexity 46 of function (*BlockChain).insertChain() is high (> 15) (gocyclo)
    • Line 1256: warning: cyclomatic complexity 27 of function (*BlockChain).writeBlockWithState() is high (> 15) (gocyclo)
    • Line 1844: warning: cyclomatic complexity 27 of function (*BlockChain).reorg() is high (> 15) (gocyclo)
    • Line 1729: warning: cyclomatic complexity 21 of function (*BlockChain).insertSideChain() is high (> 15) (gocyclo)
    • Line 180: warning: cyclomatic complexity 21 of function NewBlockChain() is high (> 15) (gocyclo)
    • eth/api_tracer.go
    • Line 140: warning: cyclomatic complexity 38 of function (*PrivateDebugAPI).traceChain() is high (> 15) (gocyclo)
    • Line 526: warning: cyclomatic complexity 19 of function (*PrivateDebugAPI).standardTraceBlockToFile() is high (> 15) (gocyclo)
    • core/genesis.go
    • Line 153: warning: cyclomatic complexity 17 of function SetupGenesisBlock() is high (> 15) (gocyclo)
    • core/blockchain_test.go
    • Line 589: warning: cyclomatic complexity 28 of function TestFastVsFullChains() is high (> 15) (gocyclo)
    • Line 978: warning: cyclomatic complexity 24 of function TestLogRebirth() is high (> 15) (gocyclo)
    • Line 1882: warning: cyclomatic complexity 22 of function testInsertKnownChainData() is high (> 15) (gocyclo)
    • Line 375: warning: cyclomatic complexity 17 of function testReorg() is high (> 15) (gocyclo)
    • Line 817: warning: cyclomatic complexity 17 of function TestChainTxReorgs() is high (> 15) (gocyclo)
    • Line 1312: warning: cyclomatic complexity 17 of function TestEIP155Transition() is high (> 15) (gocyclo)
    • Line 706: warning: cyclomatic complexity 16 of function TestLightVsFastVsFullChainHeads() is high (> 15) (gocyclo)
    • p2p/dial.go
    • Line 153: warning: cyclomatic complexity 27 of function (*dialstate).newTasks() is high (> 15) (gocyclo)
    • 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 628: warning: cyclomatic complexity 17 of function (*lightFetcher).checkAnnouncedHeaders() is high (> 15) (gocyclo)
    • core/dao_test.go
    • Line 31: warning: cyclomatic complexity 22 of function TestDAOForkRangeExtradata() is high (> 15) (gocyclo)
    • les/sync_test.go
    • Line 46: warning: cyclomatic complexity 18 of function testCheckpointSyncing() is high (> 15) (gocyclo)
    • les/serverpool.go
    • Line 280: warning: cyclomatic complexity 35 of function (*serverPool).eventLoop() is high (> 15) (gocyclo)
    • consensus/clique/clique.go
    • Line 245: warning: cyclomatic complexity 22 of function (*Clique).verifyHeader() is high (> 15) (gocyclo)
    • Line 348: warning: cyclomatic complexity 21 of function (*Clique).snapshot() is high (> 15) (gocyclo)
    • consensus/ethash/sealer.go
    • Line 190: warning: cyclomatic complexity 27 of function (*Ethash).remote() is high (> 15) (gocyclo)
    • Line 51: warning: cyclomatic complexity 16 of function (*Ethash).Seal() is high (> 15) (gocyclo)
    • les/api_test.go
    • Line 81: warning: cyclomatic complexity 44 of function testCapacityAPI() is high (> 15) (gocyclo)
    • p2p/simulations/http_test.go
    • Line 602: warning: cyclomatic complexity 33 of function TestHTTPSnapshot() is high (> 15) (gocyclo)
    • Line 483: warning: cyclomatic complexity 16 of function (*expectEvents).expect() is high (> 15) (gocyclo)
    • les/peer.go
    • Line 546: warning: cyclomatic complexity 36 of function (*peer).Handshake() is high (> 15) (gocyclo)
    • eth/downloader/queue.go
    • Line 803: warning: cyclomatic complexity 16 of function (*queue).deliver() is high (> 15) (gocyclo)
    • Line 682: warning: cyclomatic complexity 16 of function (*queue).DeliverHeaders() is high (> 15) (gocyclo)
    • 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 833: warning: cyclomatic complexity 17 of function TestBloom() is high (> 15) (gocyclo)
    • Line 519: warning: cyclomatic complexity 16 of function TestCustomization() is high (> 15) (gocyclo)
    • cmd/utils/flags.go
    • Line 1398: warning: cyclomatic complexity 31 of function SetEthConfig() is high (> 15) (gocyclo)
    • Line 1080: warning: cyclomatic complexity 25 of function SetP2PConfig() is high (> 15) (gocyclo)
    • cmd/wnode/main.go
    • Line 174: warning: cyclomatic complexity 24 of function initialize() is high (> 15) (gocyclo)
    • Line 324: warning: cyclomatic complexity 20 of function configureNode() is high (> 15) (gocyclo)
    • metrics/ewma_test.go
    • Line 83: warning: cyclomatic complexity 17 of function TestEWMA5() is high (> 15) (gocyclo)
    • 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)
    • eth/downloader/downloader.go
    • Line 701: warning: cyclomatic complexity 42 of function (*Downloader).findAncestor() is high (> 15) (gocyclo)
    • Line 1185: warning: cyclomatic complexity 40 of function (*Downloader).fetchParts() is high (> 15) (gocyclo)
    • Line 1359: warning: cyclomatic complexity 39 of function (*Downloader).processHeaders() is high (> 15) (gocyclo)
    • Line 911: warning: cyclomatic complexity 35 of function (*Downloader).fetchHeaders() is high (> 15) (gocyclo)
    • Line 1574: warning: cyclomatic complexity 24 of function (*Downloader).processFastSyncContent() is high (> 15) (gocyclo)
    • Line 416: warning: cyclomatic complexity 24 of function (*Downloader).syncWithPeer() is high (> 15) (gocyclo)
    • accounts/abi/bind/topics.go
    • Line 32: warning: cyclomatic complexity 20 of function makeTopics() is high (> 15) (gocyclo)
    • Line 113: warning: cyclomatic complexity 18 of function parseTopics() is high (> 15) (gocyclo)
    • cmd/faucet/faucet.go
    • Line 311: warning: cyclomatic complexity 47 of function (*faucet).apiHandler() is high (> 15) (gocyclo)
    • Line 96: warning: cyclomatic complexity 17 of function main() is high (> 15) (gocyclo)
    • internal/ethapi/api.go
    • Line 1281: warning: cyclomatic complexity 16 of function (*SendTxArgs).setDefaults() is high (> 15) (gocyclo)
    • Line 729: warning: cyclomatic complexity 16 of function DoCall() is high (> 15) (gocyclo)
    • eth/handler.go
    • Line 365: warning: cyclomatic complexity 98 of function (*ProtocolManager).handleMsg() is high (> 15) (gocyclo)
    • whisper/whisperv6/api.go
    • Line 337: warning: cyclomatic complexity 26 of function (*PublicWhisperAPI).Messages() is high (> 15) (gocyclo)
    • Line 232: warning: cyclomatic complexity 20 of function (*PublicWhisperAPI).Post() is high (> 15) (gocyclo)
    • log/format.go
    • Line 365: warning: cyclomatic complexity 18 of function escapeString() is high (> 15) (gocyclo)
    • miner/worker.go
    • Line 832: warning: cyclomatic complexity 29 of function (*worker).commitNewWork() is high (> 15) (gocyclo)
    • Line 400: warning: cyclomatic complexity 28 of function (*worker).mainLoop() is high (> 15) (gocyclo)
    • Line 288: warning: cyclomatic complexity 22 of function (*worker).newWorkLoop() is high (> 15) (gocyclo)
    • Line 718: warning: cyclomatic complexity 20 of function (*worker).commitTransactions() is high (> 15) (gocyclo)
    • trie/trie.go
    • Line 273: warning: cyclomatic complexity 23 of function (*Trie).delete() is high (> 15) (gocyclo)
    • Line 182: warning: cyclomatic complexity 18 of function (*Trie).insert() is high (> 15) (gocyclo)
    • rlp/encode.go
    • Line 347: warning: cyclomatic complexity 19 of function makeWriter() is high (> 15) (gocyclo)
    • core/tx_pool.go
    • Line 1193: warning: cyclomatic complexity 23 of function (*TxPool).truncatePending() is high (> 15) (gocyclo)
    • Line 306: warning: cyclomatic complexity 17 of function (*TxPool).loop() is high (> 15) (gocyclo)
    • Line 560: warning: cyclomatic complexity 16 of function (*TxPool).add() is high (> 15) (gocyclo)
    • les/retrieve.go
    • Line 310: warning: cyclomatic complexity 16 of function (*sentReq).tryRequest() 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!