Preparing report...

Report for github.com/classzz/czzwallet

A+    Excellent!    Found 30 issues across 118 files

Tweet

gofmt99%

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!


gocyclo80%

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.

    • czzwallet/waddrmgr/scoped_manager.go
    • Line 841: warning: cyclomatic complexity 26 of function (*ScopedKeyManager).nextAddresses() is high (> 15) (gocyclo)
    • Line 1038: warning: cyclomatic complexity 25 of function (*ScopedKeyManager).extendAddresses() is high (> 15) (gocyclo)
    • Line 343: warning: cyclomatic complexity 18 of function (*ScopedKeyManager).loadAccountInfo() is high (> 15) (gocyclo)
    • czzwallet/chain/bitcoind_conn.go
    • Line 285: warning: cyclomatic complexity 17 of function (*BitcoindConn).txEventHandler() is high (> 15) (gocyclo)
    • Line 183: warning: cyclomatic complexity 17 of function (*BitcoindConn).blockEventHandler() is high (> 15) (gocyclo)
    • czzwallet/wtxmgr/query_test.go
    • Line 528: warning: cyclomatic complexity 23 of function TestPreviousPkScripts() is high (> 15) (gocyclo)
    • Line 242: warning: cyclomatic complexity 21 of function TestStoreQueries() is high (> 15) (gocyclo)
    • Line 67: warning: cyclomatic complexity 16 of function (*queryState).compare() is high (> 15) (gocyclo)
    • czzwallet/waddrmgr/manager_test.go
    • Line 2046: warning: cyclomatic complexity 33 of function TestScopedKeyManagerManagement() is high (> 15) (gocyclo)
    • Line 125: warning: cyclomatic complexity 23 of function testManagedPubKeyAddress() is high (> 15) (gocyclo)
    • Line 627: warning: cyclomatic complexity 18 of function testLocking() is high (> 15) (gocyclo)
    • Line 486: warning: cyclomatic complexity 17 of function testInternalAddresses() is high (> 15) (gocyclo)
    • Line 352: warning: cyclomatic complexity 17 of function testExternalAddresses() is high (> 15) (gocyclo)
    • czzwallet/rpc/legacyrpc/methods.go
    • Line 1554: warning: cyclomatic complexity 32 of function signRawTransaction() is high (> 15) (gocyclo)
    • Line 167: warning: cyclomatic complexity 18 of function lazyApplyHandler() is high (> 15) (gocyclo)
    • Line 770: warning: cyclomatic complexity 18 of function getTransaction() is high (> 15) (gocyclo)
    • czzwallet/walletdb/walletdbtest/interface.go
    • Line 301: warning: cyclomatic complexity 29 of function testManualTxInterface() is high (> 15) (gocyclo)
    • Line 493: warning: cyclomatic complexity 28 of function testNamespaceAndTxInterfaces() is high (> 15) (gocyclo)
    • Line 154: warning: cyclomatic complexity 24 of function testReadWriteBucketInterface() is high (> 15) (gocyclo)
    • czzwallet/chain/bitcoind_client.go
    • Line 969: warning: cyclomatic complexity 24 of function (*BitcoindClient).rescan() is high (> 15) (gocyclo)
    • Line 518: warning: cyclomatic complexity 20 of function (*BitcoindClient).rescanHandler() is high (> 15) (gocyclo)
    • Line 1229: warning: cyclomatic complexity 20 of function (*BitcoindClient).filterTx() is high (> 15) (gocyclo)
    • czzwallet/internal/legacy/keystore/keystore_test.go
    • Line 846: warning: cyclomatic complexity 49 of function TestImportScript() is high (> 15) (gocyclo)
    • Line 485: warning: cyclomatic complexity 40 of function TestWatchingWalletExport() is high (> 15) (gocyclo)
    • Line 677: warning: cyclomatic complexity 27 of function TestImportPrivateKey() is high (> 15) (gocyclo)
    • Line 326: warning: cyclomatic complexity 24 of function TestWalletPubkeyChaining() is high (> 15) (gocyclo)
    • Line 159: warning: cyclomatic complexity 18 of function TestChaining() is high (> 15) (gocyclo)
    • czzwallet/wallet/wallet.go
    • Line 345: warning: cyclomatic complexity 27 of function (*Wallet).syncWithChain() is high (> 15) (gocyclo)
    • Line 3472: warning: cyclomatic complexity 25 of function (*Wallet).publishTransaction() is high (> 15) (gocyclo)
    • Line 2228: warning: cyclomatic complexity 23 of function (*Wallet).GetTransactions() is high (> 15) (gocyclo)
    • Line 2551: warning: cyclomatic complexity 21 of function (*Wallet).ListUnspent() is high (> 15) (gocyclo)
    • Line 3211: warning: cyclomatic complexity 20 of function (*Wallet).SignTransaction() is high (> 15) (gocyclo)
    • Line 1234: warning: cyclomatic complexity 18 of function (*Wallet).walletLocker() is high (> 15) (gocyclo)
    • Line 2438: warning: cyclomatic complexity 16 of function (*Wallet).AccountBalances() is high (> 15) (gocyclo)
    • czzwallet/wtxmgr/tx_test.go
    • Line 666: warning: cyclomatic complexity 42 of function TestCoinbases() is high (> 15) (gocyclo)
    • Line 103: warning: cyclomatic complexity 36 of function TestInsertsCreditsDebitsRollbacks() is high (> 15) (gocyclo)
    • Line 1643: warning: cyclomatic complexity 27 of function TestInsertConfirmedDoubleSpendTx() is high (> 15) (gocyclo)
    • Line 1072: warning: cyclomatic complexity 27 of function TestMoveMultipleToSameBlock() is high (> 15) (gocyclo)
    • Line 1817: warning: cyclomatic complexity 21 of function TestAddDuplicateCreditAfterConfirm() is high (> 15) (gocyclo)
    • Line 1487: warning: cyclomatic complexity 21 of function testInsertMempoolDoubleSpendTx() is high (> 15) (gocyclo)
    • Line 1316: warning: cyclomatic complexity 17 of function TestRemoveUnminedTx() is high (> 15) (gocyclo)
    • czzwallet/wtxmgr/tx.go
    • Line 535: warning: cyclomatic complexity 38 of function (*Store).rollback() is high (> 15) (gocyclo)
    • Line 899: warning: cyclomatic complexity 32 of function (*Store).Balance() is high (> 15) (gocyclo)
    • czzwallet/waddrmgr/manager.go
    • Line 1803: warning: cyclomatic complexity 29 of function Create() is high (> 15) (gocyclo)
    • Line 883: warning: cyclomatic complexity 19 of function (*Manager).ChangePassphrase() is high (> 15) (gocyclo)
    • Line 1519: warning: cyclomatic complexity 19 of function loadManager() is high (> 15) (gocyclo)
    • Line 1172: warning: cyclomatic complexity 16 of function (*Manager).Unlock() is high (> 15) (gocyclo)

