release 1.10.2: sticky ERROR word-boundary (no false wrote-errors)

This commit is contained in:
Hernâni Marques 2026-07-19 01:29:18 +02:00
parent ecb0cf8b4a
commit 1226d2a8f7
No known key found for this signature in database
GPG key ID: CB5738652768F7E9
3 changed files with 6 additions and 4 deletions

View file

@ -201,11 +201,12 @@ def classify(line: str) -> str:
return "meta"
if "BLOCKER" in u or "┌ BLOCKER" in u:
return "blocker"
if "ERROR" in u or "┌ ERROR" in u:
# word-boundary: avoid "wrote-errors", "ERRORS=", commit subjects, etc.
if re.search(r"\s*ERROR\b|\[\s*ERROR\b|\bERROR\b", u) and not is_summary_error_line(line):
return "error"
if "WARN" in u or "┌ WARN" in u:
if re.search(r"\s*WARN\b|\[\s*WARN\b|\bWARN\b", u):
return "warn"
if "INFO" in u or "┌ INFO" in u:
if re.search(r"\s*INFO\b|\[\s*INFO\b|\bINFO\b", u):
return "info"
if " OK" in u or "[OK" in u or "┌ OK" in u or u.strip().startswith("OK"):
return "ok"