Preparing report...

Report for github.com/jcorry/morellis

A    Great!    Found 14 issues across 23 files

Tweet

gofmt95%

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!


gocyclo100%

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.

No problems detected. Good job!


golint47%

Golint is a linter for Go source code.

    • morellis/pkg/models/mysql/testutils.go
    • Line 16: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 20: warning: exported function NewTestDB should have comment or be unexported (golint)
    • Line 61: warning: exported function NewTestRedis should have comment or be unexported (golint)
    • Line 89: warning: exported type AnyTime should have comment or be unexported (golint)
    • Line 97: warning: exported type AnyInt64 should have comment or be unexported (golint)
    • morellis/pkg/models/mysql/user.go
    • Line 29: warning: exported const DEFAULT_LIMIT should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported var ErrNoAuthTokenFound should have comment or be unexported (golint)
    • Line 152: warning: comment on exported method UserModel.GetByUUID should be of the form "GetByUUID ..." (golint)
    • Line 196: warning: exported method UserModel.GetByCredentials should have comment or be unexported (golint)
    • Line 368: warning: exported method UserModel.GetPermissions should have comment or be unexported (golint)
    • Line 587: warning: comment on exported method UserModel.RemoveUserIngredient should be of the form "RemoveUserIngredient ..." (golint)
    • Line 611: warning: exported method UserModel.CheckValidPermission should have comment or be unexported (golint)
    • Line 626: warning: exported method UserModel.CheckValidUser should have comment or be unexported (golint)
    • Line 640: warning: comment on exported function NormalizePhone should be of the form "NormalizePhone ..." (golint)
    • morellis/pkg/models/models.go
    • Line 15: warning: exported var ErrNoRecord should have comment or be unexported (golint)
    • Line 27: warning: exported type NullString should have comment or be unexported (golint)
    • Line 29: warning: exported method NullString.MarshalJSON should have comment or be unexported (golint)
    • Line 36: warning: exported method NullString.UnmarshalJSON should have comment or be unexported (golint)
    • Line 51: warning: exported method NullString.Scan should have comment or be unexported (golint)
    • Line 80: warning: exported type Ingredient should have comment or be unexported (golint)
    • Line 100: warning: exported type UserIngredient should have comment or be unexported (golint)
    • Line 106: warning: exported type UserPermission should have comment or be unexported (golint)
    • Line 111: warning: exported type Permission should have comment or be unexported (golint)
    • Line 116: warning: exported type UserStatus should have comment or be unexported (golint)
    • Line 119: warning: exported const USER_STATUS_UNVERIFIED should have comment (or a comment on this block) or be unexported (golint)
    • Line 170: warning: exported method Store.AddressString should have comment or be unexported (golint)
    • morellis/pkg/models/repository.go
    • Line 5: warning: comment on exported type UserRepository should be of the form "UserRepository ..." (with optional leading article) (golint)
    • Line 27: warning: comment on exported type StoreRepository should be of the form "StoreRepository ..." (with optional leading article) (golint)
    • Line 39: warning: comment on exported type FlavorRepository should be of the form "FlavorRepository ..." (with optional leading article) (golint)
    • Line 49: warning: comment on exported type IngredientRepository should be of the form "IngredientRepository ..." (with optional leading article) (golint)
    • morellis/cmd/api/helpers.go
    • Line 20: warning: exported type Claims should have comment or be unexported (golint)
    • Line 143: warning: comment on exported function Contains should be of the form "Contains ..." (golint)
    • morellis/cmd/api/middleware.go
    • Line 12: warning: exported var ContextKeyUser should have comment or be unexported (golint)
    • Line 14: warning: exported type PermissionsCheck should have comment or be unexported (golint)
    • Line 19: warning: exported function NewPermissionsCheck should have comment or be unexported (golint)
    • Line 56: warning: should not use basic type string as key in context.WithValue (golint)

license0%

Checks whether your project has a LICENSE file.


ineffassign91%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!