-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
94 lines (82 loc) · 2.37 KB
/
.pre-commit-config.yaml
File metadata and controls
94 lines (82 loc) · 2.37 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
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/semgrep/semgrep
rev: v1.157.0
hooks:
- id: semgrep
exclude: '(\.semgrep/|docs/)'
exclude_types:
- yaml
args:
- scan
- --config
- .semgrep/
# Do not try to scan '.semgrep/' directories as they contain test files
# thus they will trigger findings.
- --exclude=.semgrep/
- --exclude=docs/_scripts/
# 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
# - --verbose
# language_version: python3.12 # glom compatibility
# entry: bash -c 'PYTHONWARNINGS=ignore::SyntaxWarning semgrep "$@"' # glom compatibility
- 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.21.0"
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.9
hooks:
- id: ruff
args:
- --fix
- id: ruff-format
args:
- --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-forbidden
name: check pyproject to avoid editable sources/deps
files: pyproject.toml
language: python
args:
- -p
- /\[tool\.uv\.sources\]\s/s