-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
189 lines (189 loc) · 5.92 KB
/
.pre-commit-config.yaml
File metadata and controls
189 lines (189 loc) · 5.92 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
# keep-sorted start
- id: check-added-large-files
name: check-for-added-large-files
args: ["--maxkb=10240"]
- id: check-ast
name: check-python-ast
- id: check-builtin-literals
name: check-builtin-type-constructor-use
- id: check-case-conflict
name: check-for-case-conflicts
- id: check-docstring-first
name: check-docstring-is-first
- id: check-executables-have-shebangs
name: check-that-executables-have-shebangs
- id: check-illegal-windows-names
name: check-illegal-windows-names
- id: check-json
name: check-json
- id: check-merge-conflict
name: check-for-merge-conflicts
args: ["--assume-in-merge"]
- id: check-shebang-scripts-are-executable
name: check-that-scripts-with-shebangs-are-executable
- id: check-symlinks
name: check-for-broken-symlinks
- id: check-toml
name: check-toml
- id: check-vcs-permalinks
name: check-vcs-permalinks
- id: check-xml
name: check-xml
- id: check-yaml
name: check-yaml
args: ["--allow-multiple-documents"]
- id: debug-statements
name: debug-statements-python
- id: destroyed-symlinks
name: detect-destroyed-symlinks
- id: detect-aws-credentials
name: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
name: detect-private-key
- id: double-quote-string-fixer
name: fix-double-quoted-strings
exclude: \.py$
- id: end-of-file-fixer
name: fix-end-of-files
exclude: |
(?x)^(
.*\.lock$|
.flox/env.json
)$
- id: file-contents-sorter
name: file-contents-sorter
- id: fix-byte-order-marker
name: fix-utf-8-byte-order-marker
- id: forbid-new-submodules
name: forbid-new-submodules
- id: forbid-submodules
name: forbid-submodules
- id: mixed-line-ending
name: mixed-line-ending-crlf-for-powershell-files
args: [--fix=crlf]
files: \.(ps1|psm1|psd1|pwsh)$
- id: mixed-line-ending
name: mixed-line-ending-lf-for-other-files
args: [--fix=lf]
exclude: \.(ps1|psm1|psd1|pwsh)$
- id: name-tests-test
name: python-tests-naming
- id: no-commit-to-branch
name: dont-commit-to-branch
stages: [manual] # https://pre-commit.com/#confining-hooks-to-run-at-certain-stages
- id: pretty-format-json
name: pretty-format-json
args: [--autofix, --no-ensure-ascii, --no-sort-keys, --indent=2]
files: \.json$
exclude: |
(?x)^(
.*\.lock$|
flake\.lock
)$
- id: requirements-txt-fixer
name: fix-requirements-txt
- id: sort-simple-yaml
name: sort-simple-yaml-files
- id: trailing-whitespace
name: trim-trailing-whitespace
args: [--markdown-linebreak-ext=md]
exclude: \.md$
# keep-sorted end
# keep-sorted start
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.22.0
hooks:
- id: markdownlint-cli2
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.14.14
hooks:
- id: ruff
name: ruff
types_or: [python, pyi]
args: [--fix]
- id: ruff-format
name: ruff-format
types_or: [python, pyi]
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.3.0
hooks:
- id: conventional-pre-commit
name: conventional-pre-commit
stages: [commit-msg]
args: [--strict]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.0
hooks:
- id: gitleaks
name: gitleaks
- repo: https://github.com/google/keep-sorted
rev: v0.7.1
hooks:
- id: keep-sorted
name: keep-sorted
exclude: |
(?x)^(
.*\.lock$|
.envrc
)$
- repo: https://github.com/google/yamlfmt
rev: v0.21.0
hooks:
- id: yamlfmt
name: yamlfmt
args:
- --formatter
- array_indent=2,disable_alias_key_correction=false,disallow_anchors=false,drop_merge_tag=false,eof_newline=false,include_document_start=false,indent=2,indent_root_array=false,indentless_arrays=false,max_line_length=0,pad_line_comments=1,retain_line_breaks=false,retain_line_breaks_single=true,scan_folded_as_literal=false,strip_directives=false,trim_trailing_whitespace=false
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.48.0
hooks:
- id: markdownlint
name: markdownlint
args: [--fix]
- repo: https://github.com/nixos/nixfmt
rev: v1.2.0
hooks:
- id: nixfmt
name: nixfmt
files: \.nix$
args:
- --indent=2
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 42.84.0
hooks:
- id: renovate-config-validator
args: [--strict]
- repo: https://github.com/rhysd/actionlint
rev: v1.7.10
hooks:
- id: actionlint
name: actionlint
- repo: https://github.com/shellcheck-py/shellcheck-py
# Workaround official https://github.com/koalaman/shellcheck-precommit hooks that requires container runtime.
rev: v0.11.0.1
hooks:
- id: shellcheck
name: shellcheck
args: []
- repo: https://github.com/siderolabs/conform
rev: v0.1.0-alpha.31
hooks:
- id: conform
stages:
- commit-msg
- repo: https://github.com/tcort/markdown-link-check
rev: v3.14.2
hooks:
- id: markdown-link-check
name: markdown-link-check
entry: markdown-link-check
language: node
types: [file]
files: \.md$
args: ["--quiet", "--config", ".markdown-link-check.json"]
# keep-sorted end