Awesome Reviewers

Verification · Hygiene · File hygiene

Merge marker and whitespace checks

Reject conflict markers, trailing whitespace and missing final newlines.

How to build it

  1. Enable check-merge-conflict, trailing-whitespace and end-of-file-fixer from pre-commit-hooks.
  2. Run the hooks on staged files locally and on all files in CI.
  3. Fix existing hits in one commit before making the hooks required.

Signals in a repository

  • check-merge-conflict, trailing-whitespace or end-of-file-fixer ids in .pre-commit-config.yaml.
  • A CI job that runs pre-commit run --all-files.
  • No tracked text file contains lines starting with <<<<<<< or >>>>>>>.

In practice

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

  • pre-commit-hooks · 33 repos

Examples