Skip to content

Pre-commit Hooks

This project uses pre-commit to automatically enforce code quality standards, formatting consistency, and commit message conventions before code is committed to version control.

What is Pre-commit?

Pre-commit is a framework for managing and maintaining multi-language pre-commit hooks. These hooks run automatically when you attempt to create a commit, checking and fixing issues before they enter the codebase.

Commit hygiene

Run pre-commit manually (pre-commit run --all-files) after a dependency change or CI failure to catch and fix issues before pushing again.

Installation and Setup

Pre-commit is installed automatically via mise (configured in mise.toml). After cloning the repository and opening it in the devcontainer, run:

pre-commit install

This installs the git hooks into your local .git directory. You only need to do this once per clone.

Configured Hooks

The pre-commit configuration is defined in .pre-commit-config.yaml at the repository root. The hooks are organized by category:

Usage

For information on running, bypassing, updating, and troubleshooting hooks, see the Usage Guide.

  • Developer Setup - Initial environment configuration
  • Environment Variables - Configuration options
  • Commit Message Guidelines: .github/instructions/commitMessageGeneration.instructions.md
  • Ruff Configuration: ruff.toml

External Resources