agent-desktop/scripts/check-rust-file-size.sh
Lahfir 4add46ab38 chore: checkpoint five verified remediation rounds before e2e convergence
Freezes the working tree as a fixed baseline: static gates green (1551 lib
tests, clippy -D warnings, fmt, release 0.4.7), live-verified E1/E2 fixes,
notification/harness work pending e2e acceptance. Known-open: hover fixture
churn to back out, 3 e2e failures (hover oracle, AE6 sheet, sheet cancel),
NT1-NT4 unproven.
2026-07-11 22:06:13 -07:00

26 lines
627 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
limit=400
failed=0
while IFS= read -r file; do
[ -f "$file" ] || continue
if head -n 5 "$file" | grep -q '@generated'; then
continue
fi
lines="$(wc -l < "$file" | tr -d ' ')"
if [ "$lines" -gt "$limit" ]; then
printf '%s: %s lines (limit %s)\n' "$file" "$lines" "$limit" >&2
failed=1
fi
done < <(git ls-files --cached --others --exclude-standard -- '*.rs')
if ! git ls-files -z --cached --others --exclude-standard -- '*.rs' \
| python3 scripts/check_rust_comments.py; then
failed=1
fi
if [ "$failed" -ne 0 ]; then
exit 1
fi