Preparing report...

Report for github.com/Laisky/laisky-blog-graphql

(v0.5.1)

A    Great!    Found 10 issues across 12 files

Tweet

gofmt91%

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!


golint25%

Golint is a linter for Go source code.

    • blog/models.go
    • Line 17: warning: exported type BlogDB should have comment or be unexported (golint)
    • Line 21: warning: exported type Post should have comment or be unexported (golint)
    • Line 38: warning: exported type PostInfo should have comment or be unexported (golint)
    • Line 42: warning: exported type User should have comment or be unexported (golint)
    • Line 49: warning: exported type Category should have comment or be unexported (golint)
    • Line 56: warning: exported const DB_NAME should have comment (or a comment on this block) or be unexported (golint)
    • Line 62: warning: exported method User.GetID should have comment or be unexported (golint)
    • Line 66: warning: exported method User.GetPayload should have comment or be unexported (golint)
    • Line 73: warning: exported function NewBlogDB should have comment or be unexported (golint)
    • Line 79: warning: exported method BlogDB.GetPostsCol should have comment or be unexported (golint)
    • Line 82: warning: exported method BlogDB.GetUsersCol should have comment or be unexported (golint)
    • Line 85: warning: exported method BlogDB.GetCategoriesCol should have comment or be unexported (golint)
    • Line 89: warning: exported type BlogPostCfg should have comment or be unexported (golint)
    • Line 95: warning: exported method BlogDB.LoadPosts should have comment or be unexported (golint)
    • Line 95: warning: receiver name t should be consistent with previous receiver name db for BlogDB (golint)
    • Line 122: warning: exported method BlogDB.LoadPostInfo should have comment or be unexported (golint)
    • Line 122: warning: receiver name t should be consistent with previous receiver name db for BlogDB (golint)
    • Line 133: warning: receiver name t should be consistent with previous receiver name db for BlogDB (golint)
    • Line 178: warning: receiver name t should be consistent with previous receiver name db for BlogDB (golint)
    • Line 205: warning: exported const DefaultPostType should have comment or be unexported (golint)
    • Line 233: warning: exported method BlogDB.LoadUserById should have comment or be unexported (golint)
    • Line 233: warning: receiver name t should be consistent with previous receiver name db for BlogDB (golint)
    • Line 246: warning: exported method BlogDB.LoadCategoryById should have comment or be unexported (golint)
    • Line 246: warning: receiver name t should be consistent with previous receiver name db for BlogDB (golint)
    • Line 259: warning: exported method BlogDB.LoadAllCategories should have comment or be unexported (golint)
    • Line 259: warning: receiver name t should be consistent with previous receiver name db for BlogDB (golint)
    • Line 268: warning: exported method BlogDB.LoadCategoryByName should have comment or be unexported (golint)
    • Line 268: warning: receiver name t should be consistent with previous receiver name db for BlogDB (golint)
    • Line 281: warning: exported method BlogDB.LoadCategoryByURL should have comment or be unexported (golint)
    • Line 281: warning: receiver name t should be consistent with previous receiver name db for BlogDB (golint)
    • Line 294: warning: exported method BlogDB.IsNameExists should have comment or be unexported (golint)
    • Line 294: warning: receiver name t should be consistent with previous receiver name db for BlogDB (golint)
    • Line 305: warning: receiver name t should be consistent with previous receiver name db for BlogDB (golint)
    • Line 342: warning: error var IncorrectErr should have name of the form ErrFoo (golint)
    • Line 342: warning: exported var IncorrectErr should have comment or be unexported (golint)
    • Line 344: warning: exported method BlogDB.ValidateLogin should have comment or be unexported (golint)
    • Line 344: warning: receiver name t should be consistent with previous receiver name db for BlogDB (golint)
    • Line 359: warning: exported method BlogDB.UpdatePost should have comment or be unexported (golint)
    • Line 359: warning: receiver name t should be consistent with previous receiver name db for BlogDB (golint)
    • blog/posts.go
    • Line 79: warning: exported function ExtractMenu should have comment or be unexported (golint)
    • model.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 18: warning: exported function DialDB should have comment or be unexported (golint)
    • resolver.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 18: warning: exported type Resolver should have comment or be unexported (golint)
    • Line 20: warning: exported method Resolver.Query should have comment or be unexported (golint)
    • Line 24: warning: exported method Resolver.Mutation should have comment or be unexported (golint)
    • Line 28: warning: exported method Resolver.Tweet should have comment or be unexported (golint)
    • Line 31: warning: exported method Resolver.TwitterUser should have comment or be unexported (golint)
    • Line 34: warning: exported method Resolver.BlogPost should have comment or be unexported (golint)
    • Line 37: warning: exported method Resolver.BlogUser should have comment or be unexported (golint)
    • Line 73: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 89: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • server.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 28: warning: exported function RunServer should have comment or be unexported (golint)
    • Line 53: warning: exported function LoggerMiddleware should have comment or be unexported (golint)
    • twitter/models.go
    • Line 16: warning: exported type TwitterDB should have comment or be unexported (golint)
    • Line 20: warning: exported type Media should have comment or be unexported (golint)
    • Line 25: warning: exported type Entities should have comment or be unexported (golint)
    • Line 29: warning: exported type Tweet should have comment or be unexported (golint)
    • Line 44: warning: exported type User should have comment or be unexported (golint)
    • Line 52: warning: exported const DB_NAME should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: exported function NewTwitterDB should have comment or be unexported (golint)
    • Line 62: warning: exported method TwitterDB.LoadTweetByTwitterID should have comment or be unexported (golint)
    • Line 76: warning: exported type TweetLoadCfg should have comment or be unexported (golint)
    • Line 82: warning: exported method TwitterDB.LoadTweets should have comment or be unexported (golint)
    • models/mongo.go
    • Line 19: warning: exported type DB should have comment or be unexported (golint)
    • Line 25: warning: exported function NewMongoDB should have comment or be unexported (golint)
    • Line 63: warning: exported method DB.GetDB should have comment or be unexported (golint)
    • Line 92: warning: exported method DB.Close should have comment or be unexported (golint)
    • Line 96: warning: exported method DB.GetCol should have comment or be unexported (golint)
    • types/default.go
    • Line 13: warning: exported type Datetime should have comment or be unexported (golint)
    • Line 17: warning: exported const TimeLayout should have comment or be unexported (golint)
    • Line 19: warning: exported function NewDatetimeFromTime should have comment or be unexported (golint)
    • Line 25: warning: exported method Datetime.GetTime should have comment or be unexported (golint)
    • Line 29: warning: exported method Datetime.UnmarshalGQL should have comment or be unexported (golint)
    • Line 41: warning: exported method Datetime.MarshalGQL should have comment or be unexported (golint)
    • Line 47: warning: exported type QuotedString should have comment or be unexported (golint)
    • Line 49: warning: exported method QuotedString.UnmarshalGQL should have comment or be unexported (golint)
    • Line 64: warning: exported method QuotedString.MarshalGQL should have comment or be unexported (golint)
    • Line 70: warning: exported type JSONString should have comment or be unexported (golint)
    • Line 72: warning: exported method JSONString.UnmarshalGQL should have comment or be unexported (golint)
    • Line 87: warning: exported method JSONString.MarshalGQL should have comment or be unexported (golint)
    • auth.go
    • Line 1: warning: don't use an underscore in package name (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!