Files
sway-bar-helper/.pre-commit-config.yaml

56 lines
1.8 KiB
YAML

---
repos:
- repo: local
hooks:
- id: commitizen
name: commitizen check
description: |
Check whether the current commit message follows committing rules. Allow empty commit messages by default,
because they typically indicate to Git that the commit should be aborted.
entry: uv run cz check
args: [--allow-abort, --commit-msg-file]
stages: [commit-msg]
language: system
minimum_pre_commit_version: "1.4.3"
- id: commitizen-branch
name: commitizen check branch
description: |
Check all commit messages that are already on the current branch but not the default branch on the origin
repository. Useful for checking messages after the fact (e.g., pre-push or in CI) without expensive check of
the entire repository history.
entry: uv run cz check
args: [--rev-range, origin/HEAD..HEAD]
always_run: true
pass_filenames: false
language: system
stages: [pre-push]
minimum_pre_commit_version: "1.4.3"
- id: black
name: black
description: "Black: The uncompromising Python code formatter"
entry: poetry run black
args: [--check, --diff]
language: system
require_serial: true
types_or: [python, pyi]
- id: isort
name: isort
entry: uv run isort
args: [--check, --diff]
language: system
require_serial: true
types_or: [python, pyi]
- id: pylint
name: pylint
entry: uv run pylint
language: system
require_serial: true
types_or: [python]
- id: mypy
name: mypy
entry: uv run mypy
args: [--strict]
language: system
require_serial: true
types_or: [python, pyi]