Preparing report...

Report for github.com/SB-IM/jsonrpc-lite

(v0.2.0)

A+    Excellent!    Found 5 issues across 8 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!


golint37%

Golint is a linter for Go source code.

    • errors.go
    • Line 10: warning: exported const MessageParseError should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: comment on exported type Errors should be of the form "Errors ..." (with optional leading article) (golint)
    • Line 44: warning: comment on exported method Errors.ParseError should be of the form "ParseError ..." (golint)
    • Line 45: warning: receiver name e should be consistent with previous receiver name err for Errors (golint)
    • Line 52: warning: comment on exported method Errors.InvalidRequest should be of the form "InvalidRequest ..." (golint)
    • Line 53: warning: receiver name e should be consistent with previous receiver name err for Errors (golint)
    • Line 60: warning: comment on exported method Errors.MethodNotFound should be of the form "MethodNotFound ..." (golint)
    • Line 61: warning: receiver name e should be consistent with previous receiver name err for Errors (golint)
    • Line 68: warning: comment on exported method Errors.InvalidParams should be of the form "InvalidParams ..." (golint)
    • Line 69: warning: receiver name e should be consistent with previous receiver name err for Errors (golint)
    • Line 76: warning: comment on exported method Errors.InternalError should be of the form "InternalError ..." (golint)
    • Line 77: warning: receiver name e should be consistent with previous receiver name err for Errors (golint)
    • id.go
    • Line 32: warning: exported method ID.MarshalJSON should have comment or be unexported (golint)
    • Line 39: warning: exported method ID.UnmarshalJSON should have comment or be unexported (golint)
    • Line 47: warning: comment on exported function NewID should be of the form "NewID ..." (golint)
    • jsonrpc.go
    • Line 9: warning: comment on exported const TypeInvalid should be of the form "TypeInvalid ..." (golint)
    • Line 11: warning: comment on exported const TypeRequest should be of the form "TypeRequest ..." (golint)
    • Line 13: warning: comment on exported const TypeSuccess should be of the form "TypeSuccess ..." (golint)
    • Line 15: warning: comment on exported const TypeNotify should be of the form "TypeNotify ..." (golint)
    • Line 17: warning: comment on exported const TypeErrors should be of the form "TypeErrors ..." (golint)
    • Line 21: warning: comment on exported type Jsonrpc should be of the form "Jsonrpc ..." (with optional leading article) (golint)
    • Line 41: warning: comment on exported method Jsonrpc.ToJSON should be of the form "ToJSON ..." (golint)
    • Line 62: warning: comment on exported function ParseObject should be of the form "ParseObject ..." (golint)
    • Line 103: warning: comment on exported function NewRequest should be of the form "NewRequest ..." (golint)
    • Line 117: warning: comment on exported function NewNotify should be of the form "NewNotify ..." (golint)
    • Line 130: warning: comment on exported function NewSuccess should be of the form "NewSuccess ..." (golint)
    • Line 140: warning: comment on exported function NewError should be of the form "NewError ..." (golint)
    • Line 154: warning: comment on exported function NewErrors should be of the form "NewErrors ..." (golint)
    • jsonrpc_test.go
    • Line 8: warning: don't use underscores in Go names; var test_jsonrpc_method should be testJsonrpcMethod (golint)
    • Line 9: warning: don't use underscores in Go names; var test_jsonrpc_notify should be testJsonrpcNotify (golint)
    • Line 12: warning: don't use underscores in Go names; var test_jsonrpc_result should be testJsonrpcResult (golint)
    • Line 13: warning: don't use underscores in Go names; var test_jsonrpc_errors should be testJsonrpcErrors (golint)
    • Line 15: warning: don't use underscores in Go names; var test_batch_jsonrpc should be testBatchJsonrpc (golint)
    • version.go
    • Line 14: warning: exported method VersionTag.MarshalJSON should have comment or be unexported (golint)
    • Line 18: warning: exported method VersionTag.UnmarshalJSON should have comment or be unexported (golint)

gocyclo87%

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.

    • jsonrpc.go
    • Line 88: warning: cyclomatic complexity 17 of function (*Jsonrpc).getType() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!