Showing 4 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() {