Preparing report...

Report for github.com/HorizenOfficial/rosetta-zen

A+    Excellent!    Found 35 issues across 188 files

Tweet

gofmt89%

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!


gocyclo89%

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-zen/zend/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-zen/zend/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)
    • rosetta-zen/zend/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)

golint97%

Golint is a linter for Go source code.

    • rosetta-zen/zend/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)
    • rosetta-zen/zend/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)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.

    • rosetta-zen/zend/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)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!