Skip to content

Maintain a set of curated pre-commit hooks

Follow on from #19 (closed)

Switch from using multiple pre-commit-hook repositories so a consistent pre-commit hook repository, in common-ci-tasks.

Documentation in https://pre-commit.com/#new-hooks

Why?

  1. Compatibility with truncated versions . will be published. This will reduce Renovate MR churn.
  2. No need for multiple sources of truth for version numbers in .tool-versions and .pre-commit-hooks.yaml, and no need to keep these versions synchronized, which is complex.
  3. No need for multiple installs of tools (one for mise, another for pre-commit)
  4. Precommit hooks rely exclusively on mise for tools. Less complexity around failing installs, etc.
  5. Less dependencies. No need to rely on external repositories, some of which may be derelict.
  6. Easier synchronization between the way tools are used in CI/CD and in pre-commit: less chance of these two configurations being different.
  7. No need to copy complex hook configurations into many different projects
  8. Smaller security surface
Edited by Andrew Newdigate