Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
73 lines (65 loc) · 2.17 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
73 lines (65 loc) · 2.17 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
default_install_hook_types: [pre-commit, commit-msg, pre-push]
default_language_version:
python: python3.12
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.12
hooks:
- id: ruff-check
args: [--fix]
files: ^backend/
- id: ruff-format
files: ^backend/
- repo: local
hooks:
- id: ty
name: ty
entry: uv run --directory backend ty check
language: system
types: [python]
files: ^backend/
pass_filenames: false
- id: uv-lock-check
name: uv lock check
entry: uv lock --directory backend --check
language: system
files: ^backend/(pyproject\.toml|uv\.lock)$
pass_filenames: false
# Autoformat: YAML, JSON, Markdown, etc.
- repo: local
hooks:
- id: oxfmt
name: oxfmt
files: ^
# Scope via exclude (oxfmt batches runs, so !/path args misbehave):
# frontend/ uses its own config below; docs/ markdown is
# MkDocs Material whose 4-space `---` grid dividers a generic formatter breaks.
exclude: ^(?:CHANGELOG\.md|signed-contributors\.json|frontend/|chart|docs/.*\.md)
entry: oxfmt --no-error-on-unmatched-pattern --write
language: node
"types": [text]
additional_dependencies: ["oxfmt@0.35.0"]
- id: oxfmt-frontend
name: oxfmt (frontend)
entry: oxfmt --config frontend/.oxfmtrc.json --write
language: node
additional_dependencies: ["oxfmt@0.35.0"]
files: ^frontend/src/.*\.(js|jsx|ts|tsx|json|css|scss|md)$
- id: pytest
name: pytest (backend, db-free subset)
entry: uv run --directory backend pytest -m "not django_db"
language: system
types: [python]
files: ^backend/
pass_filenames: false
stages: [pre-push]
- id: commitizen
name: commitizen check
entry: cz --config backend/pyproject.toml check --commit-msg-file
language: python
additional_dependencies: ["commitizen==4.13.10"]
stages: [commit-msg]
- repo: https://github.com/betterleaks/betterleaks
rev: v1.8.1
hooks:
- id: betterleaks