Preparing report...

Report for github.com/okx/okbchain

(v0.0.0-20230307081841-2610e8962c95)

A+    Excellent!    Found 351 issues across 3177 files

Tweet

gofmt92%

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!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo96%

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.

    • libs/iavl/tree_delta.go
    • Line 575: warning: cyclomatic complexity 42 of function (*NodeJson).MarshalToAmino() is high (> 15) (gocyclo)
    • Line 712: warning: cyclomatic complexity 23 of function (*NodeJson).UnmarshalFromAmino() is high (> 15) (gocyclo)
    • Line 232: warning: cyclomatic complexity 20 of function (*TreeDelta).MarshalToAmino() is high (> 15) (gocyclo)
    • libs/tendermint/consensus/replay.go
    • Line 285: warning: cyclomatic complexity 22 of function (*Handshaker).ReplayBlocks() is high (> 15) (gocyclo)
    • Line 45: warning: cyclomatic complexity 16 of function (*State).readReplayMessage() is high (> 15) (gocyclo)
    • libs/tendermint/consensus/reactor.go
    • Line 336: warning: cyclomatic complexity 45 of function (*Reactor).Receive() is high (> 15) (gocyclo)
    • Line 905: warning: cyclomatic complexity 23 of function (*Reactor).gossipVotesForHeight() is high (> 15) (gocyclo)
    • Line 694: warning: cyclomatic complexity 18 of function (*Reactor).gossipDataRoutine() is high (> 15) (gocyclo)
    • Line 1014: warning: cyclomatic complexity 16 of function (*Reactor).queryMaj23Routine() is high (> 15) (gocyclo)
    • Line 834: warning: cyclomatic complexity 16 of function (*Reactor).gossipVotesRoutine() is high (> 15) (gocyclo)
    • Line 1388: warning: cyclomatic complexity 16 of function (*PeerState).getVoteBitArray() is high (> 15) (gocyclo)
    • x/evm/types/utils.go
    • Line 263: warning: cyclomatic complexity 38 of function MarshalEthLogToAmino() is high (> 15) (gocyclo)
    • Line 467: warning: cyclomatic complexity 27 of function (*ResultData).MarshalToAmino() is high (> 15) (gocyclo)
    • Line 164: warning: cyclomatic complexity 25 of function UnmarshalEthLogFromAmino() is high (> 15) (gocyclo)
    • Line 398: warning: cyclomatic complexity 17 of function (*ResultData).UnmarshalFromAmino() is high (> 15) (gocyclo)
    • libs/tendermint/types/deltas.go
    • Line 272: warning: cyclomatic complexity 24 of function (*DeltaPayload).UnmarshalFromAmino() is high (> 15) (gocyclo)
    • Line 129: warning: cyclomatic complexity 24 of function (*DeltasMessage).UnmarshalFromAmino() is high (> 15) (gocyclo)
    • x/evm/watcher/types.go
    • Line 189: warning: cyclomatic complexity 32 of function (*WatchData).MarshalToAmino() is high (> 15) (gocyclo)
    • Line 295: warning: cyclomatic complexity 18 of function (*WatchData).UnmarshalFromAmino() is high (> 15) (gocyclo)
    • libs/tendermint/p2p/conn/connection.go
    • Line 454: warning: cyclomatic complexity 20 of function (*MConnection).sendRoutine() is high (> 15) (gocyclo)
    • Line 1239: warning: cyclomatic complexity 18 of function unmarshalPacketFromAminoReader() is high (> 15) (gocyclo)
    • Line 594: warning: cyclomatic complexity 17 of function (*MConnection).recvRoutine() is high (> 15) (gocyclo)
    • app/rpc/namespaces/eth/api.go
    • Line 876: warning: cyclomatic complexity 25 of function (*PublicEthereumAPI).doCall() is high (> 15) (gocyclo)
    • Line 363: warning: cyclomatic complexity 20 of function (*PublicEthereumAPI).GetBalance() is high (> 15) (gocyclo)
    • x/staking/common_test.go
    • Line 674: warning: cyclomatic complexity 29 of function delegatorConstraintCheck() is high (> 15) (gocyclo)
    • Line 969: warning: cyclomatic complexity 18 of function queryDelegatorProxyCheck() is high (> 15) (gocyclo)
    • Line 894: warning: cyclomatic complexity 16 of function queryDelegatorCheck() is high (> 15) (gocyclo)
    • app/app_upgrade.go
    • Line 51: warning: cyclomatic complexity 19 of function (*OKBChainApp).CollectUpgradeModules() is high (> 15) (gocyclo)
    • libs/tendermint/state/indexer/block/kv/kv.go
    • Line 327: warning: cyclomatic complexity 27 of function (*BlockerIndexer).match() is high (> 15) (gocyclo)
    • Line 85: warning: cyclomatic complexity 24 of function (*BlockerIndexer).Search() is high (> 15) (gocyclo)
    • Line 219: warning: cyclomatic complexity 21 of function (*BlockerIndexer).matchRange() is high (> 15) (gocyclo)
    • app/rpc/namespaces/eth/api_multi.go
    • Line 30: warning: cyclomatic complexity 21 of function (*PublicEthereumAPI).GetBalanceBatch() is high (> 15) (gocyclo)
    • Line 193: warning: cyclomatic complexity 17 of function (*PublicEthereumAPI).GetTransactionReceiptsByBlock() is high (> 15) (gocyclo)
    • libs/tendermint/state/txindex/kv/kv.go
    • Line 191: warning: cyclomatic complexity 21 of function (*TxIndex).Search() is high (> 15) (gocyclo)
    • Line 523: warning: cyclomatic complexity 20 of function (*TxIndex).matchRange() is high (> 15) (gocyclo)
    • Line 425: warning: cyclomatic complexity 18 of function (*TxIndex).match() is high (> 15) (gocyclo)
    • libs/tendermint/abci/types/amino.go
    • Line 483: warning: cyclomatic complexity 20 of function (*ResponseDeliverTx).MarshalAminoTo() is high (> 15) (gocyclo)
    • Line 573: warning: cyclomatic complexity 19 of function (*ResponseDeliverTx).UnmarshalFromAmino() is high (> 15) (gocyclo)
    • libs/tendermint/mempool/reactor.go
    • Line 284: warning: cyclomatic complexity 23 of function (*Reactor).broadcastTxRoutine() is high (> 15) (gocyclo)
    • Line 518: warning: cyclomatic complexity 17 of function (*TxMessage).UnmarshalFromAmino() is high (> 15) (gocyclo)
    • x/distribution/distribution_suit_test.go
    • Line 1429: warning: cyclomatic complexity 21 of function (*DistributionSuite).TestUpgrade() is high (> 15) (gocyclo)
    • Line 1010: warning: cyclomatic complexity 19 of function (*DistributionSuite).TestWithdrawAllRewards() is high (> 15) (gocyclo)
    • Line 241: warning: cyclomatic complexity 17 of function (*DistributionSuite).TestDelegator() is high (> 15) (gocyclo)
    • libs/iavl/node.go
    • Line 584: warning: cyclomatic complexity 26 of function (*Node).traverseInRange() is high (> 15) (gocyclo)
    • Line 274: warning: cyclomatic complexity 16 of function (*Node).validate() is high (> 15) (gocyclo)
    • libs/iavl/basic_test.go
    • Line 15: warning: cyclomatic complexity 20 of function TestBasic() is high (> 15) (gocyclo)
    • Line 216: warning: cyclomatic complexity 17 of function TestIntegration() is high (> 15) (gocyclo)
    • libs/tendermint/libs/pubsub/query/query.go
    • Line 203: warning: cyclomatic complexity 36 of function (*Query).Matches() is high (> 15) (gocyclo)
    • Line 397: warning: cyclomatic complexity 30 of function matchValue() is high (> 15) (gocyclo)
    • Line 96: warning: cyclomatic complexity 20 of function (*Query).Conditions() 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!