Answer stability round 1: 1 🔴, 1 🟡 (0 misread); refuse to count a report whose headings hold a mark in another form, and test the hook's report lookup
CI / tests (pull_request) Successful in 3m12s
CI / tests (pull_request) Successful in 3m12s
This commit is contained in:
@@ -52,6 +52,8 @@ def findings_in(report: pathlib.Path) -> Findings | Failure:
|
||||
except (OSError, UnicodeDecodeError) as failure:
|
||||
return Failure(f"could not read {report}: {failure}")
|
||||
findings = reported(text)
|
||||
if isinstance(findings, Failure):
|
||||
return Failure(f"{report} cannot be counted: {findings.reason}; count its findings by hand")
|
||||
if text.lstrip().startswith("BLOCK") and findings.red + findings.yellow == 0:
|
||||
return Failure(f"{report} says BLOCK but opens no finding with `### 🔴` or `### 🟡`; count its findings by hand")
|
||||
return findings
|
||||
|
||||
Reference in New Issue
Block a user