Preparing report...

Report for github.com/zalando/planb-tokeninfo

A+    Excellent!    Found 12 issues across 51 files

Tweet

gofmt96%

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!


gocyclo90%

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.


golint84%

Golint is a linter for Go source code.

    • planb-tokeninfo/revoke/revokeprovider.go
    • Line 24: warning: comment on exported type CachingRevokeProvider should be of the form "CachingRevokeProvider ..." (with optional leading article) (golint)
    • Line 31: warning: comment on exported function NewCachingRevokeProvider should be of the form "NewCachingRevokeProvider ..." (golint)
    • Line 39: warning: comment on exported method CachingRevokeProvider.RefreshRevocations should be of the form "RefreshRevocations ..." (golint)
    • Line 102: warning: comment on exported method CachingRevokeProvider.IsJWTRevoked should be of the form "IsJWTRevoked ..." (golint)
    • planb-tokeninfo/handlers/tokeninfo/jwt/tokeninfo.go
    • Line 16: warning: exported const JwtClaimScope should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported function Marshal should have comment or be unexported (golint)
    • Line 118: warning: exported function NewTokenInfo should have comment or be unexported (golint)
    • Line 129: warning: exported function ClaimAsStrings should have comment or be unexported (golint)
    • Line 145: warning: exported function ClaimAsString should have comment or be unexported (golint)
    • Line 157: warning: exported function ClaimAsInt64 should have comment or be unexported (golint)
    • planb-tokeninfo/revoke/caching.go
    • Line 34: warning: comment on exported function NewCache should be of the form "NewCache ..." (golint)
    • Line 110: warning: comment on exported method Cache.Get should be of the form "Get ..." (golint)
    • Line 117: warning: comment on exported method Cache.GetLastTS should be of the form "GetLastTS ..." (golint)
    • Line 129: warning: comment on exported method Cache.GetClaimNames should be of the form "GetClaimNames ..." (golint)
    • Line 137: warning: should omit 2nd value from range; this loop is equivalent to `for n := range ...` (golint)
    • Line 149: warning: comment on exported method Cache.ForceRefresh should be of the form "ForceRefresh ..." (golint)
    • Line 158: warning: comment on exported method Cache.Add should be of the form "Add ..." (golint)
    • Line 193: warning: comment on exported method Cache.Delete should be of the form "Delete ..." (golint)
    • planb-tokeninfo/revoke/job.go
    • Line 7: warning: exported type JobFunc should have comment or be unexported (golint)
    • Line 15: warning: should omit values from range; this loop is equivalent to `for range ...` (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!


misspell96%

Misspell Finds commonly misspelled English words