Preparing report...

Report for github.com/coreos/dex

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


gocyclo87%

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.

    • dex/server/handlers.go
    • Line 970: warning: cyclomatic complexity 32 of function (*Server).handlePasswordGrant() is high (> 15) (gocyclo)
    • Line 205: warning: cyclomatic complexity 22 of function (*Server).handleConnectorLogin() is high (> 15) (gocyclo)
    • Line 797: warning: cyclomatic complexity 20 of function (*Server).exchangeAuthCode() is high (> 15) (gocyclo)
    • Line 327: warning: cyclomatic complexity 18 of function (*Server).handleConnectorCallback() is high (> 15) (gocyclo)
    • Line 518: warning: cyclomatic complexity 18 of function (*Server).sendCodeResponse() is high (> 15) (gocyclo)
    • dex/connector/saml/saml.go
    • Line 296: warning: cyclomatic complexity 38 of function (*provider).HandlePOST() is high (> 15) (gocyclo)
    • Line 127: warning: cyclomatic complexity 19 of function (*Config).openConnector() is high (> 15) (gocyclo)
    • dex/server/server_test.go
    • Line 260: warning: cyclomatic complexity 40 of function makeOAuth2Tests() is high (> 15) (gocyclo)
    • Line 1495: warning: cyclomatic complexity 21 of function TestOAuth2DeviceFlow() is high (> 15) (gocyclo)
    • Line 658: warning: cyclomatic complexity 19 of function TestOAuth2CodeFlow() is high (> 15) (gocyclo)
    • Line 818: warning: cyclomatic complexity 18 of function TestOAuth2ImplicitFlow() is high (> 15) (gocyclo)
    • Line 954: warning: cyclomatic complexity 17 of function TestCrossClientScopes() is high (> 15) (gocyclo)
    • Line 1077: warning: cyclomatic complexity 17 of function TestCrossClientScopesWithAzpInAudienceByDefault() is high (> 15) (gocyclo)
    • dex/server/oauth2.go
    • Line 409: warning: cyclomatic complexity 39 of function (*Server).parseAuthorizationRequest() is high (> 15) (gocyclo)
    • Line 292: warning: cyclomatic complexity 22 of function (*Server).newIDToken() is high (> 15) (gocyclo)
    • dex/storage/kubernetes/storage.go
    • Line 593: warning: cyclomatic complexity 19 of function (*client).GarbageCollect() is high (> 15) (gocyclo)
    • Line 63: warning: cyclomatic complexity 16 of function (*Config).open() is high (> 15) (gocyclo)
    • dex/server/api_test.go
    • Line 343: warning: cyclomatic complexity 23 of function TestUpdateClient() is high (> 15) (gocyclo)
    • Line 60: warning: cyclomatic complexity 18 of function TestPassword() is high (> 15) (gocyclo)

golint95%

Golint is a linter for Go source code.

    • dex/server/handlers.go
    • Line 27: warning: exported const CodeChallengeMethodPlain should have comment (or a comment on this block) or be unexported (golint)
    • dex/server/rotation.go
    • Line 181: warning: exported type RefreshTokenPolicy should have comment or be unexported (golint)
    • Line 193: warning: exported function NewRefreshTokenPolicy should have comment or be unexported (golint)
    • Line 226: warning: exported method RefreshTokenPolicy.RotationEnabled should have comment or be unexported (golint)
    • Line 230: warning: exported method RefreshTokenPolicy.CompletelyExpired should have comment or be unexported (golint)
    • Line 237: warning: exported method RefreshTokenPolicy.ExpiredBecauseUnused should have comment or be unexported (golint)
    • Line 244: warning: exported method RefreshTokenPolicy.AllowedToReuse 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!