Preparing report...

Report for github.com/gcash/bchwallet

A+    Excellent!    Found 46 issues across 143 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!


gocyclo79%

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.

    • bchwallet/walletdb/walletdbtest/interface.go
    • Line 298: warning: cyclomatic complexity 29 of function testManualTxInterface() is high (> 15) (gocyclo)
    • Line 490: warning: cyclomatic complexity 28 of function testNamespaceAndTxInterfaces() is high (> 15) (gocyclo)
    • Line 151: warning: cyclomatic complexity 24 of function testReadWriteBucketInterface() is high (> 15) (gocyclo)
    • bchwallet/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)
    • bchwallet/waddrmgr/scoped_manager.go
    • Line 652: warning: cyclomatic complexity 25 of function (*ScopedKeyManager).nextAddresses() is high (> 15) (gocyclo)
    • Line 847: warning: cyclomatic complexity 24 of function (*ScopedKeyManager).extendAddresses() is high (> 15) (gocyclo)
    • bchwallet/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 1072: warning: cyclomatic complexity 27 of function TestMoveMultipleToSameBlock() is high (> 15) (gocyclo)
    • Line 1895: warning: cyclomatic complexity 27 of function TestInsertConfirmedDoubleSpendTx() is high (> 15) (gocyclo)
    • Line 1739: warning: cyclomatic complexity 21 of function testInsertMempoolDoubleSpendTx() is high (> 15) (gocyclo)
    • Line 2069: warning: cyclomatic complexity 21 of function TestAddDuplicateCreditAfterConfirm() is high (> 15) (gocyclo)
    • Line 1316: warning: cyclomatic complexity 17 of function TestRemoveUnminedTx() is high (> 15) (gocyclo)
    • Line 1604: warning: cyclomatic complexity 16 of function TestOutputsAfterRemoveDoubleSpend() is high (> 15) (gocyclo)
    • bchwallet/wallet/wallet.go
    • Line 359: warning: cyclomatic complexity 30 of function (*Wallet).syncWithChain() is high (> 15) (gocyclo)
    • Line 3275: warning: cyclomatic complexity 25 of function (*Wallet).SignTransaction() is high (> 15) (gocyclo)
    • Line 2257: warning: cyclomatic complexity 23 of function (*Wallet).GetTransactions() is high (> 15) (gocyclo)
    • Line 2578: warning: cyclomatic complexity 22 of function (*Wallet).ListUnspent() is high (> 15) (gocyclo)
    • Line 665: warning: cyclomatic complexity 19 of function (*Wallet).recovery() is high (> 15) (gocyclo)
    • Line 1347: warning: cyclomatic complexity 18 of function (*Wallet).walletLocker() is high (> 15) (gocyclo)
    • Line 2465: warning: cyclomatic complexity 16 of function (*Wallet).AccountBalances() is high (> 15) (gocyclo)
    • bchwallet/chain/bitcoind_conn.go
    • Line 161: warning: cyclomatic complexity 17 of function (*BitcoindConn).blockEventHandler() is high (> 15) (gocyclo)
    • Line 242: warning: cyclomatic complexity 17 of function (*BitcoindConn).txEventHandler() is high (> 15) (gocyclo)
    • bchwallet/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)
    • bchwallet/waddrmgr/manager_test.go
    • Line 2029: 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 352: warning: cyclomatic complexity 17 of function testExternalAddresses() is high (> 15) (gocyclo)
    • Line 486: warning: cyclomatic complexity 17 of function testInternalAddresses() is high (> 15) (gocyclo)
    • bchwallet/rpc/legacyrpc/methods.go
    • Line 1574: warning: cyclomatic complexity 33 of function signRawTransaction() is high (> 15) (gocyclo)
    • Line 168: warning: cyclomatic complexity 18 of function lazyApplyHandler() is high (> 15) (gocyclo)
    • Line 785: warning: cyclomatic complexity 18 of function getTransaction() is high (> 15) (gocyclo)
    • bchwallet/wtxmgr/tx.go
    • Line 466: warning: cyclomatic complexity 38 of function (*Store).rollback() is high (> 15) (gocyclo)
    • Line 815: warning: cyclomatic complexity 27 of function (*Store).Balance() is high (> 15) (gocyclo)
    • bchwallet/chain/bitcoind_client.go
    • Line 970: warning: cyclomatic complexity 24 of function (*BitcoindClient).rescan() is high (> 15) (gocyclo)
    • Line 517: warning: cyclomatic complexity 20 of function (*BitcoindClient).rescanHandler() is high (> 15) (gocyclo)
    • Line 1224: warning: cyclomatic complexity 18 of function (*BitcoindClient).filterTx() is high (> 15) (gocyclo)
    • bchwallet/waddrmgr/manager.go
    • Line 1658: warning: cyclomatic complexity 26 of function Create() is high (> 15) (gocyclo)
    • Line 1382: warning: cyclomatic complexity 19 of function loadManager() is high (> 15) (gocyclo)
    • Line 772: warning: cyclomatic complexity 19 of function (*Manager).ChangePassphrase() is high (> 15) (gocyclo)
    • Line 1061: warning: cyclomatic complexity 16 of function (*Manager).Unlock() is high (> 15) (gocyclo)

golint100%

Golint is a linter for Go source code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


misspell84%

Misspell Finds commonly misspelled English words

    • bchwallet/rpc/legacyrpc/methods.go
    • Line 54: warning: "appropiate" is a misspelling of "appropriate" (misspell)
    • Line 142: warning: "appropiate" is a misspelling of "appropriate" (misspell)
    • Line 378: warning: "appropiate" is a misspelling of "appropriate" (misspell)
    • Line 398: warning: "appropiate" is a misspelling of "appropriate" (misspell)
    • Line 672: warning: "appropiate" is a misspelling of "appropriate" (misspell)
    • Line 691: warning: "appropiate" is a misspelling of "appropriate" (misspell)
    • Line 929: warning: "appropiate" is a misspelling of "appropriate" (misspell)
    • Line 930: warning: "futher" is a misspelling of "further" (misspell)
    • Line 965: warning: "availble" is a misspelling of "available" (misspell)
    • Line 1735: warning: "encounted" is a misspelling of "encountered" (misspell)