Preparing report...

Report for github.com/bwplotka/oidc

A+    Excellent!    Found 10 issues across 24 files

Tweet

gofmt91%

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!


gocyclo91%

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.

    • oidc/verify.go
    • Line 106: warning: cyclomatic complexity 25 of function (*IDTokenVerifier).Verify() is high (> 15) (gocyclo)

golint66%

Golint is a linter for Go source code.

    • oidc/login/k8scache/k8s_cache.go
    • Line 14: warning: exported const IssuerUrl should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported var DefaultKubeConfigPath should have comment or be unexported (golint)
    • oidc/testing/provider.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 17: warning: exported type Request should have comment or be unexported (golint)
    • Line 23: warning: exported type Provider should have comment or be unexported (golint)
    • Line 30: warning: exported method Provider.Setup should have comment or be unexported (golint)
    • Line 48: warning: exported method Provider.MockDiscoveryCall should have comment or be unexported (golint)
    • Line 65: warning: exported method Provider.MockPubKeysCall should have comment or be unexported (golint)
    • Line 75: warning: exported method Provider.MockTokenCall should have comment or be unexported (golint)
    • oidc/authorize/auth.go
    • Line 13: warning: exported type Authorizer should have comment or be unexported (golint)
    • Line 25: warning: exported function New should have comment or be unexported (golint)
    • Line 79: warning: exported function IsRequestAuthorized should have comment or be unexported (golint)
    • oidc/client.go
    • Line 22: warning: exported const ScopeOfflineAccess should have comment (or a comment on this block) or be unexported (golint)
    • Line 310: warning: comment on exported method Client.ExchangeServiceAccount should be of the form "ExchangeServiceAccount ..." (golint)
    • oidc/token.go
    • Line 89: warning: comment on exported type IDToken should be of the form "IDToken ..." (with optional leading article) (golint)
    • Line 127: warning: exported type Audience should have comment or be unexported (golint)
    • Line 129: warning: exported method Audience.UnmarshalJSON should have comment or be unexported (golint)
    • oidc/login/callback.go
    • Line 226: warning: context.Context should be the first parameter of a function (golint)
    • Line 233: warning: exported method CallbackServer.ExpectCallback should have comment or be unexported (golint)
    • Line 239: warning: exported method CallbackServer.Callback should have comment or be unexported (golint)
    • Line 243: warning: exported method CallbackServer.RedirectURL 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!


misspell95%

Misspell Finds commonly misspelled English words