fix: align pre-commit average threshold display and gate to 9.33 (was showing 8.9, checking 9.31)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user