-
Notifications
You must be signed in to change notification settings - Fork 588
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
71 lines (63 loc) · 2.13 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
71 lines (63 loc) · 2.13 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: ^docs/|README.md$
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.20
hooks:
- id: ruff-check
name: run ruff linting check
files: ^(backend|services)/
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
name: run ruff formatting check
files: ^(backend|services)/
# Note: Two separate calls to numpydoc as we have separate pyproject.toml files.
- repo: https://github.com/numpy/numpydoc
rev: v1.9.0
hooks:
- id: numpydoc-validation
name: run backend numpydoc docstring validation
files: ^backend/
exclude: ^backend/(.*/?(tests(/.*)?|views\.py|__init__\.py))$
- repo: https://github.com/numpy/numpydoc
rev: v1.9.0
hooks:
- id: numpydoc-validation
name: run services numpydoc docstring validation
files: ^services/
exclude: ^services/(.*/?(tests(/.*)?|__init__\.py))$
- repo: local
hooks:
- id: mypy-check
name: run mypy static type checking
files: ^backend/
entry: uv run mypy ./backend --config-file ./backend/pyproject.toml
language: python
types: [python]
pass_filenames: false
- id: prettier-eslint-checks
name: run prettier and eslint checks
files: ^frontend/
entry: python -m pre_commit_scripts.prettier_eslint_checks
language: python
pass_filenames: false
- id: run-i18n-check
name: run i18n-check key-value checks
files: ^frontend/
entry: uv run i18n-check -a
language: python
pass_filenames: false
- repo: https://github.com/to-sta/spdx-checker-pre-commit
rev: 0.1.8
hooks:
- id: spdx-license-checker
name: run spdx-checker license check
exclude: ^(?:.*/)?__init__\.py$
args: [-l, AGPL-3.0-or-later, --fix, --continue-on-error]
types_or: [python, ts, javascript, vue, css, html]