Preparing report...

Report for github.com/komfy/api

(v0.0.0-20200607162217-4274f6da7cca)

A+    Excellent!    Found 24 issues across 41 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!


golint51%

Golint is a linter for Go source code.

    • internal/sign/Transport.go
    • Line 7: warning: exported type Transport should have comment or be unexported (golint)
    • Line 15: warning: exported function CreateErrorTransport should have comment or be unexported (golint)
    • Line 22: warning: exported function CreateUserTransport should have comment or be unexported (golint)
    • Line 29: warning: exported function CreateBoolTransport should have comment or be unexported (golint)
    • Line 36: warning: exported function CreateJWTTransport should have comment or be unexported (golint)
    • internal/database/entity.go
    • Line 7: warning: exported function GetEntityByID should have comment or be unexported (golint)
    • Line 23: warning: exported function GetAllEntitiesFromUser should have comment or be unexported (golint)
    • Line 42: warning: exported function GetAssetsForEntity should have comment or be unexported (golint)
    • Line 58: warning: exported function IsEntityLikedBy should have comment or be unexported (golint)
    • Line 65: warning: exported function GetLastNEntities should have comment or be unexported (golint)
    • Line 80: warning: exported function GetEntitiesByAnswerOf should have comment or be unexported (golint)
    • internal/database/main.go
    • Line 8: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 13: warning: exported function InitializeDatabaseInstance should have comment or be unexported (golint)
    • Line 41: warning: exported method KomfyDB.Close should have comment or be unexported (golint)
    • internal/database/user.go
    • Line 7: warning: exported function IsValidUser should have comment or be unexported (golint)
    • Line 17: warning: exported function AddUser should have comment or be unexported (golint)
    • Line 34: warning: exported function DeleteUser should have comment or be unexported (golint)
    • Line 45: warning: exported function GetUserByName should have comment or be unexported (golint)
    • Line 62: warning: exported function GetUserByID should have comment or be unexported (golint)
    • Line 78: warning: exported function GetUserSettings should have comment or be unexported (golint)
    • Line 88: warning: exported function UpdateCheck should have comment or be unexported (golint)
    • internal/graphql/resolve.go
    • Line 106: warning: exported method UserResolver.AvatarUrl should have comment or be unexported (golint)
    • Line 125: warning: exported method UserResolver.Nsfw should have comment or be unexported (golint)
    • Line 129: warning: exported method UserResolver.Settings should have comment or be unexported (golint)
    • Line 134: warning: exported type UserSettingsResolver should have comment or be unexported (golint)
    • Line 136: warning: exported method UserSettingsResolver.ShowNsfw should have comment or be unexported (golint)
    • Line 139: warning: exported method UserSettingsResolver.ShowLikes should have comment or be unexported (golint)
    • Line 142: warning: exported method UserSettingsResolver.NsfwPage should have comment or be unexported (golint)
    • internal/jwt/main.go
    • Line 12: warning: exported function Create should have comment or be unexported (golint)
    • Line 28: warning: exported function IsValid should have comment or be unexported (golint)
    • internal/error/utils.go
    • Line 15: warning: exported function ShowOnBrowser should have comment or be unexported (golint)
    • Line 22: warning: exported function SendJSON should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell92%

Misspell Finds commonly misspelled English words

    • server.go
    • Line 93: warning: "occured" is a misspelling of "occurred" (misspell)
    • internal/error/custom.go
    • Line 12: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 34: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 36: warning: "occured" is a misspelling of "occurred" (misspell)