diff --git a/render/detailed/summary.go b/render/detailed/summary.go index 2ef25f264..ae5834d65 100644 --- a/render/detailed/summary.go +++ b/render/detailed/summary.go @@ -344,13 +344,14 @@ func groupNodeSummary(base NodeSummary, r report.Report, n report.Node) (NodeSum } func pluralize(counters report.Counters, key, singular, plural string) string { - if c, ok := counters.Lookup(key); ok { - if c == 1 { - return fmt.Sprintf("%d %s", c, singular) - } - return fmt.Sprintf("%d %s", c, plural) + c, ok := counters.Lookup(key) + if !ok { + c = 0 } - return "" + if c == 1 { + return fmt.Sprintf("%d %s", c, singular) + } + return fmt.Sprintf("%d %s", c, plural) } type nodeSummariesByID []NodeSummary