-
Notifications
You must be signed in to change notification settings - Fork 58
/
.pre-commit-config.yaml
193 lines (178 loc) · 5.29 KB
/
.pre-commit-config.yaml
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: mixed-line-ending
args: ["--fix=lf"]
- id: detect-private-key
exclude: ^boefjes/boefjes/plugins/kat_cve_2023_34039/keys/
- id: check-case-conflict
- id: check-yaml
- id: check-json
- id: check-toml
- id: debug-statements
exclude: |
(?x)(
^boefjes/tools |
^octopoes/tools
)
- id: end-of-file-fixer
exclude: |
(?x)(
\.svcg$ |
^boefjes/tests/examples/rdns-nxdomain.txt$ |
^boefjes/tests/examples/raw/
)
- id: fix-byte-order-marker
- id: pretty-format-json
args: ["--autofix", "--no-ensure-ascii", "--no-sort-keys"]
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.16
hooks:
- id: validate-pyproject
files: pyproject.toml$
- repo: https://github.com/rstcheck/rstcheck
rev: v6.2.1
hooks:
- id: rstcheck
# https://github.com/rstcheck/rstcheck-core/issues/4
args:
[
"--ignore-messages",
"Hyperlink target .* is not referenced",
"--ignore-directives",
"mermaid,automodule",
]
additional_dependencies: ["rstcheck[sphinx]", "autodoc-pydantic==2.1.0"]
- repo: https://github.com/MarketSquare/robotframework-tidy
rev: "4.11.0"
hooks:
- id: robotidy
- repo: https://github.com/jendrikseipp/vulture
rev: v2.11
hooks:
- id: vulture
exclude: |
/tests/
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.3.5"
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py310-plus]
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.16.0
hooks:
- id: django-upgrade
args: [--target-version, "5.0"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
- id: mypy
additional_dependencies:
- types-pyyaml
- types-cachetools
- types-retry
- pydantic
- pynacl
- httpx
- types-python-dateutil
- types-requests
- types-croniter
exclude: |
(?x)(
^boefjes/tools |
^keiko/templates |
^mula/whitelist\.py$ |
^mula/scripts |
^octopoes/tools |
^rocky/whitelist\.py$ |
/tests/ |
docs/source/conf\.py$ |
setup\.py$
)
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies: ["tomli"]
args: ["-L", "lama", "--ignore-regex", ".{1024}|.*codespell-ignore.*"]
exclude: |
(?x)(
\.po$ |
\.xml$ |
\.svg$ |
poetry.lock$ |
pyproject.toml$ |
requirements-.*.txt$ |
retirejs.json$ |
^boefjes/boefjes/plugins/kat_fierce/lists |
^boefjes/tests/examples/inputs/cve-result-without-cvss.json |
^boefjes/tests/examples |
^keiko/glossaries |
^keiko/templates/.*/template.tex$ |
^rocky/assets/js/vendor |
^rocky/assets/css/themes/soft/fonts/tabler-icons/tabler-icons.scss$ |
^rocky/tests/stubs |
^rocky/reports/report_types/aggregate_organisation_report |
^rocky/reports/report_types/multi_organization_report |
^docs/source/_static |
^boefjes/boefjes/plugins/kat_cve_2023_34039/keys/ |
^boefjes/boefjes/plugins/kat_rpki/rpki.json
)
- repo: https://github.com/Riverside-Healthcare/djLint
rev: v1.34.1
hooks:
- id: djlint-reformat-django
files: |
(?x)(
^rocky/.*/templates/.*$ |
^rocky/reports/report_types/.*/.*\.html
)
exclude: '^rocky/rocky/templates/admin/.*\.html$'
- id: djlint-django
files: |
(?x)(
^rocky/.*/templates/.*$ |
^rocky/reports/report_types/.*/.*\.html
)
exclude: '^rocky/rocky/templates/admin/.*\.html$'
- repo: https://github.com/thibaudcolas/pre-commit-stylelint
rev: v16.3.1
hooks:
- id: stylelint
args: [--fix]
additional_dependencies:
files: "^(rocky\/assets\/css\/|docs\/source\/).*.(css|scss|sass)$"
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
args: ["-e", "SC1091"]
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.8.0-1
hooks:
- id: shfmt
args: ["-w", "-s", "-i", "4", "-sr"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
additional_dependencies:
- [email protected] # SEE: https://github.com/pre-commit/pre-commit/issues/3133
exclude: |
(?x)(
\.html$ |
\.json$ |
\.min\.js$ |
^rocky/assets/css/themes/soft/fonts |
^rocky/assets/vendors |
^docs/source/_static
)