Skip to content

Repository files navigation

Organisation Logo

Pre-commit template

One self-contained script. Copy it into hooks/pre-commit/<name>, edit the header, and chmod +x it. No pip install. The multiplexer runs it as a subhook.

Works as a silent lint (ruff, mypy, shellcheck, rubocop) or with optional yes/no prompts on /dev/tty.

Install

Python 3.13 or newer on PATH. The only file you need is src/pre-commit-template.

cp src/pre-commit-template hooks/pre-commit/01-ruff
chmod +x hooks/pre-commit/01-ruff

Edit the header: REQUIRED_COMMANDS, TOOL, FILE_EXTENSIONS. Leave everything below # STOP HERE alone.

Development

These steps are only for changing this repository.

python -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
python -m pytest

Documentation

The guide is in mkdocs/. After installing the dev extras:

mkdocs serve
The Lupaxa Project Footer

About

One self-contained Git pre-commit hook script you copy and configure. No pip install.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages