Preparing report...

Report for github.com/yangyuqian/genus

A    Great!    Found 28 issues across 46 files

Tweet

gofmt86%

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!


gocyclo97%

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.

    • genus/planner.go
    • Line 41: warning: cyclomatic complexity 23 of function (*PackagePlanner).Plan() is high (> 15) (gocyclo)

golint54%

Golint is a linter for Go source code.

    • genus/generator/orm/orm.go
    • Line 12: warning: exported type TemplateData should have comment or be unexported (golint)
    • Line 40: warning: exported method TemplateData.Quotes should have comment or be unexported (golint)
    • Line 44: warning: exported method TemplateData.SchemaTable should have comment or be unexported (golint)
    • Line 57: warning: exported type DataOpts should have comment or be unexported (golint)
    • Line 68: warning: exported function BuildSingletonData should have comment or be unexported (golint)
    • Line 100: warning: exported function BuildRepeatableData should have comment or be unexported (golint)
    • genus/generator/orm/schema.go
    • Line 10: warning: exported type Tables should have comment or be unexported (golint)
    • Line 12: warning: exported function NewSchema should have comment or be unexported (golint)
    • Line 16: warning: exported type Schema should have comment or be unexported (golint)
    • Line 42: warning: exported method Schema.Close should have comment or be unexported (golint)
    • Line 65: warning: exported method Schema.CollectTables should have comment or be unexported (golint)
    • Line 87: warning: exported method Schema.SetDriver should have comment or be unexported (golint)
    • Line 127: warning: exported function DeadDriverByName should have comment or be unexported (golint)
    • genus/planner.go
    • Line 13: warning: exported type Planner should have comment or be unexported (golint)
    • Line 15: warning: exported function NewPackagePlanner should have comment or be unexported (golint)
    • Line 23: warning: comment on exported type PackagePlanner should be of the form "PackagePlanner ..." (with optional leading article) (golint)
    • Line 31: warning: exported method PackagePlanner.Perform should have comment or be unexported (golint)
    • Line 41: warning: exported method PackagePlanner.Plan should have comment or be unexported (golint)
    • Line 136: warning: exported function BuildSingletonData should have comment or be unexported (golint)
    • Line 155: warning: exported function BuildRepeatableData should have comment or be unexported (golint)
    • genus/template_group.go
    • Line 11: warning: exported type Imports should have comment or be unexported (golint)
    • Line 20: warning: comment on exported type TemplateGroup should be of the form "TemplateGroup ..." (with optional leading article) (golint)
    • Line 36: warning: exported method TemplateGroup.Render should have comment or be unexported (golint)
    • Line 74: warning: exported method TemplateGroup.RenderPartial should have comment or be unexported (golint)
    • genus/text_helpers.go
    • Line 39: warning: exported method TxtToOne.Uniq should have comment or be unexported (golint)
    • Line 152: warning: exported method TxtToMany.Uniq should have comment or be unexported (golint)
    • genus/spec.go
    • Line 9: warning: exported type SpecExtension should have comment or be unexported (golint)
    • Line 14: warning: exported type Spec should have comment or be unexported (golint)
    • Line 28: warning: exported method Spec.Save should have comment or be unexported (golint)
    • genus/template.go
    • Line 28: warning: comment on exported type Template should be of the form "Template ..." (with optional leading article) (golint)
    • Line 42: warning: comment on exported method Template.SetRawTemplate should be of the form "SetRawTemplate ..." (golint)
    • Line 48: warning: exported method Template.RenderPartial should have comment or be unexported (golint)
    • genus/types/string_slice.go
    • Line 7: warning: exported type StringSlice should have comment or be unexported (golint)
    • Line 9: warning: exported method StringSlice.Uniq should have comment or be unexported (golint)
    • Line 19: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • Line 25: warning: exported method StringSlice.Sort should have comment or be unexported (golint)
    • genus/gohelper.go
    • Line 34: warning: exported var GoHelperFuncs should have comment or be unexported (golint)
    • Line 89: warning: exported function StringWithDefault should have comment or be unexported (golint)
    • Line 97: warning: exported function BoolWithDefault should have comment or be unexported (golint)
    • genus/plan.go
    • Line 3: warning: exported type Plan should have comment or be unexported (golint)
    • Line 7: warning: exported type PlanItem should have comment or be unexported (golint)
    • genus/repeatable_plan.go
    • Line 5: warning: comment on exported type RepeatablePlan should be of the form "RepeatablePlan ..." (with optional leading article) (golint)
    • Line 11: warning: exported method RepeatablePlan.Render should have comment or be unexported (golint)
    • genus/singleton_plan.go
    • Line 12: warning: comment on exported type SingletonPlan should be of the form "SingletonPlan ..." (with optional leading article) (golint)
    • Line 35: warning: exported method SingletonPlan.Render should have comment or be unexported (golint)
    • Line 53: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 120: warning: comment on exported method SingletonPlan.Type should be of the form "Type ..." (golint)
    • genus/types.go
    • Line 3: warning: exported type PlanType should have comment or be unexported (golint)
    • Line 6: warning: exported const SINGLETON should have comment (or a comment on this block) or be unexported (golint)
    • genus/types/plan_type.go
    • Line 3: warning: exported type PlanType should have comment or be unexported (golint)
    • Line 6: warning: exported const SINGLETON should have comment (or a comment on this block) or be unexported (golint)
    • genus/repo.go
    • Line 12: warning: exported function NewRepo should have comment or be unexported (golint)
    • Line 16: warning: comment on exported type Repo should be of the form "Repo ..." (with optional leading article) (golint)
    • Line 32: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 60: warning: comment on exported method Repo.BuildGroup should be of the form "BuildGroup ..." (golint)
    • Line 75: warning: comment on exported method Repo.Lookup should be of the form "Lookup ..." (golint)
    • Line 82: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words