Preparing report...

Report for github.com/Cloud-Foundations/keymaster

(v1.17.1)

A+    Excellent!    Found 35 issues across 124 files

Tweet

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!


gofmt93%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo83%

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.

    • cmd/keymasterd/certgen.go
    • Line 41: warning: cyclomatic complexity 31 of function (*RuntimeState).certGenHandler() is high (> 15) (gocyclo)
    • Line 385: warning: cyclomatic complexity 18 of function (*RuntimeState).postAuthX509CertHandler() is high (> 15) (gocyclo)
    • cmd/keymasterd/idp_oidc.go
    • Line 568: warning: cyclomatic complexity 37 of function (*RuntimeState).idpOpenIDCTokenHandler() is high (> 15) (gocyclo)
    • Line 320: warning: cyclomatic complexity 34 of function (*RuntimeState).idpOpenIDCAuthorizationHandler() is high (> 15) (gocyclo)
    • Line 893: warning: cyclomatic complexity 32 of function (*RuntimeState).idpOpenIDCUserinfoHandler() is high (> 15) (gocyclo)
    • cmd/keymasterd/idp_oidc_test.go
    • Line 89: warning: cyclomatic complexity 18 of function TestIDPOpenIDCAuthorizationHandlerSuccess() is high (> 15) (gocyclo)
    • Line 504: warning: cyclomatic complexity 16 of function TestIDPOpenIDCPKCEFlowWithAudienceSuccess() is high (> 15) (gocyclo)
    • cmd/keymasterd/app.go
    • Line 1173: warning: cyclomatic complexity 44 of function (*RuntimeState).loginHandler() is high (> 15) (gocyclo)
    • Line 863: warning: cyclomatic complexity 29 of function (*RuntimeState).checkAuth() is high (> 15) (gocyclo)
    • Line 1608: warning: cyclomatic complexity 22 of function (*RuntimeState).u2fTokenManagerHandler() is high (> 15) (gocyclo)
    • Line 1822: warning: cyclomatic complexity 20 of function main() is high (> 15) (gocyclo)
    • Line 616: warning: cyclomatic complexity 18 of function (*RuntimeState).writeFailureResponse() is high (> 15) (gocyclo)
    • Line 1477: warning: cyclomatic complexity 18 of function (*RuntimeState).profileHandler() is high (> 15) (gocyclo)
    • lib/client/twofa/u2f/u2f.go
    • Line 103: warning: cyclomatic complexity 26 of function doU2FAuthenticate() is high (> 15) (gocyclo)
    • Line 529: warning: cyclomatic complexity 26 of function withDevicesDoWebAuthnAuthenticate() is high (> 15) (gocyclo)
    • Line 310: warning: cyclomatic complexity 19 of function authenticateHelper() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell83%

Misspell Finds commonly misspelled English words

    • lib/pwauth/ldap/impl_test.go
    • Line 128: warning: "considerd" is a misspelling of "considered" (misspell)
    • Line 136: warning: "considerd" is a misspelling of "considered" (misspell)
    • Line 158: warning: "considerd" is a misspelling of "considered" (misspell)
    • Line 170: warning: "considerd" is a misspelling of "considered" (misspell)
    • Line 188: warning: "considerd" is a misspelling of "considered" (misspell)
    • Line 201: warning: "considerd" is a misspelling of "considered" (misspell)
    • Line 215: warning: "considerd" is a misspelling of "considered" (misspell)
    • Line 228: warning: "considerd" is a misspelling of "considered" (misspell)