mirror of
https://github.com/rr-/pq-cli.git
synced 2026-11-12 22:40:36 -07:00
prek replaces pre-commit as the hook runner and reads the same config. A new commit-msg hook in .prek/ rejects subjects over 50 characters, subjects without a module prefix, and body lines over 72 characters. Install the hooks with `uv run prek install`, and run them with `just lint`.
20 lines
398 B
YAML
20 lines
398 B
YAML
default_install_hook_types: [pre-commit, commit-msg]
|
|
default_stages: [pre-commit]
|
|
|
|
repos:
|
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.17.1
|
|
hooks:
|
|
- id: ruff-check
|
|
args: [--fix]
|
|
- id: ruff-format
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: commit-msg-50-72
|
|
name: Commit message 50/72 rule
|
|
entry: python3 .prek/check_commit_msg
|
|
language: system
|
|
stages: [commit-msg]
|