Preparing report...

Report for github.com/foundryservices/rosetta-sdk-go

(v0.7.1)

A+    Excellent!    Found 15 issues across 245 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!


gocyclo96%

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.

    • asserter/server.go
    • Line 501: warning: cyclomatic complexity 26 of function (*Asserter).SearchTransactionsRequest() is high (> 15) (gocyclo)
    • constructor/coordinator/coordinator.go
    • Line 469: warning: cyclomatic complexity 19 of function (*Coordinator).process() is high (> 15) (gocyclo)
    • Line 107: warning: cyclomatic complexity 19 of function (*Coordinator).findJob() is high (> 15) (gocyclo)
    • Line 221: warning: cyclomatic complexity 16 of function (*Coordinator).createTransaction() is high (> 15) (gocyclo)
    • storage/encoder/encoder.go
    • Line 258: warning: cyclomatic complexity 30 of function (*Encoder).EncodeAccountCoin() is high (> 15) (gocyclo)
    • Line 350: warning: cyclomatic complexity 26 of function (*Encoder).DecodeAccountCoin() is high (> 15) (gocyclo)
    • Line 487: warning: cyclomatic complexity 22 of function (*Encoder).EncodeAccountCurrency() is high (> 15) (gocyclo)
    • Line 559: warning: cyclomatic complexity 22 of function (*Encoder).DecodeAccountCurrency() is high (> 15) (gocyclo)
    • utils/size.go
    • Line 45: warning: cyclomatic complexity 23 of function sizeOf() is high (> 15) (gocyclo)

golint97%

Golint is a linter for Go source code.

    • asserter/asserter.go
    • Line 55: warning: exported type ValidationOperation should have comment or be unexported (golint)
    • Line 60: warning: exported type Operation should have comment or be unexported (golint)
    • Line 65: warning: exported type ChainType should have comment or be unexported (golint)
    • Line 68: warning: exported const Account should have comment (or a comment on this block) or be unexported (golint)
    • asserter/block.go
    • Line 354: warning: exported method Asserter.ValidatePaymentAndFee should have comment or be unexported (golint)
    • utils/utils.go
    • Line 191: warning: exported type BlockStorageHelper should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!