A collection of pre-commit hooks.
To use these hooks, you'll need to have pre-commit
installed. You can install
it using pip
:
pip install pre-commit
Or using Homebrew on macOS:
brew install pre-commit
Add the following to your .pre-commit-config.yaml
file:
repos:
- repo: https://github.com/thiagowfx/pre-commit-hooks
rev: {tag} # Replace with the latest tag
hooks:
- id: forbid-colon-filenames
- id: just-format
- id: pint
Then, run pre-commit autoupdate
to update the hooks to the latest version and
pre-commit install
to install the hooks in your local repository.
This hook forbids filenames containing colons (:
). This is useful to prevent
issues with filesystems that do not support colons in filenames.
This hook formats Justfiles
using just --fmt
. It requires just to be
installed and available in your PATH
.
This hook validates Prometheus rules with pint.