Awesome Reviewers

Verification · Hygiene · Formatting

Check mode gate

Run the formatter with --check or --diff in CI so unformatted code fails instead of being rewritten.

How to build it

  1. Add a CI job that runs the formatter in check mode, such as --check or --diff.
  2. Make the job fail on any drift and print the diff in the log.
  3. Run the same command in the pre-commit hook so contributors see the failure first.

Signals in a repository

  • A CI step running ruff format --check, prettier --check, biome format --check or cargo fmt -- --check.
  • A workflow job that exits non-zero on unformatted files.
  • A pre-commit hook configured with the same formatter arguments as CI.

In practice

162 repositories run a tool for this check in the scanned set.

  • ruff-format · 43 repos
  • black · 14 repos
  • prettier · 98 repos
  • biome · 24 repos
  • rustfmt · 46 repos
  • gofmt · 7 repos

Examples