Preparing report...

Report for github.com/lnquy/cron

A    Great!    Found 55 issues across 61 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!


gocyclo95%

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.

    • cron/parser.go
    • Line 130: warning: cyclomatic complexity 34 of function (*cronParser).normalize() is high (> 15) (gocyclo)
    • cron/locale.go
    • Line 105: warning: cyclomatic complexity 33 of function newLocaleLoader() is high (> 15) (gocyclo)
    • Line 288: warning: cyclomatic complexity 28 of function ParseLocale() is high (> 15) (gocyclo)
    • cron/cron.go
    • Line 112: warning: cyclomatic complexity 21 of function (*ExpressionDescriptor).getTimeOfDayDescription() is high (> 15) (gocyclo)
    • Line 478: warning: cyclomatic complexity 19 of function getSegmentDescription() is high (> 15) (gocyclo)

golint11%

Golint is a linter for Go source code.

    • cron/i18n/sw.go
    • Line 3: warning: comment on exported const Locale_sw should be of the form "Locale_sw ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_sw should be LocaleSw (golint)
    • cron/i18n/sl.go
    • Line 3: warning: comment on exported const Locale_sl should be of the form "Locale_sl ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_sl should be LocaleSl (golint)
    • cron/i18n/pl.go
    • Line 3: warning: comment on exported const Locale_pl should be of the form "Locale_pl ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_pl should be LocalePl (golint)
    • cron/i18n/fr.go
    • Line 3: warning: comment on exported const Locale_fr should be of the form "Locale_fr ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_fr should be LocaleFr (golint)
    • cron/i18n/sk.go
    • Line 3: warning: comment on exported const Locale_sk should be of the form "Locale_sk ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_sk should be LocaleSk (golint)
    • cron/i18n/uk.go
    • Line 3: warning: comment on exported const Locale_uk should be of the form "Locale_uk ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_uk should be LocaleUk (golint)
    • cron/i18n/ro.go
    • Line 3: warning: comment on exported const Locale_ro should be of the form "Locale_ro ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_ro should be LocaleRo (golint)
    • cron/locale.go
    • Line 12: warning: exported const LocaleAll should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: don't use underscores in Go names; const Locale_cs should be LocaleCs (golint)
    • Line 15: warning: don't use underscores in Go names; const Locale_da should be LocaleDa (golint)
    • Line 16: warning: don't use underscores in Go names; const Locale_de should be LocaleDe (golint)
    • Line 17: warning: don't use underscores in Go names; const Locale_en should be LocaleEn (golint)
    • Line 18: warning: don't use underscores in Go names; const Locale_es should be LocaleEs (golint)
    • Line 19: warning: don't use underscores in Go names; const Locale_fa should be LocaleFa (golint)
    • Line 20: warning: don't use underscores in Go names; const Locale_fi should be LocaleFi (golint)
    • Line 21: warning: don't use underscores in Go names; const Locale_fr should be LocaleFr (golint)
    • Line 22: warning: don't use underscores in Go names; const Locale_he should be LocaleHe (golint)
    • Line 23: warning: don't use underscores in Go names; const Locale_it should be LocaleIt (golint)
    • Line 24: warning: don't use underscores in Go names; const Locale_ja should be LocaleJa (golint)
    • Line 25: warning: don't use underscores in Go names; const Locale_ko should be LocaleKo (golint)
    • Line 26: warning: don't use underscores in Go names; const Locale_nb should be LocaleNb (golint)
    • Line 27: warning: don't use underscores in Go names; const Locale_nl should be LocaleNl (golint)
    • Line 28: warning: don't use underscores in Go names; const Locale_pl should be LocalePl (golint)
    • Line 29: warning: don't use underscores in Go names; const Locale_pt_BR should be LocalePtBR (golint)
    • Line 30: warning: don't use underscores in Go names; const Locale_ro should be LocaleRo (golint)
    • Line 31: warning: don't use underscores in Go names; const Locale_ru should be LocaleRu (golint)
    • Line 32: warning: don't use underscores in Go names; const Locale_sk should be LocaleSk (golint)
    • Line 33: warning: don't use underscores in Go names; const Locale_sl should be LocaleSl (golint)
    • Line 34: warning: don't use underscores in Go names; const Locale_sv should be LocaleSv (golint)
    • Line 35: warning: don't use underscores in Go names; const Locale_sw should be LocaleSw (golint)
    • Line 36: warning: don't use underscores in Go names; const Locale_tr should be LocaleTr (golint)
    • Line 37: warning: don't use underscores in Go names; const Locale_uk should be LocaleUk (golint)
    • Line 38: warning: don't use underscores in Go names; const Locale_zh_CN should be LocaleZhCN (golint)
    • Line 39: warning: don't use underscores in Go names; const Locale_zh_TW should be LocaleZhTW (golint)
    • Line 74: warning: exported type LocaleType should have comment or be unexported (golint)
    • Line 75: warning: exported type LocaleKey should have comment or be unexported (golint)
    • Line 93: warning: exported function NewLocaleLoaders should have comment or be unexported (golint)
    • Line 198: warning: exported method LocaleLoader.GetLocaleType should have comment or be unexported (golint)
    • Line 202: warning: exported method LocaleLoader.GetBool should have comment or be unexported (golint)
    • Line 210: warning: exported method LocaleLoader.GetString should have comment or be unexported (golint)
    • Line 218: warning: exported method LocaleLoader.GetSlice should have comment or be unexported (golint)
    • Line 288: warning: exported function ParseLocale should have comment or be unexported (golint)
    • cron/parser.go
    • Line 13: warning: error var InvalidExprError should have name of the form ErrFoo (golint)
    • Line 13: warning: exported var InvalidExprError should have comment or be unexported (golint)
    • Line 14: warning: error var InvalidExprSecondError should have name of the form ErrFoo (golint)
    • Line 15: warning: error var InvalidExprMinuteError should have name of the form ErrFoo (golint)
    • Line 16: warning: error var InvalidExprHourError should have name of the form ErrFoo (golint)
    • Line 17: warning: error var InvalidExprDayOfMonthError should have name of the form ErrFoo (golint)
    • Line 18: warning: error var InvalidExprMonthError should have name of the form ErrFoo (golint)
    • Line 19: warning: error var InvalidExprDayOfWeekError should have name of the form ErrFoo (golint)
    • Line 20: warning: error var InvalidExprYearError should have name of the form ErrFoo (golint)
    • cron/i18n/zh_TW.go
    • Line 3: warning: comment on exported const Locale_zh_TW should be of the form "Locale_zh_TW ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_zh_TW should be LocaleZhTW (golint)
    • cron/i18n/ko.go
    • Line 3: warning: comment on exported const Locale_ko should be of the form "Locale_ko ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_ko should be LocaleKo (golint)
    • cron/i18n/pt_BR.go
    • Line 3: warning: comment on exported const Locale_pt_BR should be of the form "Locale_pt_BR ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_pt_BR should be LocalePtBR (golint)
    • cron/i18n/he.go
    • Line 3: warning: comment on exported const Locale_he should be of the form "Locale_he ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_he should be LocaleHe (golint)
    • cron/i18n/es.go
    • Line 3: warning: comment on exported const Locale_es should be of the form "Locale_es ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_es should be LocaleEs (golint)
    • cron/i18n/fi.go
    • Line 3: warning: comment on exported const Locale_fi should be of the form "Locale_fi ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_fi should be LocaleFi (golint)
    • cron/i18n/tr.go
    • Line 3: warning: comment on exported const Locale_tr should be of the form "Locale_tr ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_tr should be LocaleTr (golint)
    • cron/i18n/da.go
    • Line 3: warning: comment on exported const Locale_da should be of the form "Locale_da ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_da should be LocaleDa (golint)
    • cron/i18n/ru.go
    • Line 3: warning: comment on exported const Locale_ru should be of the form "Locale_ru ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_ru should be LocaleRu (golint)
    • cron/i18n/sv.go
    • Line 3: warning: comment on exported const Locale_sv should be of the form "Locale_sv ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_sv should be LocaleSv (golint)
    • cron/i18n/nb.go
    • Line 3: warning: comment on exported const Locale_nb should be of the form "Locale_nb ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_nb should be LocaleNb (golint)
    • cron/i18n/fa.go
    • Line 3: warning: comment on exported const Locale_fa should be of the form "Locale_fa ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_fa should be LocaleFa (golint)
    • cron/i18n/ja.go
    • Line 3: warning: comment on exported const Locale_ja should be of the form "Locale_ja ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_ja should be LocaleJa (golint)
    • cron/i18n/en.go
    • Line 3: warning: comment on exported const Locale_en should be of the form "Locale_en ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_en should be LocaleEn (golint)
    • cron/i18n/de.go
    • Line 3: warning: comment on exported const Locale_de should be of the form "Locale_de ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_de should be LocaleDe (golint)
    • cron/i18n/nl.go
    • Line 3: warning: comment on exported const Locale_nl should be of the form "Locale_nl ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_nl should be LocaleNl (golint)
    • cron/i18n/it.go
    • Line 3: warning: comment on exported const Locale_it should be of the form "Locale_it ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_it should be LocaleIt (golint)
    • cron/i18n/zh_CN.go
    • Line 3: warning: comment on exported const Locale_zh_CN should be of the form "Locale_zh_CN ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_zh_CN should be LocaleZhCN (golint)
    • cron/i18n/cs.go
    • Line 3: warning: comment on exported const Locale_cs should be of the form "Locale_cs ..." (golint)
    • Line 4: warning: don't use underscores in Go names; const Locale_cs should be LocaleCs (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!