40 lines
1.2 KiB
TOML
40 lines
1.2 KiB
TOML
#:schema https://www.schemastore.org/prek.json
|
|
# Git hooks, run by prek (https://prek.j178.dev). `prek install` once per clone; CI runs
|
|
# them all (.gitea/workflows/ci.yaml).
|
|
|
|
[[repos]]
|
|
repo = "builtin"
|
|
hooks = [
|
|
{ id = "trailing-whitespace" },
|
|
{ id = "end-of-file-fixer" },
|
|
{ id = "mixed-line-ending", args = ["--fix", "lf"] },
|
|
{ id = "fix-byte-order-marker" },
|
|
{ id = "check-added-large-files" },
|
|
{ id = "check-case-conflict" },
|
|
{ id = "check-merge-conflict" },
|
|
{ id = "check-executables-have-shebangs" },
|
|
{ id = "check-shebang-scripts-are-executable" },
|
|
{ id = "check-symlinks" },
|
|
{ id = "check-toml" },
|
|
{ id = "check-yaml" },
|
|
{ id = "detect-private-key" },
|
|
]
|
|
|
|
[[repos]]
|
|
repo = "https://github.com/astral-sh/ruff-pre-commit"
|
|
rev = "v0.17.3" # keep in sync with ruff in uv.lock
|
|
hooks = [
|
|
{ id = "ruff-check", args = ["--fix"] },
|
|
{ id = "ruff-format" },
|
|
]
|
|
|
|
[[repos]]
|
|
repo = "https://github.com/adamchainz/django-upgrade"
|
|
rev = "1.33.0"
|
|
hooks = [{ id = "django-upgrade", args = ["--target-version", "5.2"] }]
|
|
|
|
[[repos]]
|
|
repo = "https://github.com/astral-sh/uv-pre-commit"
|
|
rev = "0.13.6"
|
|
hooks = [{ id = "uv-lock" }] # uv.lock stays in sync with pyproject.toml
|