singularity-forge/autoresearch.sh
Mikael Hugo 72e27f9ba8 autoresearch: initialize biome lint experiment session
Baseline: 40 diagnostics (26 errors, 13 warnings, 1 info), 1064 files checked.
2026-05-08 14:22:52 +02:00

25 lines
664 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
output=$(npx biome check src/ --reporter=json 2>/dev/null || true)
diagnostics=$(echo "$output" | python3 -c "
import json, sys
data = json.load(sys.stdin)
s = data.get('summary', {})
print(s.get('errors', 0) + s.get('warnings', 0) + s.get('infos', 0))
")
errors=$(echo "$output" | python3 -c "
import json, sys
data = json.load(sys.stdin)
print(data.get('summary', {}).get('errors', 0))
")
warnings=$(echo "$output" | python3 -c "
import json, sys
data = json.load(sys.stdin)
print(data.get('summary', {}).get('warnings', 0))
")
echo "METRIC diagnostics=$diagnostics"
echo "METRIC errors=$errors"
echo "METRIC warnings=$warnings"