fix: align pre-commit average threshold display and gate to 9.33 (was showing 8.9, checking 9.31)

This commit is contained in:
lucaronin
2026-03-27 17:59:02 +01:00
parent 960ccde17f
commit 165ce53ad3

View File

@@ -37,7 +37,7 @@ else
echo " ⚠️ Could not fetch CodeScene scores — skipping (CI will enforce)"
else
echo " Hotspot Code Health: $HOTSPOT_SCORE (threshold: 9.5)"
echo " Average Code Health: $AVERAGE_SCORE (threshold: 8.9)"
echo " Average Code Health: $AVERAGE_SCORE (threshold: 9.33)"
python3 -c "
import sys
hotspot = float('$HOTSPOT_SCORE')
@@ -48,12 +48,12 @@ if hotspot < 9.5:
failed = True
else:
print(f'OK: Hotspot {hotspot:.2f} >= 9.5')
if average < 9.31:
print(f'FAIL: Average Code Health {average:.2f} < 9.31 — recent changes introduced regressions in non-hotspot files')
if average < 9.33:
print(f'FAIL: Average Code Health {average:.2f} < 9.33 — recent changes introduced regressions in non-hotspot files')
print(' Review files changed in this task. Never use eslint-disable, #[allow(...)], or as any to bypass.')
failed = True
else:
print(f'OK: Average {average:.2f} >= 9.31')
print(f'OK: Average {average:.2f} >= 9.33')
if failed:
sys.exit(1)
" || exit 1