Skip to content

Built a 268‑check guard engine for the repo

Built the repository's guard engine — 268 registered commit checks, 277 lint rules and 15 custom ESLint rules — plus 146 tests of the guards themselves, so the build holds the standard, not review.

268 commit checks, and 146 tests of the checks themselves

Situation. Standards written down in a contributing guide are suggestions. Everyone agrees with them, and then it is Friday, the change is small, and the guide loses. The zero‑warnings bar was only ever going to hold if something other than goodwill was holding it — and the linters that ship with each language stop well short of the project‑specific rules that actually matter, the ones about how this codebase in particular is meant to work.

Task. The rules the project cared about had to be executable, so that breaking one failed a commit rather than waiting for a reviewer with the time and the memory to catch it.

Action. What grew out of that is a guard engine. There are 274 check scripts, 268 of them registered into the commit hooks, alongside 277 JavaScript linters and 96 shell and 17 Python validators covering the things off‑the‑shelf tooling has no opinion about — that a migration can be rolled back, that a translation key exists in both locales, that a registered route appears in the OpenAPI description, that nobody quietly added an inline suppression. Fifteen custom ESLint rules hold the house patterns in TypeScript. One rule is worth naming on its own: any commit prefixed fix: has to carry a test that fails without it, providing an executable check for that regression. And because a broken guard is worse than no guard at all — it passes everything and nobody finds out — the guards have 146 tests of their own.

Result. Reviewers could spend more time on design because automated checks handled the mechanical rules they encoded before a branch was pushed. The trade‑off is real and worth stating: committing is slow, and a badly written guard is genuinely infuriating to work around. Those 146 tests exist because that happened.

  • Lookout tower, snow, winter
    Photo: schauhi / Pixabay
  • Road bend, guard rail, delineator posts
    Photo: Monsterkoi / Pixabay

Bring this experience to your project

Use “Built a 268‑check guard engine for the repo” as a starting point for a similar challenge in your organisation. The services behind this work are available for your project. Tested, released and reversible, so changes reach customers on a Tuesday afternoon rather than late on a Friday night.

Explore our services Get in touch

Look behind the result

Read the situation, decisions and result in this example. We can discuss which parts transfer to your constraints and which need another approach. Built a 268‑check guard engine for the repo — 268 commit checks, and 146 tests of the checks themselves

Explore our services Get in touch

One piece of a longer record — and it is all on this site.

Every entry is written the same way: the situation, the task, what we did and what changed.

See the whole record

Define the improvement you need

Bring the deployment path, the operational risks and the people on call. We can scope a change with checks, a recovery route and clear ownership.

See what it costs Get in touch

Want your standards enforced automatically?

Ask about the decisions behind “Built a 268‑check guard engine for the repo”. You will speak with the people who can explain the work and assess your own project.

Explore our services
welcome@engineer.company +45 50 10 61 84 Copenhagen, Denmark
QR code for Built the repository's guard engine — 268 registered commit checks, 277 lint rules and 15 custom ESLint rules — plus 146 tests of the guards themselves, so the build holds the standard, not review.
Take this page with youhttps://engineer.company/portfolio/built-a-268-check-guard-engine-for-the-repo/