Preparing report...

Report for github.com/maxzerbini/oauth

A+    Excellent!    Found 6 issues across 11 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!


gocyclo90%

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.

    • oauth/server.go
    • Line 130: warning: cyclomatic complexity 23 of function (*OAuthBearerServer).generateTokenResponse() is high (> 15) (gocyclo)

golint54%

Golint is a linter for Go source code.

    • oauth/security.go
    • Line 11: warning: exported type TokenSecureFormatter should have comment or be unexported (golint)
    • Line 16: warning: exported type TokenProvider should have comment or be unexported (golint)
    • Line 20: warning: exported function NewTokenProvider should have comment or be unexported (golint)
    • Line 24: warning: exported method TokenProvider.CryptToken should have comment or be unexported (golint)
    • Line 32: warning: exported method TokenProvider.CryptRefreshToken should have comment or be unexported (golint)
    • Line 40: warning: exported method TokenProvider.DecryptToken should have comment or be unexported (golint)
    • Line 52: warning: exported method TokenProvider.DecryptRefreshTokens should have comment or be unexported (golint)
    • Line 80: warning: exported type RC4TokenSecureFormatter should have comment or be unexported (golint)
    • Line 85: warning: exported function NewRC4TokenSecurityProvider should have comment or be unexported (golint)
    • Line 90: warning: exported method RC4TokenSecureFormatter.CryptToken should have comment or be unexported (golint)
    • Line 100: warning: exported method RC4TokenSecureFormatter.DecryptToken should have comment or be unexported (golint)
    • Line 110: warning: exported type SHA256RC4TokenSecureFormatter should have comment or be unexported (golint)
    • Line 115: warning: exported function NewSHA256RC4TokenSecurityProvider should have comment or be unexported (golint)
    • Line 120: warning: exported method SHA256RC4TokenSecureFormatter.CryptToken should have comment or be unexported (golint)
    • Line 134: warning: exported method SHA256RC4TokenSecureFormatter.DecryptToken should have comment or be unexported (golint)
    • oauth/server.go
    • Line 12: warning: exported const TOKEN_TYPE should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported type Any should have comment or be unexported (golint)
    • Line 145: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 169: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 193: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 224: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • oauth/basic.go
    • Line 26: warning: comment on exported function CheckBasicAuthentication should be of the form "CheckBasicAuthentication ..." (golint)
    • Line 31: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign63%

IneffAssign detects ineffectual assignments in Go code.

    • oauth/basic.go
    • Line 3: warning: cannot find package "." in: (ineffassign)
    • Line 3: warning: could not import github.com/gin-gonic/gin (invalid package name: "") (ineffassign)
    • Line 3: warning: could not import github.com/gin-gonic/gin (invalid package name: "") (ineffassign)
    • oauth/server.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/gofrs/uuid (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/gofrs/uuid (invalid package name: "") (ineffassign)
    • oauth/test/resourceserver/main.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/gin-gonic/gin (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/maxzerbini/oauth (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import gopkg.in/gin-contrib/cors.v1 (invalid package name: "") (ineffassign)
    • oauth/test/authserver/main.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/gin-gonic/gin (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/maxzerbini/oauth (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import gopkg.in/gin-contrib/cors.v1 (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!