Preparing report...

Report for github.com/viant/assertly

A    Great!    Found 7 issues across 17 files

Tweet

gofmt82%

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!


gocyclo82%

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.

    • assertly/directive.go
    • Line 196: warning: cyclomatic complexity 36 of function (*Directive).ExtractDirectives() is high (> 15) (gocyclo)
    • Line 379: warning: cyclomatic complexity 20 of function (*Directive).castData() is high (> 15) (gocyclo)
    • assertly/validator.go
    • Line 129: warning: cyclomatic complexity 35 of function assertValue() is high (> 15) (gocyclo)
    • Line 484: warning: cyclomatic complexity 33 of function assertMap() is high (> 15) (gocyclo)
    • Line 403: warning: cyclomatic complexity 26 of function assertFloat() is high (> 15) (gocyclo)
    • Line 657: warning: cyclomatic complexity 22 of function assertSlice() is high (> 15) (gocyclo)

golint70%

Golint is a linter for Go source code.

    • assertly/directive.go
    • Line 10: warning: exported const KeyExistsDirective should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported type AssertPath should have comment or be unexported (golint)
    • Line 33: warning: comment on exported type Directive should be of the form "Directive ..." (with optional leading article) (golint)
    • Line 79: warning: comment on exported method Directive.AddSort should be of the form "AddSort ..." (golint)
    • Line 148: warning: exported method Directive.ApplyKeyCaseInsensitive should have comment or be unexported (golint)
    • Line 195: warning: comment on exported method Directive.ExtractDirectives should be of the form "ExtractDirectives ..." (golint)
    • Line 433: warning: comment on exported method Directive.IsDirectiveValue should be of the form "IsDirectiveValue ..." (golint)
    • Line 500: warning: exported method TestDirective.IndexBy should have comment or be unexported (golint)
    • Line 505: warning: exported function IndexBy should have comment or be unexported (golint)
    • Line 510: warning: exported method TestDirective.TimeFormat should have comment or be unexported (golint)
    • Line 515: warning: exported function TimeFormat should have comment or be unexported (golint)
    • Line 520: warning: exported method TestDirective.TimeLayout should have comment or be unexported (golint)
    • Line 525: warning: exported function TimeLayout should have comment or be unexported (golint)
    • Line 530: warning: exported method TestDirective.KeyCaseSensitive should have comment or be unexported (golint)
    • Line 535: warning: exported method TestDirective.Cast should have comment or be unexported (golint)
    • Line 540: warning: exported method TestDirective.SortText should have comment or be unexported (golint)
    • assertly/failure.go
    • Line 21: warning: exported method Failure.Index should have comment or be unexported (golint)
    • Line 51: warning: exported method Failure.LeafKey should have comment or be unexported (golint)
    • Line 92: warning: exported function FormatMessage should have comment or be unexported (golint)
    • assertly/validator.go
    • Line 19: warning: exported const MissingEntryViolation should have comment (or a comment on this block) or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign88%

IneffAssign detects ineffectual assignments in Go code.


misspell94%

Misspell Finds commonly misspelled English words