Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/evaluation/scoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ func printMetric(out io.Writer, label string, passed, total int) {
}

func printMetricFloat(out io.Writer, label string, passed, total float64) {
ratio := 0.0
if total > 0 {
ratio = passed / total
if total == 0 {
return // Skip metrics with no data
}
ratio := passed / total
fmt.Fprintf(out, "%s %14s: %.0f/%.0f passed (%.1f%%)\n", statusIcon(ratio), label, passed, total, ratio*100)
}

Expand Down
Loading