-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
48 lines (42 loc) · 1.48 KB
/
.pre-commit-config.yaml
File metadata and controls
48 lines (42 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# https://pre-commit.com
# https://pre-commit.com/hooks.html
# Use the active venv Python — avoids path issues on Windows where
# pre-commit looks for python3.12 at ~/.local/bin/python.exe
default_language_version:
python: python3
# Stages wired to git events:
# pre-commit -> runs on every `git commit`
# pre-push -> runs on every `git push`
# install-hooks in justfile registers both:
# uv run pre-commit install --hook-type=pre-push
# uv run pre-commit install --hook-type=commit-msg
default_stages: [pre-commit, pre-push]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v5.0.0'
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.9.9'
hooks:
- id: ruff # lint — commit + push
- id: ruff-format # format — commit + push
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
files: \.(py|yaml|yml|md|toml|json|env)$
- repo: https://github.com/commitizen-tools/commitizen
rev: 'v4.4.1'
hooks:
- id: commitizen # validates commit message format
stages: [commit-msg] # only on commit-msg event, not push