-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
118 lines (118 loc) · 3.11 KB
/
.pre-commit-config.yaml
File metadata and controls
118 lines (118 loc) · 3.11 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
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-xml
- id: check-yaml
args: [ '--allow-multiple-documents', '--unsafe' ]
exclude: |
(?x)^(
.*/templates/.*.yaml|
.*.template.yaml
)$
- id: check-toml
- id: check-json
- id: check-added-large-files
exclude: |
(?x)^(
.*/package-lock.json|
.*.(png|jpg|ico)
)$
- id: check-case-conflict
- id: detect-aws-credentials
args: [ '--allow-missing-credentials' ]
- id: detect-private-key
- id: check-executables-have-shebangs
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.30
hooks:
- id: tofu-fmt
# - id: tofu-validate
- id: terragrunt-hcl-fmt
- id: markdown-link-check
- id: gofmt
- id: golangci-lint
- id: goimports
# - id: yapf # or ruff-formatter
- id: packer-validate
# TODO add helm lint, https://github.com/gruntwork-io/pre-commit?tab=readme-ov-file#helm-lint-caveats
# - id: helmlint
# OpenTofu is not supported by tflint
# https://github.com/terraform-linters/tflint/issues/2194
# Incompatibility between OpenTofu like OpenTofu support for_each for providers
# - id: tflint
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.105.0
hooks:
- id: terraform_trivy
args:
- --args=-s=CRITICAL
- --args=--ignorefile=__GIT_WORKING_DIR__/.trivyignore.yaml
- id: terraform_fmt
# - id: terrascan
# - id: tfupdate
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: forbid-binary
exclude: |
(?x)^(
.*.(png|jpg|ico)
)$
- id: git-check
# TODO reenable when ruby3.0 is not required
# - id: markdownlint
- id: require-ascii
exclude: |
(?x)^(
.*.(lock)
)$
- id: shellcheck
- id: shfmt
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.38.0
hooks:
- id: yamllint
entry: yamllint --strict
- repo: local
hooks:
- id: ansible-lint
name: Ansible-lint
description: |
This hook runs ansible-lint on selected ansible playbooks and roles.
Do not use https://github.com/ansible/ansible-lint.git default pre-commit b/c its autodetect feature
does not correctly detect plays and roles and it always traverse entire subdirectory
entry: ansible-lint --force-color
language: python
pass_filenames: true
always_run: false
files: |
(?x)^(
ansible\/[^/]*\/[^/]*yaml|
ansible/.*/roles/.*/tasks/.*(yaml|yml)|
k8s/(jenkins|istio)/(deploy|ensure|roles/.*/tasks).*.(yaml|yml)
)$
exclude: |
(?x)^(
.*/templates/.*.yaml|
.*.template.yaml
)$
additional_dependencies:
- .[community,yamllint]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.0
hooks:
- id: ruff # python linter
args: [ --fix ]
- id: ruff-format # python formatter
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.0
hooks:
- id: gitleaks
# - repo: https://github.com/pocc/pre-commit-hooks
# rev: v1.3.5
# hooks:
# - id: cpplint