Add a pretest guard that caps new source files at 2,000 lines to stop god-files from being born, following the existing check-no-* guard pattern. Existing oversized files (106 of them) are grandfathered via a ratchet baseline (scripts/line-count-baseline.json): each is pinned to its current line count and may shrink but never grow. Files refactored under the cap drop out of the baseline and cannot regress. Generated, lock, locale, and .d.ts files are out of scope via the source-extension filter. Wired into pretest and pretest:full; covered by 11 unit tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5.5 KiB
5.5 KiB