fix: migrate prek.toml to repos format compatible with prek 0.3.3

The old commands = [...] format was a custom schema prek no longer
supports. Rewrite as local-repo hooks (language: system, always_run:
true) matching the pre-commit config schema prek 0.3.3 expects.
Hooks are identical: ruff, ty, pytest, pytest-lima (pre-push) and
audit-docs (post-commit).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Justin Bollinger
2026-02-20 21:34:39 -05:00
parent 21580eefee
commit 405629ce4e

View File

@@ -1,12 +1,47 @@
[hooks.pre-push]
commands = [
"uv run ruff check hate_crack",
"uv run ty check hate_crack",
"HATE_CRACK_SKIP_INIT=1 uv run pytest -q",
"HATE_CRACK_RUN_LIMA_TESTS=1 uv run pytest tests/test_lima_vm_install.py -v",
]
[[repos]]
repo = "local"
[hooks.post-commit]
commands = [
"bash .claude/audit-docs.sh HEAD",
]
[[repos.hooks]]
id = "ruff"
name = "ruff"
entry = "uv run ruff check hate_crack"
language = "system"
stages = ["pre-push"]
pass_filenames = false
always_run = true
[[repos.hooks]]
id = "ty"
name = "ty"
entry = "uv run ty check hate_crack"
language = "system"
stages = ["pre-push"]
pass_filenames = false
always_run = true
[[repos.hooks]]
id = "pytest"
name = "pytest"
entry = "env HATE_CRACK_SKIP_INIT=1 uv run pytest -q"
language = "system"
stages = ["pre-push"]
pass_filenames = false
always_run = true
[[repos.hooks]]
id = "pytest-lima"
name = "pytest-lima"
entry = "env HATE_CRACK_RUN_LIMA_TESTS=1 uv run pytest tests/test_lima_vm_install.py -v"
language = "system"
stages = ["pre-push"]
pass_filenames = false
always_run = true
[[repos.hooks]]
id = "audit-docs"
name = "audit-docs"
entry = "bash .claude/audit-docs.sh HEAD"
language = "system"
stages = ["post-commit"]
pass_filenames = false
always_run = true