Preparing report...

Report for stash.kopano.io/kc/konnect

A+    Excellent!    Found 36 issues across 125 files

Tweet

gofmt98%

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!


gocyclo80%

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.

    • /stash.kopano.io/kc/konnect/identifier/saml2.go
    • Line 244: warning: cyclomatic complexity 25 of function (*Identifier).writeSAMLSingleLogoutServiceRequest() is high (> 15) (gocyclo)
    • Line 96: warning: cyclomatic complexity 25 of function (*Identifier).writeSAML2AssertionConsumerService() is high (> 15) (gocyclo)
    • Line 376: warning: cyclomatic complexity 17 of function (*Identifier).writeSAMLSingleLogoutServiceResponse() is high (> 15) (gocyclo)
    • /stash.kopano.io/kc/konnect/oidc/payload/authentication.go
    • Line 267: warning: cyclomatic complexity 30 of function (*AuthenticationRequest).Validate() is high (> 15) (gocyclo)
    • Line 82: warning: cyclomatic complexity 28 of function NewAuthenticationRequest() is high (> 15) (gocyclo)
    • Line 194: warning: cyclomatic complexity 19 of function (*AuthenticationRequest).ApplyRequestObject() is high (> 15) (gocyclo)
    • /stash.kopano.io/kc/konnect/oidc/provider/handlers.go
    • Line 311: warning: cyclomatic complexity 44 of function (*Provider).TokenHandler() is high (> 15) (gocyclo)
    • Line 552: warning: cyclomatic complexity 29 of function (*Provider).UserInfoHandler() is high (> 15) (gocyclo)
    • Line 194: warning: cyclomatic complexity 24 of function (*Provider).AuthorizeResponse() is high (> 15) (gocyclo)
    • Line 88: warning: cyclomatic complexity 20 of function (*Provider).AuthorizeHandler() is high (> 15) (gocyclo)
    • Line 728: warning: cyclomatic complexity 16 of function (*Provider).EndSessionHandler() is high (> 15) (gocyclo)
    • /stash.kopano.io/kc/konnect/identity/managers/identifier.go
    • Line 105: warning: cyclomatic complexity 25 of function (*IdentifierIdentityManager).Authenticate() is high (> 15) (gocyclo)
    • Line 211: warning: cyclomatic complexity 23 of function (*IdentifierIdentityManager).Authorize() is high (> 15) (gocyclo)
    • Line 333: warning: cyclomatic complexity 17 of function (*IdentifierIdentityManager).EndSession() is high (> 15) (gocyclo)

golint88%

Golint is a linter for Go source code.

    • /stash.kopano.io/kc/konnect/signing/jwt.go
    • Line 75: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 94: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • /stash.kopano.io/kc/konnect/bootstrap/utils.go
    • Line 231: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 311: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 316: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!