Preparing report...

Report for github.com/observatorium/api

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


gocyclo95%

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.


golint70%

Golint is a linter for Go source code.

    • api/rbac/rbac.go
    • Line 105: warning: comment on exported function NewAuthorizer should be of the form "NewAuthorizer ..." (golint)
    • api/tracing/tracing.go
    • Line 18: warning: exported const EndpointTypeCollector should have comment (or a comment on this block) or be unexported (golint)
    • api/logger/logger.go
    • Line 11: warning: exported const LogFormatLogfmt should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported function NewLogger should have comment or be unexported (golint)
    • api/proxy/proxy.go
    • Line 15: warning: exported type Middleware should have comment or be unexported (golint)
    • Line 17: warning: exported function Middlewares should have comment or be unexported (golint)
    • Line 25: warning: exported function MiddlewareSetUpstream should have comment or be unexported (golint)
    • Line 33: warning: exported function MiddlewareLogger should have comment or be unexported (golint)
    • Line 40: warning: exported function MiddlewareMetrics should have comment or be unexported (golint)
    • Line 54: warning: exported function Logger should have comment or be unexported (golint)
    • api/api/logs/v1/http.go
    • Line 1: warning: package comment should be of the form "Package http ..." (golint)
    • Line 20: warning: exported const ReadTimeout should have comment (or a comment on this block) or be unexported (golint)
    • Line 88: warning: exported function NewHandler should have comment or be unexported (golint)
    • api/api/metrics/legacy/http.go
    • Line 30: warning: exported type HandlerOption should have comment or be unexported (golint)
    • Line 32: warning: exported function Logger should have comment or be unexported (golint)
    • Line 38: warning: exported function Registry should have comment or be unexported (golint)
    • Line 44: warning: exported function HandlerInstrumenter should have comment or be unexported (golint)
    • Line 74: warning: exported function NewHandler should have comment or be unexported (golint)

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!