forked from hotosm/fAIr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
63 lines (56 loc) · 1.69 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
63 lines (56 loc) · 1.69 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
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: ^
# oxfmt batches it's runs, so using !/path/to/file in args can cause issues
exclude: ^(?:CHANGELOG\.md|frontend/pnpm-lock\.yaml|chart)
entry: oxfmt --no-error-on-unmatched-pattern --write
language: node
"types": [text]
additional_dependencies: ["oxfmt@0.35.0"]
- id: pytest
name: pytest (backend)
entry: uv run --directory backend pytest
language: system
types: [python]
files: ^backend/
pass_filenames: false
stages: [pre-push]
- id: commitizen
name: commitizen check
entry: uv run --project backend cz --config backend/pyproject.toml check --commit-msg-file
language: system
stages: [commit-msg]
- repo: https://github.com/betterleaks/betterleaks
rev: v1.8.1
hooks:
- id: betterleaks