-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
106 lines (101 loc) · 2.65 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
ci:
autoupdate_schedule: monthly
default_stages:
- commit
exclude: >
(?x)^(
^(\/|)vendor\/(.*?)$|
.+\.node_modules\/.*$|
.+\.external_modules.*$|
.+\.terraform.*$|
.+\.venv.*$|
.+\.lock$|
)$
repos:
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
args: [--ignore-words=.codespell-ignores]
exclude: >
(?x)^(
.+\.vendor\/.*$|
.+\.node_modules\/.*$|
.+\.sops.*$|
.+\.lock$|
go.mod|
go.sum|
)$
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.11.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@hadenlabs/commitlint-config"]
args:
- --config=.ci/linters/.commitlintrc.json
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: detect-private-key
files: ^(?!\.?git-crypt)
exclude: >
(?x)^(
.+\.gitleaks.toml$|
test/fixtures/keys/.*-test.*$
)$
- id: check-merge-conflict
- id: check-added-large-files
files: ^tf|-|\.(py|env|yml|yaml)$
- id: check-case-conflict
- id: check-json
- id: check-xml
- id: check-yaml
args:
- --allow-multiple-documents
- id: check-byte-order-marker
- id: check-ast
- id: debug-statements
- id: check-docstring-first
- id: requirements-txt-fixer
- id: check-symlinks
- id: file-contents-sorter
- id: fix-encoding-pragma
- id: sort-simple-yaml
- repo: https://github.com/hadenlabs/pre-commit-hooks
rev: e50751c9323b0a03f27271c57513f5c389f6591b
hooks:
- id: do-not-commit
- id: markdown-link-check
args:
- --config=.ci/linters/markdown-link-config.json
exclude: >
(?x)^(
docs\/include\/terraform.md$|
.+\.tpl.md$|
)$
- id: shellcheck
exclude: >
(?x)^(
.+\.provision/git/hooks/prepare-commit-msg$|
.+\.tpl.sh$|
)$
args:
- --exclude=SC1071,SC1073,SC2068
- id: validate-toml
- id: no-go-testing
- id: golangci-lint
args:
- --fix
- --config=.ci/linters/.golangci.yml
- id: terragrunt-fmt
- id: terraform-fmt
- id: terraform-tfsec
- id: gitleaks
args:
- --path=.
- --repo-config-path=.ci/linters/.gitleaks.toml
- --verbose
- id: hadolint
args:
- --config=.ci/linters/.hadolint.yaml