Preparing report...

Report for github.com/HydroProtocol/ethereum-jsonrpc-gateway

A+    Excellent!    Found 15 issues across 19 files

Tweet

gofmt94%

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!


gocyclo100%

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.

No problems detected. Good job!


golint47%

Golint is a linter for Go source code.

    • ethereum-jsonrpc-gateway/core/limitation.go
    • Line 12: warning: exported type RequestData should have comment or be unexported (golint)
    • Line 27: warning: error var DecodeError should have name of the form ErrFoo (golint)
    • Line 27: warning: exported var DecodeError should have comment or be unexported (golint)
    • Line 28: warning: error var DeniedMethod should have name of the form ErrFoo (golint)
    • Line 28: warning: exported var DeniedMethod should have comment or be unexported (golint)
    • Line 29: warning: error var DeniedContract should have name of the form ErrFoo (golint)
    • Line 29: warning: exported var DeniedContract should have comment or be unexported (golint)
    • ethereum-jsonrpc-gateway/core/request.go
    • Line 13: warning: error var TimeoutError should have name of the form ErrFoo (golint)
    • Line 13: warning: exported var TimeoutError should have comment or be unexported (golint)
    • Line 14: warning: error var AllUpstreamsFailedError should have name of the form ErrFoo (golint)
    • Line 14: warning: exported var AllUpstreamsFailedError should have comment or be unexported (golint)
    • Line 16: warning: exported type Request should have comment or be unexported (golint)
    • ethereum-jsonrpc-gateway/core/strategy.go
    • Line 15: warning: exported type IStrategy should have comment or be unexported (golint)
    • Line 23: warning: exported type NaiveProxy should have comment or be unexported (golint)
    • Line 40: warning: exported type RaceProxy should have comment or be unexported (golint)
    • Line 111: warning: exported type FallbackProxy should have comment or be unexported (golint)
    • ethereum-jsonrpc-gateway/core/monitor.go
    • Line 37: warning: exported function Time should have comment or be unexported (golint)
    • Line 41: warning: exported function Count should have comment or be unexported (golint)
    • Line 45: warning: exported function Value should have comment or be unexported (golint)
    • Line 49: warning: exported function Handler should have comment or be unexported (golint)
    • Line 53: warning: exported function StartMonitorHttpServer should have comment or be unexported (golint)
    • ethereum-jsonrpc-gateway/core/upstream.go
    • Line 20: warning: comment on exported type Upstream should be of the form "Upstream ..." (with optional leading article) (golint)
    • Line 35: warning: exported type WsUpstream should have comment or be unexported (golint)
    • Line 42: warning: exported type HttpUpstream should have comment or be unexported (golint)
    • Line 49: warning: exported type BlockNumberResponseData should have comment or be unexported (golint)
    • ethereum-jsonrpc-gateway/core/config.go
    • Line 14: warning: exported type Config should have comment or be unexported (golint)
    • Line 23: warning: exported type RunningConfig should have comment or be unexported (golint)
    • Line 36: warning: exported function LoadConfig should have comment or be unexported (golint)
    • Line 82: warning: exported function BuildRunningConfigFromConfig should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign73%

IneffAssign detects ineffectual assignments in Go code.

    • ethereum-jsonrpc-gateway/core/config_test.go
    • Line 34: warning: ineffectual assignment to err (ineffassign)
    • Line 64: warning: ineffectual assignment to err (ineffassign)
    • Line 92: warning: ineffectual assignment to err (ineffassign)
    • Line 121: warning: ineffectual assignment to err (ineffassign)
    • Line 149: warning: ineffectual assignment to err (ineffassign)
    • Line 178: warning: ineffectual assignment to err (ineffassign)
    • Line 208: warning: ineffectual assignment to err (ineffassign)
    • Line 240: warning: ineffectual assignment to err (ineffassign)
    • Line 242: warning: ineffectual assignment to err (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!