Every setting, from a config that exists.
Nine sections, and the last one tells you how to defeat the gate. The values here are not examples — they are read from this site's own configuration and its live audit, so a page teaching you a setting cannot drift from the setting we actually run.
01The config file
npx ruleofcode init writes ruleofcode.config.json at your repository root. That file is your constitution — every key below lives in it. Read it after init; nothing is enabled behind your back, and the tool runs no script when you install it.
This site's config sets 53 severity overrides (39 error, 14 warning), 13 argued waivers, and 9 global ignores. Generated from ruleofcode.config.json.
02Severity: the three levels
error stops the build. warning reports without blocking — visible debt, never a hidden waiver. info is advisory. The ladder is meant to be climbed: a law that reaches zero violations is raised to error so it cannot come back. Warning is a waiting room, not a destination.
Ours stands at 39 error and 14 warning, against 16 laws of visible debt published on /dogfood.
03The liveness floor
laws.minLawsChecked is the tripwire. If a config edit, a stack misdetection or a bad merge shrinks the law set, the audit refuses to report compliance at all rather than passing over a subset. Measure it, never inherit it — the number to set it against is printed on every run.
Ours is 117, against 119 laws that actually run. It has moved three times as the register changed; a floor copied from another repository would have blocked us or protected nothing.
04Modes: full and fast
--mode=full runs everything that applies. --mode=fast runs the high-impact core and says so out loud. Fast is for your editor loop. Never wire it into a hook or CI: the laws that do not run cannot fail, and absence of red reads as health.
laws.paretoMode here is false.
05Hooks
npx ruleofcode reinstall-hooks installs pre-commit, pre-push and commit-msg. They run the full law set. A hook that checks less than your CI is a disarmed gate with good manners.
06CI and exit codes
Run npx ruleofcode audit --mode=full --export json and let the exit code speak. It exits non-zero on failure and on a collapsed law set, so a pipeline cannot ignore either. The JSON is the whole result if you want to publish your own dogfood page.
07Waivers
laws.notApplicable takes a law and a reason. Carry the date and the person too. "Unknown" and "not applicable" are different words — a waiver without an argument is a hidden claim, and it is the one thing the tool cannot check for you.
We publish all 13 of ours, each with its reason, on /dogfood. Nine came down in one week when the evidence contradicted them.
08Includes, ignores, thresholds
ignores.global and ignores.byRule narrow the scan; thresholds tunes what a law considers too much. Both are legitimate and both are quiet — a wide ignore list is a waiver nobody argued.
Ours: 9 global ignores, 0 per-rule, and thresholds.codeQuality.maxFileLines at 300 — the limit that split two of our own files rather than being raised.
09Ways to disarm it — documented on purpose
Every one of these works. That is why each is named: a tool that lists only its strengths is describing a product nobody has run. This section is what makes the other eight worth reading.
The settings are the easy part. The floor is the honest part.
169 laws, 119 of them running here against a floor of 117. Run it on your own repository and you will get your own numbers — which are the only ones worth setting a gate against.