Fix zero-count noise pattern handling

This commit is contained in:
Codex
2026-05-23 11:03:02 +02:00
parent 428223d2e4
commit af231dd4e8
@@ -800,7 +800,7 @@ collect_log_highlights() {
while IFS= read -r p; do
[ -n "$p" ] || continue
local pcount
pcount="$(grep -Eaic -- "$p" "$hits" 2>/dev/null || echo 0)"
pcount="$(grep -Eaic -- "$p" "$hits" 2>/dev/null || true)"
if [ "${pcount:-0}" -gt 0 ]; then
printf '%d\t%s\n' "$pcount" "$p" >> "$noise_by_pattern"
fi