Preparing report...

Report for github.com/assetcloud/chain

(v0.0.0-20220923023610-7b3224c32a7b)

A+    Excellent!    Found 57 issues across 614 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!


gofmt97%

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!


gocyclo92%

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.

    • types/tx.go
    • Line 179: warning: cyclomatic complexity 28 of function (*Transactions).CheckWithFork() is high (> 15) (gocyclo)
    • system/store/mavl/db/tree_test.go
    • Line 1347: warning: cyclomatic complexity 21 of function TestPruningFirstLevelNode() is high (> 15) (gocyclo)
    • Line 76: warning: cyclomatic complexity 17 of function TestBasic() is high (> 15) (gocyclo)
    • Line 418: warning: cyclomatic complexity 16 of function TestIAVLProof() is high (> 15) (gocyclo)
    • types/jsonpb/decode.go
    • Line 136: warning: cyclomatic complexity 68 of function (*Unmarshaler).unmarshalMessage() is high (> 15) (gocyclo)
    • Line 449: warning: cyclomatic complexity 20 of function (*Unmarshaler).unmarshalSingularValue() is high (> 15) (gocyclo)
    • types/fork.go
    • Line 217: warning: cyclomatic complexity 20 of function (*Chain33Config).initForkConfig() is high (> 15) (gocyclo)
    • util/util.go
    • Line 286: warning: cyclomatic complexity 33 of function PreExecBlock() is high (> 15) (gocyclo)
    • executor/executor.go
    • Line 380: warning: cyclomatic complexity 18 of function (*Executor).procExecAddBlock() is high (> 15) (gocyclo)
    • Line 459: warning: cyclomatic complexity 18 of function (*Executor).procExecDelBlock() is high (> 15) (gocyclo)
    • Line 298: warning: cyclomatic complexity 17 of function (*Executor).procExecTxList() is high (> 15) (gocyclo)
    • cmd/autotest/testflow/flow.go
    • Line 74: warning: cyclomatic complexity 16 of function (*TestOperator).HandleDependency() is high (> 15) (gocyclo)
    • Line 240: warning: cyclomatic complexity 16 of function (*TestOperator).RunCheckFlow() is high (> 15) (gocyclo)
    • blockchain/push.go
    • Line 363: warning: cyclomatic complexity 22 of function (*Push).addSubscriber() is high (> 15) (gocyclo)
    • Line 733: warning: cyclomatic complexity 20 of function (*Push).getEVMEvent() is high (> 15) (gocyclo)
    • Line 576: warning: cyclomatic complexity 20 of function (*Push).runTask() is high (> 15) (gocyclo)
    • system/store/mavl/db/node.go
    • Line 159: warning: cyclomatic complexity 21 of function (*Node).Hash() is high (> 15) (gocyclo)
    • Line 515: warning: cyclomatic complexity 16 of function (*Node).traverseInRange() is high (> 15) (gocyclo)
    • system/dapp/commands/stat.go
    • Line 213: warning: cyclomatic complexity 17 of function execBalance() is high (> 15) (gocyclo)
    • Line 57: warning: cyclomatic complexity 17 of function totalCoins() is high (> 15) (gocyclo)
    • blockchain/proc.go
    • Line 18: warning: cyclomatic complexity 43 of function (*BlockChain).ProcRecvMsg() is high (> 15) (gocyclo)
    • types/config.go
    • Line 215: warning: cyclomatic complexity 22 of function (*Chain33Config).chain33CfgInit() is high (> 15) (gocyclo)
    • types/jsonpb/encode.go
    • Line 134: warning: cyclomatic complexity 46 of function (*jsonWriter).marshalMessage() is high (> 15) (gocyclo)
    • Line 424: warning: cyclomatic complexity 18 of function (*jsonWriter).marshalValue() is high (> 15) (gocyclo)
    • Line 517: warning: cyclomatic complexity 18 of function (*jsonWriter).marshalSingularValue() is high (> 15) (gocyclo)
    • rpc/client/client.go
    • Line 100: warning: cyclomatic complexity 21 of function (*ChannelClient).ReWriteRawTx() is high (> 15) (gocyclo)
    • Line 214: warning: cyclomatic complexity 17 of function (*ChannelClient).CreateNoBalanceTxs() is high (> 15) (gocyclo)
    • blockchain/chain_test.go
    • Line 1048: warning: cyclomatic complexity 18 of function TestSetValueByKey() is high (> 15) (gocyclo)
    • Line 1206: warning: cyclomatic complexity 16 of function TestProcessDelBlock() is high (> 15) (gocyclo)
    • wallet/wallet_proc.go
    • Line 41: warning: cyclomatic complexity 26 of function (*Wallet).ProcSignRawTx() is high (> 15) (gocyclo)
    • Line 1401: warning: cyclomatic complexity 23 of function (*Wallet).createNewAccountByIndex() is high (> 15) (gocyclo)
    • Line 721: warning: cyclomatic complexity 22 of function (*Wallet).ProcMergeBalance() is high (> 15) (gocyclo)
    • Line 848: warning: cyclomatic complexity 20 of function (*Wallet).ProcWalletSetPasswd() is high (> 15) (gocyclo)
    • Line 276: warning: cyclomatic complexity 18 of function (*Wallet).ProcCreateNewAccount() is high (> 15) (gocyclo)
    • Line 573: warning: cyclomatic complexity 17 of function (*Wallet).ProcSendToAddress() is high (> 15) (gocyclo)
    • Line 481: warning: cyclomatic complexity 17 of function (*Wallet).procImportPrivKey() 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!