Preparing report...

Report for github.com/muonsoft/validation

A+    Excellent!    Found 20 issues across 86 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!


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!


golint76%

Golint is a linter for Go source code.

    • validation/generic/number.go
    • Line 9: warning: exported type Number should have comment or be unexported (golint)
    • Line 16: warning: exported function NewNumber should have comment or be unexported (golint)
    • Line 29: warning: exported function NewNumberFromInt should have comment or be unexported (golint)
    • Line 37: warning: exported function NewNumberFromFloat should have comment or be unexported (golint)
    • Line 45: warning: exported function MustNewNumber should have comment or be unexported (golint)
    • Line 70: warning: exported method Number.IsNil should have comment or be unexported (golint)
    • Line 74: warning: exported method Number.IsZero should have comment or be unexported (golint)
    • Line 84: warning: exported method Number.IsEqualTo should have comment or be unexported (golint)
    • Line 95: warning: exported method Number.IsGreaterThan should have comment or be unexported (golint)
    • Line 106: warning: exported method Number.IsLessThan should have comment or be unexported (golint)
    • validation/it/string.go
    • Line 165: warning: exported method LengthConstraint.ValidateString should have comment or be unexported (golint)
    • Line 279: warning: exported method RegexConstraint.ValidateString should have comment or be unexported (golint)
    • validation/violations.go
    • Line 277: warning: exported method ViolationListElement.Code should have comment or be unexported (golint)
    • Line 281: warning: exported method ViolationListElement.Is should have comment or be unexported (golint)
    • Line 285: warning: exported method ViolationListElement.Message should have comment or be unexported (golint)
    • Line 289: warning: exported method ViolationListElement.MessageTemplate should have comment or be unexported (golint)
    • Line 293: warning: exported method ViolationListElement.Parameters should have comment or be unexported (golint)
    • Line 297: warning: exported method ViolationListElement.PropertyPath should have comment or be unexported (golint)
    • validation/it/iterable.go
    • Line 160: warning: exported method CountConstraint.ValidateIterable should have comment or be unexported (golint)
    • Line 164: warning: exported method CountConstraint.ValidateCountable should have comment or be unexported (golint)
    • validation/it/web.go
    • Line 144: warning: exported method URLConstraint.ValidateString should have comment or be unexported (golint)
    • Line 271: warning: exported method IPConstraint.ValidateString should have comment or be unexported (golint)
    • validation/generic/iterable.go
    • Line 9: warning: exported type Key should have comment or be unexported (golint)
    • Line 19: warning: exported type Iterable should have comment or be unexported (golint)
    • Line 26: warning: exported function NewIterable should have comment or be unexported (golint)
    • validation/it/comparison.go
    • Line 378: warning: exported method NumberComparisonConstraint.ValidateNumber should have comment or be unexported (golint)
    • Line 476: warning: exported method RangeConstraint.ValidateNumber should have comment or be unexported (golint)
    • Line 580: warning: exported method StringComparisonConstraint.ValidateString should have comment or be unexported (golint)
    • Line 720: warning: exported method TimeComparisonConstraint.ValidateTime should have comment or be unexported (golint)
    • Line 809: warning: exported method TimeRangeConstraint.ValidateTime should have comment or be unexported (golint)
    • validation/it/basic.go
    • Line 72: warning: exported method NotBlankConstraint.ValidateNil should have comment or be unexported (golint)
    • Line 80: warning: exported method NotBlankConstraint.ValidateBool should have comment or be unexported (golint)
    • Line 94: warning: exported method NotBlankConstraint.ValidateNumber should have comment or be unexported (golint)
    • Line 108: warning: exported method NotBlankConstraint.ValidateString should have comment or be unexported (golint)
    • Line 122: warning: exported method NotBlankConstraint.ValidateIterable should have comment or be unexported (golint)
    • Line 136: warning: exported method NotBlankConstraint.ValidateCountable should have comment or be unexported (golint)
    • Line 144: warning: exported method NotBlankConstraint.ValidateTime should have comment or be unexported (golint)
    • Line 218: warning: exported method BlankConstraint.ValidateNil should have comment or be unexported (golint)
    • Line 222: warning: exported method BlankConstraint.ValidateBool should have comment or be unexported (golint)
    • Line 230: warning: exported method BlankConstraint.ValidateNumber should have comment or be unexported (golint)
    • Line 238: warning: exported method BlankConstraint.ValidateString should have comment or be unexported (golint)
    • Line 246: warning: exported method BlankConstraint.ValidateIterable should have comment or be unexported (golint)
    • Line 254: warning: exported method BlankConstraint.ValidateCountable should have comment or be unexported (golint)
    • Line 262: warning: exported method BlankConstraint.ValidateTime should have comment or be unexported (golint)
    • Line 329: warning: exported method NotNilConstraint.ValidateNil should have comment or be unexported (golint)
    • Line 337: warning: exported method NotNilConstraint.ValidateNumber should have comment or be unexported (golint)
    • Line 348: warning: exported method NotNilConstraint.ValidateString should have comment or be unexported (golint)
    • Line 359: warning: exported method NotNilConstraint.ValidateTime should have comment or be unexported (golint)
    • Line 370: warning: exported method NotNilConstraint.ValidateIterable should have comment or be unexported (golint)
    • Line 439: warning: exported method NilConstraint.ValidateNil should have comment or be unexported (golint)
    • Line 443: warning: exported method NilConstraint.ValidateNumber should have comment or be unexported (golint)
    • Line 451: warning: exported method NilConstraint.ValidateString should have comment or be unexported (golint)
    • Line 459: warning: exported method NilConstraint.ValidateTime should have comment or be unexported (golint)
    • Line 467: warning: exported method NilConstraint.ValidateIterable should have comment or be unexported (golint)
    • Line 547: warning: exported method BoolConstraint.ValidateBool should have comment or be unexported (golint)
    • validation/validationtest/assert.go
    • Line 14: warning: exported type AssertViolationFunc should have comment or be unexported (golint)
    • Line 16: warning: exported type AssertViolationListFunc should have comment or be unexported (golint)
    • Line 18: warning: exported function AssertIsViolation should have comment or be unexported (golint)
    • Line 33: warning: exported function AssertIsViolationList should have comment or be unexported (golint)
    • validation/generic/errors.go
    • Line 8: warning: exported type NotNumericError should have comment or be unexported (golint)
    • Line 16: warning: exported type NotIterableError 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!