Files
TORCH/scripts
google-labs-jules[bot]andPR0M3TH3AN 6fdc092441 refactor: make exclusions in check scripts configurable
Refactor `scripts/check-file-size.mjs` and `scripts/check-innerhtml.mjs` to use `node:util.parseArgs` for parsing command-line arguments. This allows users to configure directory and file exclusions via `--exclude-dir`, `--exclude-file`, and `--no-defaults`, instead of relying on hardcoded lists.

This change improves versatility while maintaining backward compatibility by keeping the original hardcoded lists as defaults. It also adds support for `--max-lines` in `check-file-size.mjs` and `--help` in both scripts.

Verification:
- Manually verified that both scripts respect the new flags and defaults.
- Confirmed that `--report` mode still works as expected.
- Confirmed that unknown flags (like `--update`) are safely ignored (due to `strict: false`).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 14:16:23 +00:00
..