Pre-commit
Installation
A nice way to install pre-commit is with uv
uv tool install pre-commit --with pre-commit-uv --force-reinstall
Usage
Place a .pre-commit-config.yml
in the root of a repository. Then run
pre-commit install
Example pre-commit configuration file
repos:
- repo: https://github.com/hukkin/mdformat
rev: 0.7.22
hooks:
- id: mdformat
additional_dependencies:
- mdformat-gfm
- mdformat-black
- repo: https://github.com/gitguardian/ggshield
rev: v1.37.0
hooks:
- id: ggshield
language_version: python3
stages: [pre-commit]