This repository has been archived by the owner on Oct 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
187 lines (186 loc) · 5.27 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
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_stages: [commit]
exclude: >
(?x)^(
.pytest_cache|
.ruff_cache|
.terraform|
.trunk/actions|
.trunk/logs|
.trunk/notifications|
.trunk/out|
.trunk/plugins|
.vscode/launch.json
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-shebang-scripts-are-executable
# - id: pretty-format-json
# args: ["--autofix"]
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-aws-credentials
args: ["--allow-missing-credentials"]
- id: detect-private-key
# - id: double-quote-string-fixer
- id: end-of-file-fixer
exclude: "charts/README.md"
- id: file-contents-sorter
- id: fix-byte-order-marker
- id: fix-encoding-pragma
args: ["--remove"]
- id: forbid-new-submodules
- id: mixed-line-ending
- id: name-tests-test
# - id: no-commit-to-branch
- id: requirements-txt-fixer
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.21.3
hooks:
- id: commitizen
stages:
- commit-msg
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
# - repo: https://github.com/jumanjihouse/pre-commit-hooks
# rev: 3.0.0
- repo: https://github.com/jlec/pre-commit-hooks
rev: gh-111
hooks:
# - id: bundler-audit
- id: check-mailmap
# - id: fasterer
- id: forbid-binary
# - id: forbid-space-in-indent
# - id: git-check
# - id: git-dirty
# - id: markdownlint
# - id: protect-first-parent
# - id: reek
# - id: require-ascii
# - id: rubocop
- id: shellcheck
# - id: script-must-have-extension
# - id: script-must-not-have-extension
- id: shfmt
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/bandit
rev: 1.7.8
hooks:
- id: bandit
- repo: https://github.com/jlec/pre-commit-cruft
rev: v0.1.1
hooks:
- id: cruft
stages: ["push"]
- repo: https://github.com/hadolint/hadolint
rev: v2.12.1-beta
hooks:
- id: hadolint-docker
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort
args:
- --in-place
- --all
- --trailing-comma-inline-array
- repo: https://github.com/zricethezav/gitleaks
rev: v8.18.2
hooks:
- id: gitleaks
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.1
hooks:
- id: check-github-workflows
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.3.5
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/gitguardian/ggshield
rev: v1.26.0
hooks:
- id: ggshield
stages: ["push"]
- repo: https://github.com/golangci/golangci-lint
rev: v1.57.2
hooks:
- id: golangci-lint-full
args: ["--timeout", "2m"]
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.13.0
hooks:
- id: pretty-format-golang
args: [--autofix]
- repo: https://github.com/Bahjat/pre-commit-golang
rev: v1.0.3
hooks:
- id: go-fmt-import
- id: go-vet
- id: go-lint
- id: go-unit-tests
- id: gofumpt # requires github.com/mvdan/gofumpt
# - id: go-err-check # requires github.com/kisielk/errcheck
- id: go-static-check # install https://staticcheck.io/docs/
# - id: go-ruleguard # requires https://github.com/quasilyte/go-ruleguard
# args: [rules/rules.go] # required
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.88.4
hooks:
# - id: infracost_breakdown
# - id: tfupdate
- id: terraform_fmt
- id: terraform_docs
args:
- --hook-config=--add-to-existing-file=true
- id: terraform_validate
exclude: examples
- id: terraform_providers_lock
args:
- --hook-config=--mode=always-regenerate-lockfile
- --args=-platform=darwin_arm64
stages: ["push"]
- id: terraform_tflint
- id: terraform_trivy
stages: ["push"]
- id: terraform_checkov
args:
- --args=--config-file=.checkov.yaml
stages: ["push"]
# excluded until https://github.com/tenable/terrascan/issues/1390 is resolved
# - id: terrascan
# args:
# - --args=--iac-dir deployment
# - --args=--non-recursive
# - --args=--skip-rules="AC_AWS_0207"
# - --args=--verbose
# stages: ["push"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier