Preparing report...

Report for github.com/pusher/oauth2_proxy

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


golint86%

Golint is a linter for Go source code.

    • oauth2_proxy/pkg/apis/options/legacy_options.go
    • Line 15: warning: exported type LegacyOptions should have comment or be unexported (golint)
    • Line 31: warning: exported function NewLegacyOptions should have comment or be unexported (golint)
    • Line 64: warning: exported function NewLegacyFlagSet should have comment or be unexported (golint)
    • Line 75: warning: exported method LegacyOptions.ToOptions should have comment or be unexported (golint)
    • Line 97: warning: exported type LegacyUpstreams should have comment or be unexported (golint)
    • Line 178: warning: exported type LegacyHeaders should have comment or be unexported (golint)
    • Line 442: warning: exported type LegacyServer should have comment or be unexported (golint)
    • Line 468: warning: exported type LegacyProvider should have comment or be unexported (golint)
    • oauth2_proxy/pkg/apis/options/providers.go
    • Line 76: warning: exported type KeycloakOptions should have comment or be unexported (golint)
    • Line 81: warning: exported type AzureOptions should have comment or be unexported (golint)
    • Line 87: warning: exported type BitbucketOptions should have comment or be unexported (golint)
    • Line 94: warning: exported type GitHubOptions should have comment or be unexported (golint)
    • Line 109: warning: exported type GitLabOptions should have comment or be unexported (golint)
    • Line 116: warning: exported type GoogleOptions should have comment or be unexported (golint)
    • Line 125: warning: exported type OIDCOptions should have comment or be unexported (golint)
    • Line 158: warning: exported type LoginGovOptions should have comment or be unexported (golint)
    • oauth2_proxy/providers/provider_data.go
    • Line 19: warning: exported const OIDCEmailClaim should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: exported method ProviderData.GetClientSecret should have comment or be unexported (golint)
    • oauth2_proxy/pkg/clock/clock.go
    • Line 101: warning: exported method Clock.After should have comment or be unexported (golint)
    • Line 109: warning: exported method Clock.AfterFunc should have comment or be unexported (golint)
    • Line 117: warning: exported method Clock.Now should have comment or be unexported (golint)
    • Line 125: warning: exported method Clock.Since should have comment or be unexported (golint)
    • Line 133: warning: exported method Clock.Sleep should have comment or be unexported (golint)
    • Line 142: warning: exported method Clock.Tick should have comment or be unexported (golint)
    • Line 150: warning: exported method Clock.Ticker should have comment or be unexported (golint)
    • Line 158: warning: exported method Clock.Timer should have comment or be unexported (golint)
    • oauth2_proxy/pkg/ip/net_set.go
    • Line 8: warning: comment on exported type NetSet should be of the form "NetSet ..." (with optional leading article) (golint)
    • Line 23: warning: comment on exported function NewNetSet should be of the form "NewNetSet ..." (golint)
    • Line 31: warning: comment on exported method NetSet.Has should be of the form "Has ..." (golint)
    • Line 44: warning: comment on exported method NetSet.AddIPNet should be of the form "AddIPNet ..." (golint)
    • oauth2_proxy/pkg/sessions/tests/session_store_tests.go
    • Line 15: warning: should not use dot imports (golint)
    • Line 16: warning: should not use dot imports (golint)
    • Line 43: warning: exported function RunSessionStoreTests should have comment or be unexported (golint)
    • Line 139: warning: exported function CheckCookieOptions should have comment or be unexported (golint)
    • Line 203: warning: exported function PersistentSessionStoreInterfaceTests should have comment or be unexported (golint)
    • Line 291: warning: exported function SessionStoreInterfaceTests should have comment or be unexported (golint)
    • Line 401: warning: exported function LoadSessionTests should have comment or be unexported (golint)
    • oauth2_proxy/pkg/apis/options/options.go
    • Line 77: warning: comment on exported method Options.GetRedirectURL should be of the form "GetRedirectURL ..." (golint)
    • Line 79: warning: exported method Options.GetProvider should have comment or be unexported (golint)
    • Line 80: warning: exported method Options.GetSignatureData should have comment or be unexported (golint)
    • Line 81: warning: exported method Options.GetOIDCVerifier should have comment or be unexported (golint)
    • Line 82: warning: exported method Options.GetJWTBearerVerifiers should have comment or be unexported (golint)
    • Line 83: warning: exported method Options.GetRealClientIPParser should have comment or be unexported (golint)
    • Line 85: warning: comment on exported method Options.SetRedirectURL should be of the form "SetRedirectURL ..." (golint)
    • Line 87: warning: exported method Options.SetProvider should have comment or be unexported (golint)
    • Line 88: warning: exported method Options.SetSignatureData should have comment or be unexported (golint)
    • Line 89: warning: exported method Options.SetOIDCVerifier should have comment or be unexported (golint)
    • Line 90: warning: exported method Options.SetJWTBearerVerifiers should have comment or be unexported (golint)
    • Line 91: warning: exported method Options.SetRealClientIPParser should have comment or be unexported (golint)

gocyclo98%

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.

    • oauth2_proxy/oauthproxy.go
    • Line 435: warning: cyclomatic complexity 18 of function (*OAuthProxy).IsValidRedirect() is high (> 15) (gocyclo)
    • Line 96: warning: cyclomatic complexity 17 of function NewOAuthProxy() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!