Skip to content

Commit b726727

Browse files
committed
chore: raise file size limit to 600 lines, remove allowlist
The 500 LOC limit was too tight — several files sat in the allowlist permanently. Raising to 600 and removing the allowlist so the check is honest: if a file is over the limit, it needs to be split.
1 parent f42dc0c commit b726727

3 files changed

Lines changed: 6 additions & 22 deletions

File tree

.filesize-allowlist

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,14 +467,13 @@ jobs:
467467
timeout-minutes: 1
468468
steps:
469469
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
470-
- name: Check file sizes (max 500 lines)
470+
- name: Check file sizes (max 600 lines)
471471
run: |
472472
EXIT=0
473473
while IFS= read -r f; do
474-
if grep -qxF "$f" .filesize-allowlist 2>/dev/null; then continue; fi
475474
lines=$(wc -l < "$f")
476-
if [ "$lines" -gt 500 ]; then
477-
echo "::error file=$f::$f has $lines lines (max 500)"
475+
if [ "$lines" -gt 600 ]; then
476+
echo "::error file=$f::$f has $lines lines (max 600)"
478477
EXIT=1
479478
fi
480479
done < <(find packages/studio -path '*/node_modules' -prune -o \( -name '*.ts' -o -name '*.tsx' \) -print | grep -vE '\.(test|spec)\.(ts|tsx)$|\.generated\.')

lefthook.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,16 @@ pre-commit:
2121
glob: "packages/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}"
2222
run: bunx fallow audit --base origin/main --fail-on-issues
2323
filesize:
24-
# Scoped to packages/studio — the 500 LOC limit is a studio architecture
24+
# Scoped to packages/studio — the 600 LOC limit is a studio architecture
2525
# standard enforced as part of the App.tsx decomposition work. Player and
2626
# other packages enforce size discipline via code review and convention.
27-
# Files temporarily over the limit are listed in .filesize-allowlist.
2827
glob: "packages/studio/**/*.{ts,tsx}"
2928
exclude: "(\\.test\\.(ts|tsx)$|\\.generated\\.)"
3029
run: |
3130
for f in {staged_files}; do
32-
if grep -qxF "$f" .filesize-allowlist 2>/dev/null; then continue; fi
3331
lines=$(wc -l < "$f")
34-
if [ "$lines" -gt 500 ]; then
35-
echo "ERROR: $f has $lines lines (max 500) — add to .filesize-allowlist if temporarily needed"
32+
if [ "$lines" -gt 600 ]; then
33+
echo "ERROR: $f has $lines lines (max 600)"
3634
exit 1
3735
fi
3836
done

0 commit comments

Comments
 (0)