Showing 8 of 8 total issues
Function printSummariesCsv
has a Cognitive Complexity of 32 (exceeds 20 allowed). Consider refactoring. Open
Open
func printSummariesCsv(summaries []timecard.DaySummary) { var allProjects = make([]string, 0) indexStr := func(arr []string, needle string) int { for idx, str := range arr {
- Read upRead up
Function printSummariesCsv
has 52 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func printSummariesCsv(summaries []timecard.DaySummary) { var allProjects = make([]string, 0) indexStr := func(arr []string, needle string) int { for idx, str := range arr {
Method Log.PunchOut
has 6 return statements (exceeds 4 allowed). Open
Open
func (log *Log) PunchOut(timeOut time.Time) error { lastEntry, err := log.LastEntry() if err != nil { return err } else if lastEntry == nil || lastEntry.IsZero() {
Method Log.PunchIn
has 5 return statements (exceeds 4 allowed). Open
Open
func (log *Log) PunchIn(timeIn time.Time, projectName string) error { lastEntry, err := log.LastEntry() if err != nil { return err } else if lastEntry != nil && lastEntry.TimeOut.IsZero() {
comment on exported method Entry.Duration should be of the form "Duration ..." Open
Open
// An Entry's Duration is the difference between its TimeOut & TimeIn.
- Exclude checks
package comment should be of the form "Package timecard ..." Open
Open
// Functions for dealing with a punchcard-log formatted stream (file, pipe)
- Exclude checks
comment on exported method Entry.IsZero should be of the form "IsZero ..." Open
Open
// An Entry is consider zero if each of it's 3 members is also zero.
- Exclude checks
comment on exported method Log.AllEntries should be of the form "AllEntries ..." Open
Open
// Returns an array of all entries contained in the log.
- Exclude checks