Preparing report...

Report for github.com/33cn/chain33

A+    Excellent!    Found 56 issues across 556 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


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!


golint97%

Golint is a linter for Go source code.

    • chain33/system/dapp/coins/executor/exec_local.go
    • Line 12: warning: don't use underscores in Go names; method ExecLocal_Transfer should be ExecLocalTransfer (golint)
    • Line 21: warning: don't use underscores in Go names; method ExecLocal_TransferToExec should be ExecLocalTransferToExec (golint)
    • Line 30: warning: don't use underscores in Go names; method ExecLocal_Withdraw should be ExecLocalWithdraw (golint)
    • Line 40: warning: don't use underscores in Go names; method ExecLocal_Genesis should be ExecLocalGenesis (golint)
    • chain33/system/dapp/coins/executor/exec_del_local.go
    • Line 12: warning: don't use underscores in Go names; method ExecDelLocal_Transfer should be ExecDelLocalTransfer (golint)
    • Line 21: warning: don't use underscores in Go names; method ExecDelLocal_TransferToExec should be ExecDelLocalTransferToExec (golint)
    • Line 30: warning: don't use underscores in Go names; method ExecDelLocal_Withdraw should be ExecDelLocalWithdraw (golint)
    • chain33/system/dapp/coins/executor/query.go
    • Line 12: warning: don't use underscores in Go names; method Query_GetAddrReciver should be QueryGetAddrReciver (golint)
    • Line 17: warning: don't use underscores in Go names; method Query_GetTxsByAddr should be QueryGetTxsByAddr (golint)
    • Line 22: warning: don't use underscores in Go names; method Query_GetPrefixCount should be QueryGetPrefixCount (golint)
    • Line 27: warning: don't use underscores in Go names; method Query_GetAddrTxsCount should be QueryGetAddrTxsCount (golint)
    • chain33/system/dapp/commands/types/types.go
    • Line 13: warning: don't use underscores in Go names; var secp_256k1 should be secp256k1 (golint)
    • Line 14: warning: don't use underscores in Go names; var sm_2 should be sm2 (golint)
    • Line 15: warning: don't use underscores in Go names; var ed_25519 should be ed25519 (golint)
    • Line 17: warning: don't use underscores in Go names; var default_uid should be defaultUID (golint)
    • chain33/wallet/wallet_msg.go
    • Line 32: warning: don't use underscores in Go names; method On_WalletGetAccountList should be OnWalletGetAccountList (golint)
    • Line 41: warning: don't use underscores in Go names; method On_NewAccount should be OnNewAccount (golint)
    • Line 50: warning: don't use underscores in Go names; method On_WalletTransactionList should be OnWalletTransactionList (golint)
    • Line 59: warning: don't use underscores in Go names; method On_WalletImportPrivkey should be OnWalletImportPrivkey (golint)
    • Line 68: warning: don't use underscores in Go names; method On_WalletSendToAddress should be OnWalletSendToAddress (golint)
    • Line 77: warning: don't use underscores in Go names; method On_WalletSetFee should be OnWalletSetFee (golint)
    • Line 91: warning: don't use underscores in Go names; method On_WalletSetLabel should be OnWalletSetLabel (golint)
    • Line 100: warning: don't use underscores in Go names; method On_WalletGetAccount should be OnWalletGetAccount (golint)
    • Line 109: warning: don't use underscores in Go names; method On_WalletMergeBalance should be OnWalletMergeBalance (golint)
    • Line 118: warning: don't use underscores in Go names; method On_WalletSetPasswd should be OnWalletSetPasswd (golint)
    • Line 132: warning: don't use underscores in Go names; method On_WalletLock should be OnWalletLock (golint)
    • Line 146: warning: don't use underscores in Go names; method On_WalletUnLock should be OnWalletUnLock (golint)
    • Line 160: warning: don't use underscores in Go names; method On_AddBlock should be OnAddBlock (golint)
    • Line 170: warning: don't use underscores in Go names; method On_DelBlock should be OnDelBlock (golint)
    • Line 180: warning: don't use underscores in Go names; method On_GenSeed should be OnGenSeed (golint)
    • Line 189: warning: don't use underscores in Go names; method On_GetSeed should be OnGetSeed (golint)
    • Line 201: warning: don't use underscores in Go names; method On_SaveSeed should be OnSaveSeed (golint)
    • Line 215: warning: don't use underscores in Go names; method On_GetWalletStatus should be OnGetWalletStatus (golint)
    • Line 221: warning: don't use underscores in Go names; method On_DumpPrivkey should be OnDumpPrivkey (golint)
    • Line 233: warning: don't use underscores in Go names; method On_SignRawTx should be OnSignRawTx (golint)
    • Line 245: warning: don't use underscores in Go names; method On_ErrToFront should be OnErrToFront (golint)
    • Line 251: warning: don't use underscores in Go names; method On_FatalFailure should be OnFatalFailure (golint)
    • Line 300: warning: don't use underscores in Go names; method On_NewAccountByIndex should be OnNewAccountByIndex (golint)
    • Line 309: warning: don't use underscores in Go names; method On_DumpPrivkeysFile should be OnDumpPrivkeysFile (golint)
    • Line 323: warning: don't use underscores in Go names; method On_ImportPrivkeysFile should be OnImportPrivkeysFile (golint)
    • chain33/system/dapp/coins/executor/exec.go
    • Line 14: warning: don't use underscores in Go names; method Exec_Transfer should be ExecTransfer (golint)
    • Line 24: warning: don't use underscores in Go names; method Exec_TransferToExec should be ExecTransferToExec (golint)
    • Line 39: warning: don't use underscores in Go names; method Exec_Withdraw should be ExecWithdraw (golint)
    • Line 54: warning: don't use underscores in Go names; method Exec_Genesis should be ExecGenesis (golint)

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.

    • chain33/blockchain/push.go
    • Line 612: warning: cyclomatic complexity 20 of function (*Push).getEVMEvent() is high (> 15) (gocyclo)
    • Line 460: warning: cyclomatic complexity 19 of function (*Push).runTask() is high (> 15) (gocyclo)
    • Line 290: warning: cyclomatic complexity 18 of function (*Push).addSubscriber() is high (> 15) (gocyclo)
    • chain33/types/jsonpb/decode.go
    • Line 136: warning: cyclomatic complexity 69 of function (*Unmarshaler).unmarshalMessage() is high (> 15) (gocyclo)
    • Line 449: warning: cyclomatic complexity 21 of function (*Unmarshaler).unmarshalSingularValue() is high (> 15) (gocyclo)
    • chain33/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)
    • chain33/types/jsonpb/encode.go
    • Line 134: warning: cyclomatic complexity 46 of function (*jsonWriter).marshalMessage() is high (> 15) (gocyclo)
    • Line 424: warning: cyclomatic complexity 20 of function (*jsonWriter).marshalValue() is high (> 15) (gocyclo)
    • Line 517: warning: cyclomatic complexity 19 of function (*jsonWriter).marshalSingularValue() is high (> 15) (gocyclo)
    • chain33/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)
    • chain33/wallet/wallet_proc.go
    • Line 40: warning: cyclomatic complexity 25 of function (*Wallet).ProcSignRawTx() is high (> 15) (gocyclo)
    • Line 1374: warning: cyclomatic complexity 23 of function (*Wallet).createNewAccountByIndex() is high (> 15) (gocyclo)
    • Line 677: warning: cyclomatic complexity 22 of function (*Wallet).ProcMergeBalance() is high (> 15) (gocyclo)
    • Line 804: warning: cyclomatic complexity 20 of function (*Wallet).ProcWalletSetPasswd() is high (> 15) (gocyclo)
    • Line 267: warning: cyclomatic complexity 19 of function (*Wallet).ProcCreateNewAccount() is high (> 15) (gocyclo)
    • Line 433: warning: cyclomatic complexity 18 of function (*Wallet).procImportPrivKey() is high (> 15) (gocyclo)
    • Line 529: warning: cyclomatic complexity 17 of function (*Wallet).ProcSendToAddress() is high (> 15) (gocyclo)
    • chain33/executor/executor.go
    • Line 295: warning: cyclomatic complexity 17 of function (*Executor).procExecTxList() is high (> 15) (gocyclo)
    • Line 453: warning: cyclomatic complexity 17 of function (*Executor).procExecDelBlock() is high (> 15) (gocyclo)
    • Line 377: warning: cyclomatic complexity 17 of function (*Executor).procExecAddBlock() is high (> 15) (gocyclo)
    • chain33/rpc/client.go
    • Line 93: warning: cyclomatic complexity 21 of function (*channelClient).ReWriteRawTx() is high (> 15) (gocyclo)
    • Line 207: warning: cyclomatic complexity 17 of function (*channelClient).CreateNoBalanceTxs() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!