Preparing report...

Report for github.com/xiya-team/helpers

A    Great!    Found 43 issues across 71 files

Tweet

gofmt57%

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!


gocyclo97%

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.

    • helpers/helpers.go
    • Line 823: warning: cyclomatic complexity 75 of function VersionCompare() is high (> 15) (gocyclo)
    • Line 608: warning: cyclomatic complexity 18 of function System() is high (> 15) (gocyclo)
    • Line 56: warning: cyclomatic complexity 17 of function Wordwrap() is high (> 15) (gocyclo)
    • helpers/url.go
    • Line 15: warning: cyclomatic complexity 39 of function ParseStr() is high (> 15) (gocyclo)

golint66%

Golint is a linter for Go source code.

    • helpers/array_column.go
    • Line 18: warning: exported function ArrayColumnRetArrayString should have comment or be unexported (golint)
    • Line 29: warning: exported function ArrayColumnMapStringStringRetArrayString should have comment or be unexported (golint)
    • helpers/array_key_first.go
    • Line 3: warning: comment on exported function ArrayKeyFirst should be of the form "ArrayKeyFirst ..." (golint)
    • Line 11: warning: should omit 2nd value from range; this loop is equivalent to `for key := range ...` (golint)
    • helpers/array_key_last.go
    • Line 6: warning: comment on exported function ArrayKeyLast should be of the form "ArrayKeyLast ..." (golint)
    • Line 15: warning: should omit 2nd value from range; this loop is equivalent to `for key := range ...` (golint)
    • helpers/array_merge.go
    • Line 16: warning: comment on exported function ArrayMergeString should be of the form "ArrayMergeString ..." (golint)
    • Line 21: warning: exported function MapMerge should have comment or be unexported (golint)
    • Line 30: warning: exported function MapMergeString should have comment or be unexported (golint)
    • Line 39: warning: exported function MapMergeKeyInterface should have comment or be unexported (golint)
    • helpers/file_exists.go
    • Line 7: warning: exported function FileExits should have comment or be unexported (golint)
    • Line 14: warning: exported function FileExitsDetail should have comment or be unexported (golint)
    • helpers/init.go
    • Line 7: warning: exported var FORMAT_DATE should have comment or be unexported (golint)
    • helpers/strtotime.go
    • Line 12: warning: comment on exported function StrToTime should be of the form "StrToTime ..." (golint)
    • Line 17: warning: comment on exported function StrToTimeDateTime should be of the form "StrToTimeDateTime ..." (golint)
    • Line 22: warning: comment on exported function StrToTimeDate should be of the form "StrToTimeDate ..." (golint)
    • helpers/datetime.go
    • Line 11: warning: comment on exported function Datetime should be of the form "Datetime ..." (golint)
    • Line 16: warning: comment on exported function DatetimeNow should be of the form "DatetimeNow ..." (golint)
    • Line 21: warning: comment on exported function DatetimeToday should be of the form "DatetimeToday ..." (golint)
    • Line 26: warning: comment on exported function DatetimeTomorrow should be of the form "DatetimeTomorrow ..." (golint)
    • Line 31: warning: comment on exported function DatetimeDaysafter should be of the form "DatetimeDaysafter ..." (golint)
    • Line 36: warning: comment on exported function DatetimeDaysbefore should be of the form "DatetimeDaysbefore ..." (golint)
    • Line 41: warning: comment on exported function DatetimeHoursafter should be of the form "DatetimeHoursafter ..." (golint)
    • Line 46: warning: comment on exported function DatetimeHoursbefore should be of the form "DatetimeHoursbefore ..." (golint)
    • Line 51: warning: comment on exported function DatetimeMinutesafter should be of the form "DatetimeMinutesafter ..." (golint)
    • Line 56: warning: comment on exported function DatetimeMinutesbefore should be of the form "DatetimeMinutesbefore ..." (golint)
    • Line 61: warning: comment on exported function DatetimeAfter should be of the form "DatetimeAfter ..." (golint)
    • Line 66: warning: comment on exported function DatetimeBefore should be of the form "DatetimeBefore ..." (golint)
    • helpers/stringval.go
    • Line 8: warning: exported function Stringval should have comment or be unexported (golint)
    • Line 22: warning: comment on exported function UnderlineStringToCamel should be of the form "UnderlineStringToCamel ..." (golint)
    • Line 52: warning: comment on exported function CamelStringToUnderline should be of the form "CamelStringToUnderline ..." (golint)
    • Line 78: warning: comment on exported function MapUnderlineStringToCamel should be of the form "MapUnderlineStringToCamel ..." (golint)
    • Line 91: warning: comment on exported function MapCamelStringToUnderline should be of the form "MapCamelStringToUnderline ..." (golint)
    • helpers/substr_compare.go
    • Line 7: warning: comment on exported function SubstrCompare should be of the form "SubstrCompare ..." (golint)
    • Line 8: warning: don't use underscores in Go names; func parameter main_str should be mainStr (golint)
    • helpers/array_keys.go
    • Line 15: warning: comment on exported function ArrayKeysInt should be of the form "ArrayKeysInt ..." (golint)
    • Line 18: warning: should omit 2nd value from range; this loop is equivalent to `for key := range ...` (golint)
    • Line 26: warning: comment on exported function ArrayKeysInterface should be of the form "ArrayKeysInterface ..." (golint)
    • Line 29: warning: should omit 2nd value from range; this loop is equivalent to `for key := range ...` (golint)
    • helpers/doc.go
    • Line 5: warning: package comment should be of the form "Package helpers ..." (golint)
    • helpers/url.go
    • Line 15: warning: exported function ParseStr should have comment or be unexported (golint)
    • helpers/array_search.go
    • Line 7: warning: exported function ArraySearchString should have comment or be unexported (golint)
    • Line 19: warning: exported function ArraySearch should have comment or be unexported (golint)
    • helpers/date.go
    • Line 12: warning: comment on exported function Date should be of the form "Date ..." (golint)
    • Line 17: warning: comment on exported function DateNow should be of the form "DateNow ..." (golint)
    • Line 22: warning: comment on exported function DateToday should be of the form "DateToday ..." (golint)
    • Line 27: warning: comment on exported function DateTomorrow should be of the form "DateTomorrow ..." (golint)
    • Line 32: warning: comment on exported function DateDaysafter should be of the form "DateDaysafter ..." (golint)
    • Line 37: warning: comment on exported function DateDaysbefore should be of the form "DateDaysbefore ..." (golint)
    • Line 42: warning: comment on exported function DateHoursafter should be of the form "DateHoursafter ..." (golint)
    • Line 47: warning: comment on exported function DateHoursbefore should be of the form "DateHoursbefore ..." (golint)
    • Line 52: warning: comment on exported function Date_minutesafter should be of the form "Date_minutesafter ..." (golint)
    • Line 53: warning: don't use underscores in Go names; func Date_minutesafter should be DateMinutesafter (golint)
    • Line 57: warning: comment on exported function DateMinutesbefore should be of the form "DateMinutesbefore ..." (golint)
    • Line 62: warning: comment on exported function DateAfter should be of the form "DateAfter ..." (golint)
    • Line 67: warning: comment on exported function DateBefore should be of the form "DateBefore ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.

    • helpers/array_keys_test.go
    • Line 13: warning: cannot use input (variable of type map[string]interface{}) as map[interface{}]interface{} value in argument to ArrayKeys (ineffassign)
    • Line 14: warning: cannot use output (variable of type []interface{}) as []string value in argument to sort.Strings (ineffassign)
    • helpers/file_put_contents_test.go
    • Line 8: warning: cannot use input (variable of type []byte) as string value in argument to FilePutContents (ineffassign)
    • Line 8: warning: too few arguments in call to FilePutContents (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!