Preparing report...

Report for github.com/RavenProject/rosetta-ravencoin

A+    Excellent!    Found 40 issues across 186 files

Tweet

gofmt91%

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!


gocyclo88%

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.

    • rosetta-ravencoin/ravencoin/txscript/reference_test.go
    • Line 206: warning: cyclomatic complexity 38 of function parseExpectedResult() is high (> 15) (gocyclo)
    • Line 658: warning: cyclomatic complexity 26 of function TestTxValidTests() is high (> 15) (gocyclo)
    • Line 502: warning: cyclomatic complexity 26 of function TestTxInvalidTests() is high (> 15) (gocyclo)
    • Line 331: warning: cyclomatic complexity 22 of function testScripts() is high (> 15) (gocyclo)
    • Line 154: warning: cyclomatic complexity 21 of function parseScriptFlags() is high (> 15) (gocyclo)
    • Line 92: warning: cyclomatic complexity 18 of function parseShortForm() is high (> 15) (gocyclo)
    • rosetta-ravencoin/ravencoin/txscript/opcode.go
    • Line 2218: warning: cyclomatic complexity 37 of function opcodeCheckMultiSig() is high (> 15) (gocyclo)
    • Line 623: warning: cyclomatic complexity 17 of function (*parsedOpcode).isDisabled() is high (> 15) (gocyclo)
    • Line 2080: warning: cyclomatic complexity 17 of function opcodeCheckSig() is high (> 15) (gocyclo)
    • Line 696: warning: cyclomatic complexity 16 of function (*parsedOpcode).checkMinimalDataPush() is high (> 15) (gocyclo)
    • rosetta-ravencoin/ravencoin/txscript/engine.go
    • Line 602: warning: cyclomatic complexity 25 of function (*Engine).checkSignatureEncoding() is high (> 15) (gocyclo)
    • Line 846: warning: cyclomatic complexity 18 of function NewEngine() is high (> 15) (gocyclo)
    • Line 254: warning: cyclomatic complexity 16 of function (*Engine).verifyWitnessProgram() is high (> 15) (gocyclo)
    • Line 442: warning: cyclomatic complexity 16 of function (*Engine).Step() is high (> 15) (gocyclo)

golint97%

Golint is a linter for Go source code.

    • rosetta-ravencoin/ravencoin/wire/msgtx.go
    • Line 240: warning: exported type Joinsplit should have comment or be unexported (golint)
    • Line 241: warning: don't use underscores in Go names; struct field Vpub_old should be VpubOld (golint)
    • Line 242: warning: don't use underscores in Go names; struct field Vpub_new should be VpubNew (golint)
    • Line 334: warning: exported method MsgTx.TransactionHash should have comment or be unexported (golint)
    • Line 1054: warning: exported function ReverseBuffer should have comment or be unexported (golint)
    • rosetta-ravencoin/ravencoin/wire/protocol.go
    • Line 19: warning: comment on exported const INIT_PROTO_VERSION should be of the form "INIT_PROTO_VERSION ..." (golint)
    • Line 22: warning: comment on exported const GETHEADERS_VERSION should be of the form "GETHEADERS_VERSION ..." (golint)
    • Line 25: warning: comment on exported const ASSETDATA_VERSION should be of the form "ASSETDATA_VERSION ..." (golint)
    • Line 28: warning: comment on exported const X16RV2_VERSION should be of the form "X16RV2_VERSION ..." (golint)
    • Line 31: warning: comment on exported const KAWPOW_VERSION should be of the form "KAWPOW_VERSION ..." (golint)
    • Line 34: warning: comment on exported const MIN_PEER_PROTO_VERSION should be of the form "MIN_PEER_PROTO_VERSION ..." (golint)
    • Line 39: warning: comment on exported const CADDR_TIME_VERSION should be of the form "CADDR_TIME_VERSION ..." (golint)
    • Line 43: warning: comment on exported const BIP0031_VERSION should be of the form "BIP0031_VERSION ..." (golint)
    • Line 46: warning: comment on exported const NO_BLOOM_VERSION should be of the form "NO_BLOOM_VERSION ..." (golint)
    • Line 49: warning: comment on exported const SENDHEADERS_VERSION should be of the form "SENDHEADERS_VERSION ..." (golint)
    • Line 52: warning: comment on exported const FEEFILTER_VERSION should be of the form "FEEFILTER_VERSION ..." (golint)
    • Line 55: warning: comment on exported const SHORT_IDS_BLOCKS_VERSION should be of the form "SHORT_IDS_BLOCKS_VERSION ..." (golint)
    • Line 58: warning: comment on exported const INVALID_CB_NO_BAN_VERSION should be of the form "INVALID_CB_NO_BAN_VERSION ..." (golint)
    • Line 61: warning: comment on exported const ASSETDATA_VERSION_UPDATED should be of the form "ASSETDATA_VERSION_UPDATED ..." (golint)
    • Line 64: warning: comment on exported const MESSAGING_RESTRICTED_ASSETS_VERSION should be of the form "MESSAGING_RESTRICTED_ASSETS_VERSION ..." (golint)
    • rosetta-ravencoin/ravencoin/txscript/opcode.go
    • Line 37: warning: don't use underscores in Go names; const OP_0 should be OP0 (golint)
    • Line 119: warning: don't use underscores in Go names; const OP_1 should be OP1 (golint)
    • Line 121: warning: don't use underscores in Go names; const OP_2 should be OP2 (golint)
    • Line 122: warning: don't use underscores in Go names; const OP_3 should be OP3 (golint)
    • Line 123: warning: don't use underscores in Go names; const OP_4 should be OP4 (golint)
    • Line 124: warning: don't use underscores in Go names; const OP_5 should be OP5 (golint)
    • Line 125: warning: don't use underscores in Go names; const OP_6 should be OP6 (golint)
    • Line 126: warning: don't use underscores in Go names; const OP_7 should be OP7 (golint)
    • Line 127: warning: don't use underscores in Go names; const OP_8 should be OP8 (golint)
    • Line 128: warning: don't use underscores in Go names; const OP_9 should be OP9 (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.

    • rosetta-ravencoin/ravencoin/wire/msgtx.go
    • Line 558: warning: ineffectual assignment to err (ineffassign)
    • Line 911: warning: ineffectual assignment to err (ineffassign)
    • Line 913: warning: ineffectual assignment to err (ineffassign)
    • Line 919: warning: ineffectual assignment to err (ineffassign)
    • Line 921: warning: ineffectual assignment to err (ineffassign)
    • Line 941: warning: ineffectual assignment to err (ineffassign)
    • Line 943: warning: ineffectual assignment to err (ineffassign)
    • Line 964: warning: ineffectual assignment to err (ineffassign)
    • Line 967: warning: ineffectual assignment to err (ineffassign)
    • Line 972: warning: ineffectual assignment to err (ineffassign)

misspell98%

Misspell Finds commonly misspelled English words