Preparing report...

Report for github.com/picatic/norm

A    Great!    Found 24 issues across 52 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!


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.


golint69%

Golint is a linter for Go source code.

    • norm/field/decimal/dec.go
    • Line 11: warning: exported type Dec should have comment or be unexported (golint)
    • Line 16: warning: exported var Zero should have comment or be unexported (golint)
    • Line 18: warning: exported function New should have comment or be unexported (golint)
    • Line 44: warning: exported method Dec.Mul should have comment or be unexported (golint)
    • Line 51: warning: exported method Dec.Div should have comment or be unexported (golint)
    • Line 63: warning: exported method Dec.Add should have comment or be unexported (golint)
    • Line 72: warning: exported method Dec.Sub should have comment or be unexported (golint)
    • Line 76: warning: exported method Dec.Equals should have comment or be unexported (golint)
    • Line 82: warning: exported method Dec.Greater should have comment or be unexported (golint)
    • Line 88: warning: exported method Dec.Lesser should have comment or be unexported (golint)
    • Line 94: warning: exported method Dec.GreaterEqual should have comment or be unexported (golint)
    • Line 100: warning: exported method Dec.LesserEqual should have comment or be unexported (golint)
    • Line 126: warning: exported method Dec.Abs should have comment or be unexported (golint)
    • Line 140: warning: exported method Dec.Round should have comment or be unexported (golint)
    • Line 155: warning: exported method Dec.Ceil should have comment or be unexported (golint)
    • Line 170: warning: exported method Dec.Floor should have comment or be unexported (golint)
    • Line 203: warning: exported type NullDec should have comment or be unexported (golint)
    • Line 209: warning: exported method NullDec.Scan should have comment or be unexported (golint)
    • Line 244: warning: exported method NullDec.Value should have comment or be unexported (golint)
    • norm/valid.go
    • Line 16: warning: comment on exported type ModelValidator should be of the form "ModelValidator ..." (with optional leading article) (golint)
    • norm/field/time_date.go
    • Line 11: warning: comment on exported type TimeDate should be of the form "TimeDate ..." (with optional leading article) (golint)
    • Line 100: warning: comment on exported type NullTimeDate should be of the form "NullTimeDate ..." (with optional leading article) (golint)
    • norm/field/time_time.go
    • Line 11: warning: comment on exported type TimeTime should be of the form "TimeTime ..." (with optional leading article) (golint)
    • Line 100: warning: comment on exported type NullTimeTime should be of the form "NullTimeTime ..." (with optional leading article) (golint)
    • norm/validate/builders.go
    • Line 12: warning: exported function Nullable should have comment or be unexported (golint)
    • Line 22: warning: exported function NotNullable should have comment or be unexported (golint)
    • Line 26: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 32: warning: exported function Field should have comment or be unexported (golint)
    • Line 90: warning: exported function List should have comment or be unexported (golint)
    • Line 126: warning: exported function IfThen should have comment or be unexported (golint)
    • Line 141: warning: exported function Length should have comment or be unexported (golint)
    • Line 161: warning: exported function All should have comment or be unexported (golint)
    • Line 178: warning: exported function Any should have comment or be unexported (golint)
    • Line 194: warning: exported function First should have comment or be unexported (golint)
    • Line 206: warning: exported function InList should have comment or be unexported (golint)
    • Line 218: warning: exported function NotInList should have comment or be unexported (golint)
    • Line 230: warning: comment on exported function String should be of the form "String ..." (golint)
    • Line 254: warning: exported function GT should have comment or be unexported (golint)
    • Line 270: warning: exported function LT should have comment or be unexported (golint)
    • Line 286: warning: exported function GTE should have comment or be unexported (golint)
    • Line 302: warning: exported function LTE should have comment or be unexported (golint)
    • Line 317: warning: exported function Equals should have comment or be unexported (golint)
    • norm/validate/error.go
    • Line 8: warning: exported var ErrNotString should have comment or be unexported (golint)
    • Line 11: warning: exported type ValidationError should have comment or be unexported (golint)
    • Line 21: warning: exported method ValidationError.AddLocation should have comment or be unexported (golint)
    • Line 32: warning: exported type ValidationErrors should have comment or be unexported (golint)
    • Line 44: warning: exported method ValidationErrors.AddError should have comment or be unexported (golint)
    • Line 56: warning: exported method ValidationErrors.AddLocation should have comment or be unexported (golint)
    • Line 62: warning: exported function Alias should have comment or be unexported (golint)
    • Line 78: warning: exported function NewError should have comment or be unexported (golint)
    • norm/validate/model.go
    • Line 7: warning: exported type ModelValidator should have comment or be unexported (golint)
    • Line 15: warning: exported method MapValidator.Fields should have comment or be unexported (golint)
    • norm/field/decimal.go
    • Line 10: warning: exported type Decimal should have comment or be unexported (golint)
    • Line 17: warning: exported method Decimal.Scan should have comment or be unexported (golint)
    • Line 42: warning: exported method Decimal.Value should have comment or be unexported (golint)
    • Line 47: warning: exported method Decimal.ShadowValue should have comment or be unexported (golint)
    • Line 51: warning: exported method Decimal.IsDirty should have comment or be unexported (golint)
    • Line 55: warning: exported method Decimal.IsSet should have comment or be unexported (golint)
    • Line 59: warning: exported method Decimal.MarshalJSON should have comment or be unexported (golint)
    • Line 63: warning: exported method Decimal.UnmarshalJSON should have comment or be unexported (golint)
    • Line 73: warning: exported type NullDecimal should have comment or be unexported (golint)
    • Line 79: warning: exported method NullDecimal.Scan should have comment or be unexported (golint)
    • Line 96: warning: exported method NullDecimal.Value should have comment or be unexported (golint)
    • Line 104: warning: exported method NullDecimal.ShadowValue should have comment or be unexported (golint)
    • Line 112: warning: exported method NullDecimal.IsDirty should have comment or be unexported (golint)
    • Line 120: warning: exported method NullDecimal.IsSet should have comment or be unexported (golint)
    • Line 124: warning: exported method NullDecimal.MarshalJSON should have comment or be unexported (golint)
    • Line 131: warning: exported method NullDecimal.UnmarshalJSON should have comment or be unexported (golint)
    • norm/field/errors.go
    • Line 9: warning: exported var ErrorUnintializedShadow should have comment or be unexported (golint)
    • Line 13: warning: exported function ErrorCouldNotScan should have comment or be unexported (golint)
    • norm/validate/location.go
    • Line 7: warning: exported type Locationer should have comment or be unexported (golint)
    • Line 11: warning: exported type Index should have comment or be unexported (golint)
    • Line 13: warning: exported method Index.Location should have comment or be unexported (golint)
    • Line 17: warning: exported type EmbeddedLocation should have comment or be unexported (golint)
    • Line 19: warning: exported method EmbeddedLocation.Location should have comment or be unexported (golint)
    • norm/validate/validation.go
    • Line 9: warning: exported type Validator should have comment or be unexported (golint)
    • Line 13: warning: exported type ValidatorFunc should have comment or be unexported (golint)
    • Line 15: warning: exported method ValidatorFunc.Validate should have comment or be unexported (golint)
    • Line 19: warning: exported var Always should have comment or be unexported (golint)
    • Line 23: warning: exported var Never should have comment or be unexported (golint)
    • Line 27: warning: exported var UUID should have comment or be unexported (golint)
    • Line 29: warning: exported var Email should have comment or be unexported (golint)
    • Line 31: warning: exported var URL should have comment or be unexported (golint)
    • norm/examples/http/model.go
    • Line 8: warning: exported type User should have comment or be unexported (golint)
    • Line 15: warning: exported method User.TableName should have comment or be unexported (golint)
    • Line 19: warning: exported method User.PrimaryKeyFieldName should have comment or be unexported (golint)
    • Line 23: warning: exported method User.IsNew should have comment or be unexported (golint)
    • Line 27: warning: exported method User.PrimaryKey should have comment or be unexported (golint)
    • norm/model.go
    • Line 19: warning: error var NameNotFoundErr should have name of the form ErrFoo (golint)
    • Line 19: warning: exported var NameNotFoundErr should have comment or be unexported (golint)
    • Line 157: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)

license0%

Checks whether your project has a LICENSE file.


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words