Preparing report...

Report for github.com/gobeam/golang-oauth

A    Great!    Found 17 issues across 27 files

Tweet

gofmt88%

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!


gocyclo96%

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.


golint40%

Golint is a linter for Go source code.

    • golang-oauth/example/routers/routers.go
    • Line 10: warning: exported var Router should have comment or be unexported (golint)
    • Line 16: warning: exported function ResourceFulRouter should have comment or be unexported (golint)
    • Line 24: warning: exported function SetupRouter should have comment or be unexported (golint)
    • golang-oauth/example/common/validate.go
    • Line 11: warning: exported type ValidatorRegister should have comment or be unexported (golint)
    • Line 15: warning: exported function NewValidatorRegister should have comment or be unexported (golint)
    • Line 19: warning: exported method ValidatorRegister.RegisterValidator should have comment or be unexported (golint)
    • golang-oauth/example/middlewares/oauthMiddleware.go
    • Line 27: warning: exported const InvalidClient should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported type PasswordCredential should have comment or be unexported (golint)
    • Line 47: warning: exported type RefreshTokenCredential should have comment or be unexported (golint)
    • Line 54: warning: exported type AccessTokenPayload should have comment or be unexported (golint)
    • Line 60: warning: exported type Profile should have comment or be unexported (golint)
    • Line 66: warning: exported type GrantType should have comment or be unexported (golint)
    • Line 70: warning: exported type Tokens should have comment or be unexported (golint)
    • Line 74: warning: exported method RefreshTokenCredential.GetScope should have comment or be unexported (golint)
    • Line 78: warning: exported method PasswordCredential.GetScope should have comment or be unexported (golint)
    • Line 100: warning: comment on exported function OauthMiddleware should be of the form "OauthMiddleware ..." (golint)
    • Line 157: warning: comment on exported function AccessToken should be of the form "AccessToken ..." (golint)
    • golang-oauth/example/core/models/category.go
    • Line 3: warning: exported type Category should have comment or be unexported (golint)
    • Line 11: warning: exported type Categories should have comment or be unexported (golint)
    • Line 13: warning: exported method Category.FindById should have comment or be unexported (golint)
    • Line 17: warning: exported method Categories.Get should have comment or be unexported (golint)
    • Line 21: warning: exported method Category.Create should have comment or be unexported (golint)
    • Line 25: warning: exported method Category.Update should have comment or be unexported (golint)
    • Line 29: warning: exported method Category.Delete should have comment or be unexported (golint)
    • golang-oauth/example/core/models/user.go
    • Line 3: warning: exported type User should have comment or be unexported (golint)
    • Line 10: warning: exported method User.FindById should have comment or be unexported (golint)
    • Line 14: warning: exported method User.FindByEmail should have comment or be unexported (golint)
    • Line 18: warning: exported method User.Create should have comment or be unexported (golint)
    • golang-oauth/example/controllers/controller.go
    • Line 8: warning: exported type ResourceController should have comment or be unexported (golint)
    • Line 16: warning: exported type Controller should have comment or be unexported (golint)
    • Line 34: warning: exported method Controller.Deleted should have comment or be unexported (golint)
    • Line 43: warning: exported method Controller.SuccessResponse should have comment or be unexported (golint)
    • Line 47: warning: exported method Controller.ErrorResponse should have comment or be unexported (golint)
    • golang-oauth/example/controllers/postController.go
    • Line 20: warning: exported type PostController should have comment or be unexported (golint)
    • Line 24: warning: exported function NewPostController should have comment or be unexported (golint)
    • Line 28: warning: exported type PostValidate should have comment or be unexported (golint)
    • Line 36: warning: exported type PostValidateUpdate should have comment or be unexported (golint)
    • Line 187: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • golang-oauth/example/core/models/postCategory.go
    • Line 3: warning: exported type PostCategory should have comment or be unexported (golint)
    • Line 9: warning: exported type PostCategories should have comment or be unexported (golint)
    • Line 11: warning: exported method PostCategory.Create should have comment or be unexported (golint)
    • Line 15: warning: exported method PostCategories.GetByPostId should have comment or be unexported (golint)
    • golang-oauth/example/core/models/posts.go
    • Line 3: warning: exported type Post should have comment or be unexported (golint)
    • Line 17: warning: exported type Posts should have comment or be unexported (golint)
    • Line 19: warning: exported method Post.FindById should have comment or be unexported (golint)
    • Line 23: warning: exported method Post.Create should have comment or be unexported (golint)
    • Line 27: warning: exported method Posts.Get should have comment or be unexported (golint)
    • Line 31: warning: exported method Post.Update should have comment or be unexported (golint)
    • Line 35: warning: exported method Post.Delete should have comment or be unexported (golint)
    • Line 39: warning: exported method Post.AssignCategory should have comment or be unexported (golint)
    • golang-oauth/example/controllers/authController.go
    • Line 12: warning: exported type AuthController should have comment or be unexported (golint)
    • Line 17: warning: exported function NewAuthController should have comment or be unexported (golint)
    • Line 21: warning: exported method AuthController.Register should have comment or be unexported (golint)
    • Line 33: warning: exported method AuthController.Client should have comment or be unexported (golint)
    • Line 42: warning: exported method AuthController.Token should have comment or be unexported (golint)
    • Line 52: warning: exported method AuthController.Profile 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!