Preparing report...

Report for github.com/bootapp/oauth2

A    Great!    Found 12 issues across 33 files

Tweet

gofmt66%

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!


gocyclo93%

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/server/server.go
    • Line 312: warning: cyclomatic complexity 44 of function (*Server).ValidationTokenRequest() is high (> 15) (gocyclo)
    • Line 460: warning: cyclomatic complexity 24 of function (*Server).GetAccessToken() is high (> 15) (gocyclo)

golint84%

Golint is a linter for Go source code.

    • oauth2/models/token.go
    • Line 84: warning: comment on exported method Token.SetAuthorities should be of the form "SetAuthorities ..." (golint)
    • Line 89: warning: exported method Token.GetAuthorities should have comment or be unexported (golint)
    • Line 93: warning: exported method Token.GetExpiresAt should have comment or be unexported (golint)
    • Line 97: warning: exported method Token.SetExpiresAt should have comment or be unexported (golint)
    • oauth2/manage/stateless_manager.go
    • Line 13: warning: comment on exported function NewDefaultStatelessManager should be of the form "NewDefaultStatelessManager ..." (golint)
    • Line 21: warning: comment on exported function NewStatelessManager should be of the form "NewStatelessManager ..." (golint)
    • Line 32: warning: comment on exported type StatelessManager should be of the form "StatelessManager ..." (with optional leading article) (golint)
    • oauth2/generates/jwt_access.go
    • Line 36: warning: exported function NewJWTAccessDecoder should have comment or be unexported (golint)
    • Line 64: warning: exported method JWTAccessGenerate.UpdatePrivateKey should have comment or be unexported (golint)
    • Line 89: warning: exported method JWTAccessGenerate.UpdatePublicKey should have comment or be unexported (golint)
    • Line 111: warning: receiver name a should be consistent with previous receiver name ag for JWTAccessGenerate (golint)
    • Line 119: warning: receiver name a should be consistent with previous receiver name ag for JWTAccessGenerate (golint)
    • Line 135: 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 140: warning: exported method JWTAccessGenerate.ExtractInfo should have comment or be unexported (golint)
    • Line 140: warning: receiver name a should be consistent with previous receiver name ag for JWTAccessGenerate (golint)
    • Line 160: warning: exported method JWTAccessGenerate.Token should have comment or be unexported (golint)
    • Line 160: warning: receiver name a should be consistent with previous receiver name ag for JWTAccessGenerate (golint)
    • Line 189: warning: receiver name a should be consistent with previous receiver name ag for JWTAccessGenerate (golint)
    • Line 193: warning: receiver name a should be consistent with previous receiver name ag for JWTAccessGenerate (golint)
    • Line 199: warning: receiver name a should be consistent with previous receiver name ag for JWTAccessGenerate (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!