register checks via static barrel instead of readdir + dynamic import

Checks keep self-registering on import; src/checks/all.ts imports every
shipped check from the entry's static graph. Keeps the check graph fully
statically resolvable (bundler/loader friendly) and removes the only
dynamic-import discovery in the codebase.
This commit is contained in:
2026-08-10 10:51:33 -04:00
parent 31c2048e57
commit 11eb2dc6ed
2 changed files with 28 additions and 31 deletions

15
src/checks/all.ts Normal file
View File

@@ -0,0 +1,15 @@
/**
* Static barrel for shipped checks.
*
* Every check module self-registers on import (top-level `registerCheck`), so
* importing all of them here — once, statically, from the entry graph —
* registers every check before commands bind. Adding a check means dropping
* the file in and adding one import line here.
*/
import "./comments.js";
import "./complexity.js";
import "./dead-code.js";
import "./deep-modules.js";
import "./defensive-guards.js";
import "./scope.js";
import "./todos.js";