Skip to content

feat: add prek pre-commit hooks - #272

Open
edvardm wants to merge 3 commits into
OpenFilamentCollective:mainfrom
edvardm:add-prek-hooks
Open

feat: add prek pre-commit hooks#272
edvardm wants to merge 3 commits into
OpenFilamentCollective:mainfrom
edvardm:add-prek-hooks

Conversation

@edvardm

@edvardm edvardm commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

Note

prek is just a suggestion -- many other pre-commit hook managers would likely do the job

Summary

Adds opt-in pre-commit hooks via prek — a Rust rewrite of pre-commit, drop-in compatible with the same .pre-commit-config.yaml format. Notable adopters: Home Assistant, CPython, Apache Airflow, FastAPI, Ruff, vLLM (Airflow reported 10x speedup over pre-commit).

Hooks

Hook Stage Scope
end-of-file-fixer commit .py, .yaml, .toml, .md
trailing-whitespace commit .py, .yaml, .toml, .md
check-merge-conflict commit all files
ruff-check commit Python (auto-fix)
ruff-format commit Python
committed commit-msg enforces Conventional Commits

Setup

uv run prek install
uv run prek install --hook-type commit-msg

Hooks are opt-in — not enforced on contributors, but probably should be enforced via CI.

@edvardm
edvardm marked this pull request as draft April 11, 2026 12:26
@edvardm edvardm changed the title add prek pre-commit hooks for ruff lint and format feat: add prek pre-commit hooks Apr 11, 2026
@edvardm
edvardm marked this pull request as ready for review April 11, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant