-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
88 lines (82 loc) · 2.71 KB
/
.pre-commit-config.yaml
File metadata and controls
88 lines (82 loc) · 2.71 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
default_stages: [pre-commit]
default_install_hook_types: [pre-commit, commit-msg]
repos:
- repo: local
hooks:
- id: generate-openapi-spec
name: Generate OpenAPI spec
entry: mise run generate:openapi-spec
language: python
files: |
(?x)(
^api/src/app/(features|common|authentication|entities)/.*\.py$
|^api/src/app/app.py$
|^api/pyproject.toml$
)
pass_filenames: false
- id: generate-api-client-from-spec
name: Generate the client for our api
entry: mise run generate:api-client-from-spec
language: system
files: ^api/.openapi.json$
pass_filenames: false
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.4.0
hooks:
- id: conventional-pre-commit
name: "Check: conventional formatted commit message"
stages: [commit-msg]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-merge-conflict
name: "Check: no merge conflict strings"
- id: no-commit-to-branch
name: "Check: no commit to main"
args: [--branch, main, --branch, master]
stages: [commit-msg]
- id: check-ast
name: "Check: parse .py files"
language_version: python3.14
- id: check-json
name: "Check: parse .json files"
- id: check-toml
name: "Check: parse .toml files"
- id: check-yaml
name: "Check: parse .yaml files"
exclude: mkdocs.yml
- id: check-case-conflict
name: "Check: no case conflicting file names"
- id: trailing-whitespace
name: "Lint : remove trailing whitespaces"
exclude: ^web/src/api/generated/|^.*\.(lock)$
- id: end-of-file-fixer
name: "Lint : files end with only newline"
exclude: ^web/src/api/generated/|^.*\.(lock)$
- id: mixed-line-ending
name: "Lint : consistent file ending"
exclude: ^.*\.(lock)$
- id: detect-private-key
name: "Check: no private keys are commited"
exclude: api/tests/integration/mock_authentication.py
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.15.9"
hooks:
- id: ruff-check
name: "Lint : ruff (python)"
files: ^api/.*\.py$
args: ["--fix"]
- id: ruff-format
name: "Lint : ruff-format (python)"
files: ^api/.*\.py$
- repo: https://github.com/biomejs/pre-commit
rev: v2.4.10
hooks:
- id: biome-check
name: "Lint : biome (ts/js)"
additional_dependencies: ["@biomejs/biome@2.4.10"]
exclude: |
(?x)(
^web/\.pnp\.cjs$
|^web/\.pnp\.loader\.mjs$
)