golint99%

Golint is a linter for Go source code.

    • czzwallet/internal/legacy/keystore/keystore.go
    • Line 37: warning: exported const Filename should have comment (or a comment on this block) or be unexported (golint)
    • Line 806: warning: comment on exported method Store.MarkDirty should be of the form "MarkDirty ..." (golint)
    • Line 814: warning: exported method Store.WriteIfDirty should have comment or be unexported (golint)
    • Line 1329: warning: comment on exported method Store.SyncedTo should be of the form "SyncedTo ..." (golint)
    • Line 1936: warning: exported method BlockIterator.Next should have comment or be unexported (golint)
    • Line 1947: warning: exported method BlockIterator.Prev should have comment or be unexported (golint)
    • Line 1958: warning: exported method BlockIterator.BlockStamp should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


misspell92%

Misspell Finds commonly misspelled English words

    • czzwallet/rpc/legacyrpc/methods.go
    • Line 657: warning: "appropiate" is a misspelling of "appropriate" (misspell)
    • Line 676: warning: "appropiate" is a misspelling of "appropriate" (misspell)
    • Line 914: warning: "appropiate" is a misspelling of "appropriate" (misspell)
    • Line 915: warning: "futher" is a misspelling of "further" (misspell)
    • Line 950: warning: "availble" is a misspelling of "available" (misspell)