Preparing report...

Report for github.com/iost-official/go-iost

A+    Excellent!    Found 27 issues across 293 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.

    • go-iost/test/v8vm/vm_test.go
    • Line 128: warning: cyclomatic complexity 58 of function TestEngine_Storage() is high (> 15) (gocyclo)
    • Line 286: warning: cyclomatic complexity 37 of function TestEngine_Storage2() is high (> 15) (gocyclo)
    • Line 386: warning: cyclomatic complexity 34 of function TestEngine_DataType() is high (> 15) (gocyclo)
    • Line 630: warning: cyclomatic complexity 19 of function TestEngine_Int64() is high (> 15) (gocyclo)
    • Line 491: warning: cyclomatic complexity 18 of function TestEngine_Loop() is high (> 15) (gocyclo)
    • Line 688: warning: cyclomatic complexity 16 of function TestEngine_Float64() is high (> 15) (gocyclo)
    • Line 785: warning: cyclomatic complexity 16 of function TestEngine_Crypto2() is high (> 15) (gocyclo)

golint94%

Golint is a linter for Go source code.

    • go-iost/vm/native/token_v5.go
    • Line 40: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 48: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 54: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-iost/rpc/api_service.go
    • Line 231: warning: comment on exported method APIService.GetRawBlockByNumber should be of the form "GetRawBlockByNumber ..." (golint)
    • Line 602: warning: comment on exported method APIService.ListContractStorage should be of the form "ListContractStorage ..." (golint)
    • go-iost/db/mvccdb.go
    • Line 266: warning: comment on exported method CacheMVCCDB.KeysByRange should be of the form "KeysByRange ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.

    • go-iost/db/wal/wal_test.go
    • Line 110: warning: ineffectual assignment to err (ineffassign)
    • Line 160: warning: ineffectual assignment to err (ineffassign)
    • Line 210: warning: ineffectual assignment to err (ineffassign)
    • Line 268: warning: ineffectual assignment to err (ineffassign)
    • Line 327: warning: ineffectual assignment to err (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!