Preparing report...

Report for github.com/olebedev/when

A+    Excellent!    Found 32 issues across 55 files

Tweet

gofmt96%

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!


gocyclo81%

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.


golint45%

Golint is a linter for Go source code.

    • when/rules/en/en.go
    • Line 5: warning: exported var All should have comment or be unexported (golint)
    • Line 16: warning: exported var WEEKDAY_OFFSET should have comment or be unexported (golint)
    • Line 34: warning: exported var WEEKDAY_OFFSET_PATTERN should have comment or be unexported (golint)
    • Line 36: warning: exported var MONTH_OFFSET should have comment or be unexported (golint)
    • Line 75: warning: exported var MONTH_OFFSET_PATTERN should have comment or be unexported (golint)
    • Line 77: warning: exported var INTEGER_WORDS should have comment or be unexported (golint)
    • Line 92: warning: exported var INTEGER_WORDS_PATTERN should have comment or be unexported (golint)
    • Line 94: warning: exported var ORDINAL_WORDS should have comment or be unexported (golint)
    • Line 169: warning: exported var ORDINAL_WORDS_PATTERN should have comment or be unexported (golint)
    • when/rules/br/br.go
    • Line 5: warning: exported var All should have comment or be unexported (golint)
    • Line 16: warning: exported var WEEKDAY_OFFSET should have comment or be unexported (golint)
    • Line 38: warning: exported var WEEKDAY_OFFSET_PATTERN should have comment or be unexported (golint)
    • Line 40: warning: exported var MONTH_OFFSET should have comment or be unexported (golint)
    • Line 79: warning: exported var MONTH_OFFSET_PATTERN should have comment or be unexported (golint)
    • Line 81: warning: exported var INTEGER_WORDS should have comment or be unexported (golint)
    • Line 98: warning: exported var INTEGER_WORDS_PATTERN should have comment or be unexported (golint)
    • Line 100: warning: exported var ORDINAL_WORDS should have comment or be unexported (golint)
    • Line 264: warning: exported var ORDINAL_WORDS_PATTERN should have comment or be unexported (golint)
    • when/rules/ru/ru.go
    • Line 5: warning: exported var All should have comment or be unexported (golint)
    • Line 14: warning: exported var WEEKDAY_OFFSET should have comment or be unexported (golint)
    • Line 46: warning: exported var WEEKDAY_OFFSET_PATTERN should have comment or be unexported (golint)
    • Line 48: warning: exported var INTEGER_WORDS should have comment or be unexported (golint)
    • Line 67: warning: exported var INTEGER_WORDS_PATTERN should have comment or be unexported (golint)
    • when/rules/rules.go
    • Line 8: warning: exported type Strategy should have comment or be unexported (golint)
    • Line 11: warning: exported const Skip should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type Rule should have comment or be unexported (golint)
    • Line 20: warning: exported type Options should have comment or be unexported (golint)
    • Line 31: warning: exported type Match should have comment or be unexported (golint)
    • Line 41: warning: exported method Match.Apply should have comment or be unexported (golint)
    • Line 45: warning: exported type F should have comment or be unexported (golint)
    • Line 50: warning: exported method F.Find should have comment or be unexported (golint)
    • when/rules/br/past_time.go
    • Line 14: warning: exported function PastTime should have comment or be unexported (golint)
    • Line 28: warning: don't use underscores in Go names; var start_index_for_captures should be startIndexForCaptures (golint)
    • when/rules/context.go
    • Line 5: warning: exported type Context should have comment or be unexported (golint)
    • Line 17: warning: exported method Context.Time should have comment or be unexported (golint)
    • when/rules/sort.go
    • Line 3: warning: exported type MatchByIndex should have comment or be unexported (golint)
    • Line 17: warning: exported type MatchByOrder 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!


misspell96%

Misspell Finds commonly misspelled English words