Skip to content

Commit 0189bab

Browse files
fix: make stale baseline entries fail to shrink allowance
When a baselined call is removed from the codebase, the baseline entry becomes stale. Previously this was only a note; now it causes a failure, requiring --update-baseline to permanently shrink the allowance rather than leaving a reusable slot. Addresses all-hands-bot review feedback.
1 parent c1c13c5 commit 0189bab

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

scripts/check_forbidden_dynamic_attributes.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,11 @@ def main(argv: list[str]) -> int:
124124
if stale:
125125
count = len(stale)
126126
unit = "entry is" if count == 1 else "entries are"
127-
print(f"note: {count} baseline {unit} stale; run --update-baseline to refresh.")
128-
if new_violations:
127+
print(
128+
f"error: {count} baseline {unit} stale; "
129+
"run --update-baseline to refresh."
130+
)
131+
if new_violations or stale:
129132
return 1
130133
return 0
131134

0 commit comments

Comments
 (0)