Verification · Hygiene
Formatting
A formatter rewrites code to one layout so diffs show only real changes; in CI it runs in check mode and fails on drift.
Sub-techniques
-
Code formatter
V1001.001One opinionated formatter per language, run on save and in CI.
-
Import ordering
V1001.002Sort and group imports so they never cause conflicts or noise.
-
Check mode gate
V1001.003Run the formatter with --check or --diff in CI so unformatted code fails instead of being rewritten.
How to build it
- Pick one formatter per language and commit its config at the repository root.
- Run it once over the whole tree in a single commit and add that commit to .git-blame-ignore-revs.
- Add a pre-commit hook that rewrites, and a CI step in check mode that fails.
Signals in a repository
- Formatter config in pyproject.toml, .prettierrc, rustfmt.toml or biome.json.
- A CI step running the formatter with --check, --diff or format --check.
- A .git-blame-ignore-revs file pointing at a mass-format commit.