Skip to content

Commit b19d51c

Browse files
committed
Print no issue if there are none
1 parent e3614c4 commit b19d51c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/commands/run.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,15 +494,17 @@ func (e *Executor) createPrinter(format string, w io.Writer) (printers.Printer,
494494

495495
func (e *Executor) printStats(issues []result.Issue) {
496496
if e.cfg.Run.ShowStatsPerLinter {
497-
e.runCmd.Println("Stats per linter:")
498497
stats := map[string]int{}
499498
for idx := range issues {
500499
stats[issues[idx].FromLinter]++
501500
}
502-
501+
e.runCmd.Println("Stats per linter:")
503502
for linter, count := range stats {
504503
e.runCmd.Printf(" %s: %d\n", linter, count)
505504
}
505+
if len(stats) == 0 {
506+
e.runCmd.Println(" no issues")
507+
}
506508
}
507509
}
508510

0 commit comments

Comments
 (0)