Preparing report...

Report for github.com/ns1/jsonschema2go

A+    Excellent!    Found 14 issues across 33 files

Tweet

gofmt90%

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!


gocyclo87%

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.


golint66%

Golint is a linter for Go source code.

    • jsonschema2go/internal/validator/validator.go
    • Line 15: warning: exported var SubschemaValidator should have comment or be unexported (golint)
    • Line 17: warning: exported type Validator should have comment or be unexported (golint)
    • Line 24: warning: exported function Validators should have comment or be unexported (golint)
    • Line 184: warning: exported method Validator.Var should have comment or be unexported (golint)
    • Line 190: warning: exported method Validator.Test should have comment or be unexported (golint)
    • Line 196: warning: exported method Validator.Sprintf should have comment or be unexported (golint)
    • Line 202: warning: exported method Validator.NameSpace should have comment or be unexported (golint)
    • Line 226: warning: exported function TemplateStr should have comment or be unexported (golint)
    • Line 229: warning: exported function Sorted should have comment or be unexported (golint)
    • jsonschema2go/internal/crawl/crawl.go
    • Line 12: warning: exported function Crawl should have comment or be unexported (golint)
    • Line 89: warning: exported type SimpleHelper should have comment or be unexported (golint)
    • Line 95: warning: exported method SimpleHelper.Dep should have comment or be unexported (golint)
    • Line 101: warning: exported method SimpleHelper.DetectGoBaseType should have comment or be unexported (golint)
    • Line 135: warning: exported method SimpleHelper.DetectSimpleType should have comment or be unexported (golint)
    • Line 171: warning: exported method SimpleHelper.ErrSimpleTypeUnknown should have comment or be unexported (golint)
    • jsonschema2go/internal/planning/planner.go
    • Line 22: warning: exported var Composite should have comment or be unexported (golint)
    • Line 33: warning: exported type CompositePlanner should have comment or be unexported (golint)
    • Line 35: warning: exported method CompositePlanner.Plan should have comment or be unexported (golint)
    • Line 87: warning: exported function NewNamer should have comment or be unexported (golint)
    • Line 95: warning: exported type Namer should have comment or be unexported (golint)
    • Line 99: warning: exported method Namer.JSONPropertyExported should have comment or be unexported (golint)
    • Line 150: warning: exported var DefaultTyper should have comment or be unexported (golint)
    • Line 158: warning: exported function DefaultTypeFunc should have comment or be unexported (golint)
    • Line 166: warning: exported function MakeTypeFromID should have comment or be unexported (golint)
    • Line 180: warning: exported type Typer should have comment or be unexported (golint)
    • Line 194: warning: exported var ErrUnknownType should have comment or be unexported (golint)
    • Line 196: warning: exported method Typer.TypeInfo should have comment or be unexported (golint)
    • Line 204: warning: exported method Typer.TypeInfoHinted should have comment or be unexported (golint)
    • Line 214: warning: exported method Typer.Primitive should have comment or be unexported (golint)
    • Line 218: warning: exported function TypeFromId should have comment or be unexported (golint)
    • Line 252: warning: exported function PrefixMapper should have comment or be unexported (golint)
    • jsonschema2go/internal/print/printer.go
    • Line 15: warning: exported type Printer should have comment or be unexported (golint)
    • Line 19: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 57: warning: exported type Plans should have comment or be unexported (golint)
    • jsonschema2go/pkg/gen/gotypes.go
    • Line 3: warning: exported type GoBaseType should have comment or be unexported (golint)
    • Line 6: warning: exported const GoUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported method GoBaseType.ReferenceType should have comment or be unexported (golint)
    • Line 22: warning: exported method GoBaseType.ScalarType should have comment or be unexported (golint)
    • jsonschema2go/internal/tuple/plan_tuple.go
    • Line 14: warning: exported type TuplePlan should have comment or be unexported (golint)
    • Line 22: warning: comment on exported method TuplePlan.Execute should be of the form "Execute ..." (golint)
    • Line 29: warning: exported method TuplePlan.ArrayLength should have comment or be unexported (golint)
    • Line 33: warning: exported method TuplePlan.Type should have comment or be unexported (golint)
    • Line 37: warning: exported method TuplePlan.Deps should have comment or be unexported (golint)
    • Line 52: warning: exported method TuplePlan.ID should have comment or be unexported (golint)
    • Line 59: warning: exported method TuplePlan.ValidateInitialize should have comment or be unexported (golint)
    • Line 70: warning: exported type TupleItem should have comment or be unexported (golint)
    • Line 76: warning: exported method TupleItem.Validators should have comment or be unexported (golint)
    • Line 80: warning: exported function PlanTuple should have comment or be unexported (golint)
    • Line 132: warning: exported type TuplePlanContext should have comment or be unexported (golint)
    • Line 137: warning: exported type EnrichedTupleItem should have comment or be unexported (golint)
    • Line 143: warning: exported method EnrichedTupleItem.Comment should have comment or be unexported (golint)
    • Line 147: warning: exported method EnrichedTupleItem.NameSpace should have comment or be unexported (golint)
    • Line 157: warning: exported method TuplePlanContext.Comment should have comment or be unexported (golint)
    • Line 161: warning: exported method TuplePlanContext.Items should have comment or be unexported (golint)
    • jsonschema2go/pkg/gen/schema.go
    • Line 89: warning: exported method BoolOrSchema.Present should have comment or be unexported (golint)
    • Line 110: warning: exported method ItemsField.Present should have comment or be unexported (golint)
    • Line 133: warning: comment on exported method TagMap.Unmarshal should be of the form "Unmarshal ..." (golint)
    • jsonschema2go/internal/mapobj/map.go
    • Line 16: warning: exported function PlanMap should have comment or be unexported (golint)
    • Line 77: warning: exported method MapPlan.Type should have comment or be unexported (golint)
    • Line 81: warning: exported method MapPlan.Deps should have comment or be unexported (golint)
    • Line 89: warning: exported method MapPlan.Execute 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!