-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
104 lines (92 loc) · 2.63 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
104 lines (92 loc) · 2.63 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/djlint/djLint
rev: v1.36.4
hooks:
- id: djlint-reformat
args: [ "--configuration", "djlint.toml" ]
- repo: https://github.com/returntocorp/semgrep
rev: v1.141.0
hooks:
- id: semgrep
exclude: '\.semgrep/'
exclude_types:
- yaml
args:
- scan
- --config
- .semgrep/
- --config
- 'p/python'
# Do not try to scan '.semgrep/' directories as they contain test files
# thus they will trigger findings.
- --exclude=.semgrep/
# Set the exit code to non-zero if there are findings.
- --error
# Do not check for version updates, it slows down the execution.
- --disable-version-check
# Quiet mode in order to not pollute the pre-commit outputs.
# Replace --quiet with --verbose to debug issues.
- --quiet
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "1.7.0"
hooks:
- id: tox-ini-fmt
args: [ "-p", "lint" ]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.11.0"
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.2
hooks:
- id: ruff
- id: ruff-format
args:
- --check
- --config
- ruff.toml
- repo: https://github.com/saxix/pch
rev: "0.2"
hooks:
- id: check-missed-migrations
args:
- src
stages: [ pre-commit ]
additional_dependencies: [ setuptools ]
- id: check-untracked
args:
- src
- tests
stages: [ pre-push ]
- id: check-forbidden
args:
- -i
- "pyproject.toml"
- -p
- "/\\[tool.uv.sources\\]/"
stages: [ pre-push ]
- id: check-tailwind
name: check tailwind CSS ready for production
files: src/hope_portal/ui/theme/static_src/src/styles.scss
args:
- -o
- src/hope_portal/ui/theme/static/css/styles.css
- id: check-minimized
name: check missing minimized javascript
files: (\.js)$
exclude: (\.min\.js)$
args:
- -i
- "src/hope_portal/ui/theme/static_src/*.js"
- id: check-forbidden
name: check pyproject to avoid editable sources/deps
files: pyproject.toml
language: python
args:
- -p
- /\[tool\.uv\.sources\]\s/s