Preparing report...

Report for github.com/luk4z7/gerbo

(v1.0.1)

D    Needs lots of improvement    Found 24 issues across 23 files

Tweet

gofmt17%

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!


golint8%

Golint is a linter for Go source code.

    • src/middleware-jwt/core/redis/redis_cli.go
    • Line 5: warning: package comment should be of the form "Package redis ..." (golint)
    • Line 12: warning: exported type RedisCli should have comment or be unexported (golint)
    • Line 18: warning: exported function Connect should have comment or be unexported (golint)
    • Line 30: warning: exported method RedisCli.SetValue should have comment or be unexported (golint)
    • Line 38: warning: exported method RedisCli.GetValue should have comment or be unexported (golint)
    • src/gerbo/lib/validation/validation.go
    • Line 5: warning: package comment should be of the form "Package validation ..." (golint)
    • Line 22: warning: comment on exported function MustBeNotEmpty should be of the form "MustBeNotEmpty ..." (golint)
    • Line 49: warning: exported function InArrayInteger should have comment or be unexported (golint)
    • Line 62: warning: exported function InArrayString should have comment or be unexported (golint)
    • src/gerbo/lib/sql/sql.go
    • Line 5: warning: package comment should be of the form "Package sql ..." (golint)
    • Line 10: warning: comment on exported function NewNullString should be of the form "NewNullString ..." (golint)
    • Line 21: warning: exported function CheckNullString should have comment or be unexported (golint)
    • Line 28: warning: comment on exported function NewNullInt64 should be of the form "NewNullInt64 ..." (golint)
    • src/gerbo/services/movie/movie.go
    • Line 18: warning: exported type MaxMin should have comment or be unexported (golint)
    • Line 23: warning: exported function Insert should have comment or be unexported (golint)
    • Line 31: warning: exported function CheckAndGet should have comment or be unexported (golint)
    • Line 58: warning: exported function Get should have comment or be unexported (golint)
    • src/middleware-jwt/controllers/movie/movie.go
    • Line 17: warning: exported function BestMovies should have comment or be unexported (golint)
    • Line 52: warning: exported function ProcessRequest should have comment or be unexported (golint)
    • Line 56: warning: exported function ProcessResponse should have comment or be unexported (golint)
    • Line 99: warning: exported function MoviesDistributionPerDecade should have comment or be unexported (golint)
    • src/gerbo/core/drive/mongo/mongo.go
    • Line 5: warning: package comment should be of the form "Package mongo ..." (golint)
    • Line 13: warning: exported const Host should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported function GetSession should have comment or be unexported (golint)
    • Line 39: warning: exported function GetDB should have comment or be unexported (golint)
    • src/gerbo/lib/error/error.go
    • Line 5: warning: package comment should be of the form "Package error ..." (golint)
    • Line 13: warning: exported type ErrorsAPI should have comment or be unexported (golint)
    • Line 19: warning: exported type Errors should have comment or be unexported (golint)
    • Line 25: warning: exported type Err should have comment or be unexported (golint)
    • Line 33: warning: comment on exported function Check should be of the form "Check ..." (golint)
    • Line 44: warning: exported function CatchPanic should have comment or be unexported (golint)
    • src/middleware-jwt/services/movie/movie.go
    • Line 13: warning: exported type DistributionPerDecade should have comment or be unexported (golint)
    • Line 17: warning: exported type DataYears should have comment or be unexported (golint)
    • Line 22: warning: comment on exported function GetBestMovies should be of the form "GetBestMovies ..." (golint)
    • Line 56: warning: comment on exported function GetBestMoviesGenres should be of the form "GetBestMoviesGenres ..." (golint)
    • Line 89: warning: comment on exported function GetMoreMoviesGenre should be of the form "GetMoreMoviesGenre ..." (golint)
    • Line 109: warning: comment on exported function GetMoviesRatingPerGenre should be of the form "GetMoviesRatingPerGenre ..." (golint)
    • Line 158: warning: comment on exported function GetMoviesRatingPerYear should be of the form "GetMoviesRatingPerYear ..." (golint)
    • Line 207: warning: comment on exported function GetMoviesDistributionPerYear should be of the form "GetMoviesDistributionPerYear ..." (golint)
    • Line 246: warning: comment on exported function GetMoviesDistributionPerDecade should be of the form "GetMoviesDistributionPerDecade ..." (golint)
    • src/gerbo/lib/logs/logs.go
    • Line 5: warning: package comment should be of the form "Package logs ..." (golint)
    • Line 15: warning: exported var INFO should have comment or be unexported (golint)
    • Line 20: warning: exported function Start should have comment or be unexported (golint)
    • src/gerbo/core/drive/sqlite/sqlite.go
    • Line 5: warning: package comment should be of the form "Package sqlite ..." (golint)
    • Line 10: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 19: warning: exported function GetDB should have comment or be unexported (golint)
    • src/middleware-jwt/settings/settings.go
    • Line 5: warning: package comment should be of the form "Package settings ..." (golint)
    • Line 21: warning: exported type Settings should have comment or be unexported (golint)
    • Line 30: warning: exported function Init should have comment or be unexported (golint)
    • Line 39: warning: exported function LoadSettingsByEnv should have comment or be unexported (golint)
    • Line 51: warning: exported function GetEnvironment should have comment or be unexported (golint)
    • Line 55: warning: exported function Get should have comment or be unexported (golint)
    • Line 62: warning: exported function IsTestEnvironment should have comment or be unexported (golint)
    • src/middleware-jwt/core/authentication/jwt_backend.go
    • Line 5: warning: package comment should be of the form "Package authentication ..." (golint)
    • Line 20: warning: exported type JWTAuthenticationBackend should have comment or be unexported (golint)
    • Line 32: warning: comment on exported function InitJWTAuthenticationBackend should be of the form "InitJWTAuthenticationBackend ..." (golint)
    • Line 44: warning: exported method JWTAuthenticationBackend.GenerateToken should have comment or be unexported (golint)
    • Line 73: warning: exported method JWTAuthenticationBackend.Logout should have comment or be unexported (golint)
    • Line 79: warning: exported method JWTAuthenticationBackend.IsInBlacklist should have comment or be unexported (golint)
    • src/middleware-jwt/core/response/response.go
    • Line 5: warning: package comment should be of the form "Package response ..." (golint)
    • Line 14: warning: exported type Body should have comment or be unexported (golint)
    • Line 20: warning: exported type Meta should have comment or be unexported (golint)
    • Line 27: warning: exported type Pagination should have comment or be unexported (golint)
    • Line 31: warning: exported type Headers should have comment or be unexported (golint)
    • Line 33: warning: comment on exported function Header should be of the form "Header ..." (golint)
    • Line 46: warning: exported function Envelope should have comment or be unexported (golint)

license0%

Checks whether your project has a LICENSE file.


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!