Preparing report...

Report for github.com/alanxoc3/ttrack

B    Not bad!    Found 7 issues across 9 files

Tweet

gofmt55%

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!


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!


golint33%

Golint is a linter for Go source code.

    • ttrack/internal/cmds/main-util.go
    • Line 8: warning: exported var DATE_FORMAT_STRING should have comment or be unexported (golint)
    • Line 10: warning: don't use underscores in Go names; func clean_group should be cleanGroup (golint)
    • ttrack/internal/ttdb/db.go
    • Line 18: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 42: warning: exported function GetSeconds should have comment or be unexported (golint)
    • Line 46: warning: exported function SetSeconds should have comment or be unexported (golint)
    • Line 50: warning: don't use underscores in Go names; var timeout_bytes should be timeoutBytes (golint)
    • Line 60: warning: exported function GetTimestamp should have comment or be unexported (golint)
    • Line 62: warning: don't use underscores in Go names; var b_val should be bVal (golint)
    • Line 69: warning: exported function SetTimestamp should have comment or be unexported (golint)
    • Line 74: warning: exported function AddTimestampToBucket should have comment or be unexported (golint)
    • Line 74: warning: don't use underscores in Go names; func parameter date_key should be dateKey (golint)
    • Line 75: warning: don't use underscores in Go names; var old_seconds should be oldSeconds (golint)
    • Line 79: warning: exported function ViewCmd should have comment or be unexported (golint)
    • Line 95: warning: exported function UpdateCmd should have comment or be unexported (golint)
    • ttrack/internal/seconds/seconds.go
    • Line 8: warning: comment on exported type Seconds should be of the form "Seconds ..." (with optional leading article) (golint)
    • Line 11: warning: exported const SECONDS_IN_DAY should have comment or be unexported (golint)
    • Line 13: warning: exported function CreateFromDuration should have comment or be unexported (golint)
    • Line 17: warning: exported function CreateFromBytes should have comment or be unexported (golint)
    • ttrack/internal/date/date.go
    • Line 6: warning: exported const DATE_FORMAT_STRING should have comment or be unexported (golint)
    • Line 8: warning: exported type Date should have comment or be unexported (golint)
    • Line 14: warning: exported function CreateFromString should have comment or be unexported (golint)
    • Line 20: warning: exported function CreateFromTime should have comment or be unexported (golint)
    • Line 32: warning: exported method Date.IsZero should have comment or be unexported (golint)
    • Line 36: warning: exported method Date.Set should have comment or be unexported (golint)
    • Line 42: warning: exported method Date.Type should have comment or be unexported (golint)
    • Line 44: warning: exported method Date.ToDate should have comment or be unexported (golint)
    • ttrack/internal/cmds/cmd-util.go
    • Line 28: warning: don't use underscores in Go names; func parameter beg_ts should be begTs (golint)
    • Line 28: warning: don't use underscores in Go names; func parameter end_ts should be endTs (golint)
    • Line 29: warning: don't use underscores in Go names; var time_elapsed should be timeElapsed (golint)
    • Line 48: warning: don't use underscores in Go names; var base_val should be baseVal (golint)
    • Line 72: warning: don't use underscores in Go names; func is_date_str_in_range should be isDateStrInRange (golint)
    • Line 72: warning: don't use underscores in Go names; func parameter beg_date should be begDate (golint)
    • Line 72: warning: don't use underscores in Go names; func parameter end_date should be endDate (golint)
    • Line 77: warning: don't use underscores in Go names; func parameter beg_bounds should be begBounds (golint)
    • Line 77: warning: don't use underscores in Go names; func parameter end_bounds should be endBounds (golint)
    • Line 83: warning: don't use underscores in Go names; var beg_ts should be begTs (golint)
    • Line 83: warning: don't use underscores in Go names; var end_ts should be endTs (golint)
    • Line 85: warning: don't use underscores in Go names; var beg_ts_str should be begTsStr (golint)
    • ttrack/internal/cmds/cmd.go
    • Line 15: warning: exported function CpFunc should have comment or be unexported (golint)
    • Line 15: warning: don't use underscores in Go names; func parameter beg_date should be begDate (golint)
    • Line 15: warning: don't use underscores in Go names; func parameter end_date should be endDate (golint)
    • Line 39: warning: exported function SetFunc should have comment or be unexported (golint)
    • Line 55: warning: don't use underscores in Go names; var date_key should be dateKey (golint)
    • Line 62: warning: exported function AggFunc should have comment or be unexported (golint)
    • Line 62: warning: don't use underscores in Go names; func parameter beg_date should be begDate (golint)
    • Line 62: warning: don't use underscores in Go names; func parameter end_date should be endDate (golint)
    • Line 78: warning: exported function ViewFunc should have comment or be unexported (golint)
    • Line 78: warning: don't use underscores in Go names; func parameter beg_date should be begDate (golint)
    • Line 78: warning: don't use underscores in Go names; func parameter end_date should be endDate (golint)
    • Line 99: warning: exported function ListFunc should have comment or be unexported (golint)
    • Line 118: warning: exported function DelFunc should have comment or be unexported (golint)
    • Line 130: warning: exported function RecFunc should have comment or be unexported (golint)
    • Line 130: warning: don't use underscores in Go names; func parameter timeout_param should be timeoutParam (golint)
    • Line 137: warning: don't use underscores in Go names; var old_beg_ts should be oldBegTs (golint)
    • Line 137: warning: don't use underscores in Go names; var old_end_ts should be oldEndTs (golint)
    • Line 137: warning: don't use underscores in Go names; var old_timeout should be oldTimeout (golint)
    • Line 138: warning: don't use underscores in Go names; var beg_ts should be begTs (golint)
    • Line 138: warning: don't use underscores in Go names; var end_ts should be endTs (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!