forked from cisagov/eleVADR
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
169 lines (154 loc) · 4.53 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
169 lines (154 loc) · 4.53 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
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
---
ci:
# Do not commit changes from running pre-commit for pull requests.
autofix_prs: false
# Autoupdate hooks weekly (this is the default).
autoupdate_schedule: weekly
default_language_version:
# force all unspecified python hooks to run python3
python: python
repos:
# Check the pre-commit configuration
- repo: meta
hooks:
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c
hooks:
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-aws-credentials
args:
- --allow-missing-credentials
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
args:
- --fix=lf
- id: pretty-format-json
args:
- --autofix
exclude: ^.*lock\.json$
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: check-added-large-files
args:
- --maxkb=500
# Text file hooks
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: e72a3ca1632f0b11a07d171449fe447a7ff6795e
hooks:
- id: markdownlint
args:
- --config=.mdl_config.yaml
- repo: https://github.com/rbubley/mirrors-prettier
rev: 515f543f5718ebfd6ce22e16708bb32c68ff96e1
hooks:
- id: prettier
- repo: https://github.com/adrienverge/yamllint
rev: cba56bcde1fdd01c1deb3f945e69764c291a6530
hooks:
- id: yamllint
args:
- --strict
# GitHub Actions hooks
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: f805888065fdb6162e1f800e50bb9460cbd223d6
hooks:
- id: check-github-actions
- id: check-github-workflows
# pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit
rev: f35134b05028ec938ac605ae500fdf95462655d3
hooks:
- id: validate_manifest
# Shell script hooks
- repo: https://github.com/scop/pre-commit-shfmt
rev: 05c1426671b9237fb5e1444dd63aa5731bec0dfb
hooks:
- id: shfmt
args:
# List files that will be formatted
- --list
# Write result to file instead of stdout
- --write
# Indent by two spaces
- --indent
- "2"
# Binary operators may start a line
- --binary-next-line
# Switch cases are indented
- --case-indent
# Redirect operators are followed by a space
- --space-redirects
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: 745eface02aef23e168a8afb6b5737818efbea95
hooks:
- id: shellcheck
# Python hooks
- repo: https://github.com/PyCQA/bandit
rev: 92ae8b82fb422a639f0ed8d99e96cea769594e08
hooks:
- id: bandit
name: bandit
files: ^src
args:
- --config=.bandit.yml
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 0671d8ab202c4ac093b78433ae5baf74f3fc7246
hooks:
# Run the linter.
- id: ruff-check
args:
- --fix
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: d2823d321df3af8f878f7ee3414dc94d037145b9
hooks:
- id: mypy
pass_filenames: false
args:
- --config-file=./pyproject.toml
- .
# Docker hooks
- repo: https://github.com/IamTheFij/docker-pre-commit
rev: 62a24686f7675bd45dabe32efe0473b746adac73
hooks:
- id: docker-compose-check
- repo: https://github.com/osprey-oss/deptry.git
rev: 0c39226d761685125c5ff71ca81282d6751c9540
hooks:
- id: deptry
args:
- --per-rule-ignores
- DEP002=uvicorn,DEP001=app
# General checks (commits, spelling)
- repo: https://github.com/compilerla/conventional-pre-commit
rev: 91ab4bf57e58b32adf1a122681f6ebe164d081c8
hooks:
- id: conventional-pre-commit
stages:
- commit-msg
args: []
- repo: https://github.com/codespell-project/codespell
rev: 2ccb47ff45ad361a21071a7eedda4c37e6ae8c5a
hooks:
- id: codespell
additional_dependencies:
- tomli
args:
- -w
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 254dd0011fda0cd4bbb281ff135792b157e43e1f
hooks:
- id: uv-audit