Summary
scripts/check_file_size.py enumerates files via git ls-files by default, so a new file exceeding the 300-line cap passesmake lint while untracked, then fails only after it's committed (and tracked). This breaks the "green before commit" workflow.
Environment
- Framework checkout:
v0.0.17-5-g2b079c9; smpy / published simple_module_* / @simple-module-py/*: 0.0.17 - Python 3.12.3, uv 0.11.7, node v24.15.0, Linux (Ubuntu)
Found while building a real consumer app (Invoice Manager) on the framework.
Repro
- Create
modules/<m>/<m>/big.py with 320 lines; do NOT git add. make lint → passes ("no files exceed 300 lines") because the untracked file is skipped.git add -A && git commit; make lint → now fails on big.py.
(Hit in this build: a 338-line data file passed lint pre-commit and failed post-commit.)
Impact / suggestion
Lint result depends on git index state, not the working tree. Suggest scanning the working tree (respecting .gitignore) rather than only tracked files — or at least including untracked-but-not-ignored files.
Summary
scripts/check_file_size.pyenumerates files viagit ls-filesby default, so a new file exceeding the 300-line cap passesmake lintwhile untracked, then fails only after it's committed (and tracked). This breaks the "green before commit" workflow.Environment
v0.0.17-5-g2b079c9;smpy/ publishedsimple_module_*/@simple-module-py/*: 0.0.17Found while building a real consumer app (Invoice Manager) on the framework.
Repro
modules/<m>/<m>/big.pywith 320 lines; do NOTgit add.make lint→ passes ("no files exceed 300 lines") because the untracked file is skipped.git add -A && git commit;make lint→ now fails onbig.py.(Hit in this build: a 338-line data file passed lint pre-commit and failed post-commit.)
Impact / suggestion
Lint result depends on git index state, not the working tree. Suggest scanning the working tree (respecting
.gitignore) rather than only tracked files — or at least including untracked-but-not-ignored files.