Preparing report...

Report for github.com/puti-projects/puti

A+    Excellent!    Found 21 issues across 138 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


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!


gocyclo98%

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.

    • puti/internal/admin/dao/post.go
    • Line 245: warning: cyclomatic complexity 23 of function (*Dao).UpdateArticle() is high (> 15) (gocyclo)
    • Line 73: warning: cyclomatic complexity 16 of function (*Dao).CreateArticle() is high (> 15) (gocyclo)

golint88%

Golint is a linter for Go source code.

    • puti/internal/model/post.go
    • Line 10: warning: comment on exported type Post should be of the form "Post ..." (with optional leading article) (golint)
    • Line 31: warning: comment on exported type PostMeta should be of the form "PostMeta ..." (with optional leading article) (golint)
    • Line 67: warning: comment on exported method PostMeta.Create should be of the form "Create ..." (golint)
    • Line 121: warning: comment on exported method Post.CheckSlug should be of the form "CheckSlug ..." (golint)
    • puti/internal/model/knowledgeItem.go
    • Line 16: warning: exported type KnowledgeItem should have comment or be unexported (golint)
    • Line 34: warning: exported type KnowledgeItemContent should have comment or be unexported (golint)
    • Line 108: warning: comment on exported method KnowledgeItem.GetItemContent should be of the form "GetItemContent ..." (golint)
    • puti/internal/admin/dao/post.go
    • Line 32: warning: exported method Dao.GetPostMetaByPostID should have comment or be unexported (golint)
    • Line 601: warning: comment on exported method Dao.GetPostTotalView should be of the form "GetPostTotalView ..." (golint)
    • puti/internal/model/taxonomy.go
    • Line 67: warning: exported method TermTaxonomy.GetColumnByTermID should have comment or be unexported (golint)
    • Line 71: warning: comment on exported method Term.GetByID should be of the form "GetByID ..." (golint)
    • Line 89: warning: exported method Term.Save should have comment or be unexported (golint)
    • Line 93: warning: exported method Term.Update should have comment or be unexported (golint)
    • Line 97: warning: exported method Term.Delete should have comment or be unexported (golint)
    • Line 101: warning: exported method TermTaxonomy.Save should have comment or be unexported (golint)
    • Line 105: warning: exported method TermTaxonomy.Update should have comment or be unexported (golint)
    • Line 109: warning: exported method TermTaxonomy.Delete should have comment or be unexported (golint)
    • Line 120: warning: comment on exported function CheckTaxonomyNameExist should be of the form "CheckTaxonomyNameExist ..." (golint)
    • puti/internal/utils/convert.go
    • Line 10: warning: exported type StrTo should have comment or be unexported (golint)
    • Line 29: warning: comment on exported method StrTo.UInt32 should be of the form "UInt32 ..." (golint)
    • Line 41: warning: comment on exported method StrTo.UInt64 should be of the form "UInt64 ..." (golint)
    • Line 47: warning: comment on exported method StrTo.MustUInt64 should be of the form "MustUInt64 ..." (golint)
    • puti/internal/admin/dao/taxonomy.go
    • Line 31: warning: exported method Dao.CreateTaxonomy should have comment or be unexported (golint)
    • Line 35: warning: exported method Dao.GetTaxonomyByTermID should have comment or be unexported (golint)
    • Line 49: warning: exported method Dao.GetTermTaxonomyByTermID should have comment or be unexported (golint)
    • puti/internal/pkg/config/section.go
    • Line 3: warning: exported type ServerConfig should have comment or be unexported (golint)
    • Line 15: warning: exported type SafetyConfig should have comment or be unexported (golint)
    • Line 19: warning: exported type LogConfig should have comment or be unexported (golint)
    • Line 27: warning: exported type DbConfig 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.


misspell98%

Misspell Finds commonly misspelled English words