Preparing report...

Report for github.com/shihanng/devto

A+    Excellent!    Found 11 issues across 37 files

Tweet

gofmt97%

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!


gocyclo89%

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.

    • devto/pkg/devto/api_users.go
    • Line 268: warning: cyclomatic complexity 18 of function (*UsersApiService).GetUserPublishedArticles() is high (> 15) (gocyclo)
    • Line 380: warning: cyclomatic complexity 18 of function (*UsersApiService).GetUserUnpublishedArticles() is high (> 15) (gocyclo)
    • Line 44: warning: cyclomatic complexity 18 of function (*UsersApiService).GetUserAllArticles() is high (> 15) (gocyclo)
    • Line 156: warning: cyclomatic complexity 18 of function (*UsersApiService).GetUserArticles() is high (> 15) (gocyclo)
    • devto/pkg/devto/api_articles.go
    • Line 848: warning: cyclomatic complexity 23 of function (*ArticlesApiService).UpdateArticle() is high (> 15) (gocyclo)
    • Line 44: warning: cyclomatic complexity 23 of function (*ArticlesApiService).CreateArticle() is high (> 15) (gocyclo)
    • Line 292: warning: cyclomatic complexity 21 of function (*ArticlesApiService).GetArticles() is high (> 15) (gocyclo)
    • Line 625: warning: cyclomatic complexity 18 of function (*ArticlesApiService).GetUserPublishedArticles() is high (> 15) (gocyclo)
    • Line 401: warning: cyclomatic complexity 18 of function (*ArticlesApiService).GetUserAllArticles() is high (> 15) (gocyclo)
    • Line 513: warning: cyclomatic complexity 18 of function (*ArticlesApiService).GetUserArticles() is high (> 15) (gocyclo)
    • Line 737: warning: cyclomatic complexity 18 of function (*ArticlesApiService).GetUserUnpublishedArticles() is high (> 15) (gocyclo)
    • devto/pkg/devto/api_webhooks.go
    • Line 44: warning: cyclomatic complexity 23 of function (*WebhooksApiService).CreateWebhook() is high (> 15) (gocyclo)
    • Line 279: warning: cyclomatic complexity 18 of function (*WebhooksApiService).GetWebhookById() is high (> 15) (gocyclo)

golint81%

Golint is a linter for Go source code.

    • devto/pkg/config/config.go
    • Line 10: warning: exported type Config should have comment or be unexported (golint)
    • Line 15: warning: exported function New should have comment or be unexported (golint)
    • Line 32: warning: exported method Config.Save should have comment or be unexported (golint)
    • Line 36: warning: exported method Config.ImageLinks should have comment or be unexported (golint)
    • Line 40: warning: exported method Config.SetImageLinks should have comment or be unexported (golint)
    • Line 48: warning: exported method Config.ArticleID should have comment or be unexported (golint)
    • Line 52: warning: exported method Config.SetArticleID should have comment or be unexported (golint)
    • devto/pkg/links/links.go
    • Line 8: warning: exported type GitHub should have comment or be unexported (golint)
    • Line 13: warning: exported function NewGitHub should have comment or be unexported (golint)
    • Line 25: warning: exported method GitHub.Create should have comment or be unexported (golint)
    • devto/pkg/article/article.go
    • Line 15: warning: exported function SetImageLinks should have comment or be unexported (golint)
    • Line 54: warning: exported function GetImageLinks should have comment or be unexported (golint)
    • Line 103: warning: exported function PrefixLinks should have comment or be unexported (golint)
    • devto/pkg/article/client.go
    • Line 1: warning: package comment should be of the form "Package article ..." (golint)
    • Line 29: warning: exported type Client should have comment or be unexported (golint)
    • Line 35: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 48: warning: exported type Option should have comment or be unexported (golint)
    • Line 50: warning: exported function SetConfig should have comment or be unexported (golint)
    • Line 56: warning: exported method Client.SubmitArticle should have comment or be unexported (golint)
    • Line 101: warning: exported method Client.ListArticle should have comment or be unexported (golint)
    • Line 114: warning: exported method Client.GenerateImageLinks 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!


misspell97%

Misspell Finds commonly misspelled English words