Preparing report...

Report for github.com/zhihu/norm

A+    Excellent!    Found 11 issues across 18 files

Tweet

gofmt94%

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!


golint44%

Golint is a linter for Go source code.

    • norm/constants/constant.go
    • Line 3: warning: exported type Direction should have comment or be unexported (golint)
    • Line 4: warning: exported type Policy should have comment or be unexported (golint)
    • Line 7: warning: comment on exported const DirectionReversely should be of the form "DirectionReversely ..." (golint)
    • Line 9: warning: comment on exported const DirectionBidirect should be of the form "DirectionBidirect ..." (golint)
    • Line 11: warning: exported const StructTagName should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported const PolicyNothing should have comment (or a comment on this block) or be unexported (golint)
    • norm/logger.go
    • Line 7: warning: exported type Logger should have comment or be unexported (golint)
    • Line 9: warning: exported type DefaultLogger should have comment or be unexported (golint)
    • norm/model.go
    • Line 5: warning: comment on exported type IEdge should be of the form "IEdge ..." (with optional leading article) (golint)
    • Line 5: warning: comment on exported type ITag should be of the form "ITag ..." (with optional leading article) (golint)
    • Line 5: warning: comment on exported type IVertex should be of the form "IVertex ..." (with optional leading article) (golint)
    • Line 27: warning: comment on exported type VModel should be of the form "VModel ..." (with optional leading article) (golint)
    • Line 32: warning: exported type EModel should have comment or be unexported (golint)
    • Line 45: warning: exported method VModel.GetPolicy should have comment or be unexported (golint)
    • Line 49: warning: exported method EModel.GetVidSrc should have comment or be unexported (golint)
    • Line 53: warning: exported method EModel.GetVidSrcPolicy should have comment or be unexported (golint)
    • Line 57: warning: exported method EModel.GetVidDst should have comment or be unexported (golint)
    • Line 61: warning: exported method EModel.GetVidDstPolicy should have comment or be unexported (golint)
    • norm/internal/converts/query.go
    • Line 11: warning: error var NilPointError should have name of the form ErrFoo (golint)
    • Line 11: warning: exported var NilPointError should have comment or be unexported (golint)
    • Line 12: warning: error var RecordNotFoundError should have name of the form ErrFoo (golint)
    • norm/dialectors/dialector.go
    • Line 1: warning: package comment should be of the form "Package dialectors ..." (golint)
    • Line 17: warning: exported const DefaultTimeout should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type ResultSet should have comment or be unexported (golint)
    • Line 31: warning: exported type DialectorConfig should have comment or be unexported (golint)
    • Line 43: warning: exported method DialectorConfig.LoadDefault should have comment or be unexported (golint)
    • norm/dialectors/nebula.go
    • Line 1: warning: package comment should be of the form "Package dialectors ..." (golint)
    • Line 20: warning: exported type NebulaDialector should have comment or be unexported (golint)
    • Line 30: warning: exported function NewNebulaDialector should have comment or be unexported (golint)
    • Line 93: warning: exported method NebulaDialector.Close should have comment or be unexported (golint)
    • norm/examples/model.go
    • Line 10: warning: exported type User should have comment or be unexported (golint)
    • Line 15: warning: exported type Answer should have comment or be unexported (golint)
    • Line 20: warning: exported type AnswerVoteUp should have comment or be unexported (golint)
    • Line 31: warning: exported method User.TagName should have comment or be unexported (golint)
    • Line 35: warning: exported method Answer.TagName should have comment or be unexported (golint)
    • Line 44: warning: exported method AnswerVoteUp.EdgeName should have comment or be unexported (golint)
    • norm/api_chainable.go
    • Line 17: warning: exported method DB.From should have comment or be unexported (golint)
    • Line 23: warning: exported method DB.Over should have comment or be unexported (golint)
    • Line 48: warning: exported method DB.Limit should have comment or be unexported (golint)
    • Line 54: warning: exported method DB.Where should have comment or be unexported (golint)
    • Line 60: warning: exported method DB.Yield should have comment or be unexported (golint)
    • norm/config.go
    • Line 3: warning: exported type Config should have comment or be unexported (golint)
    • Line 8: warning: exported method Config.LoadDefault should have comment or be unexported (golint)
    • Line 14: warning: exported type Option should have comment or be unexported (golint)
    • Line 16: warning: exported function WithLogger should have comment or be unexported (golint)
    • norm/norm.go
    • Line 10: warning: exported type DB should have comment or be unexported (golint)
    • Line 50: warning: comment on exported method DB.Close should be of the form "Close ..." (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!