generated from n3tuk/template-terraform-configuration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
104 lines (95 loc) · 3.45 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
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.5.0
hooks:
- id: no-commit-to-branch
name: Check this commit is not to the main/master branch
- id: check-merge-conflict
name: Check for merge conflicts before committing
- id: check-case-conflict
name: Check for case conflicts for case-sensitive filesystems
- id: check-symlinks
name: Check for broken syslinks in the repository
- id: destroyed-symlinks
name: Check for destroyed symlinks in the repository
- id: check-added-large-files
name: Check no large files have been added to the commit
- id: trailing-whitespace
name: Check all trailing whitespace is removed
- id: end-of-file-fixer
name: Check all files end in a new-line only
- repo: https://github.com/zricethezav/gitleaks.git
rev: v8.18.2
hooks:
- id: gitleaks
name: Check for hard-coded secrets, keys, and credentials
- repo: https://github.com/jumanjihouse/pre-commit-hooks.git
rev: 3.0.0
hooks:
- id: script-must-have-extension
name: Check non-executable shell scripts end with .sh extension
- id: script-must-not-have-extension
name: Check executable shell scripts to not have extension
- id: shellcheck
name: Check shell scripts with shellcheck
- id: shfmt
name: Check shell scripts formtting with shfmt
args: ['-i', '2', '-bn', '-ci', '-sr']
- repo: https://github.com/antonbabenko/pre-commit-terraform.git
rev: v1.88.0
hooks:
- id: terraform_fmt
name: Check Terraform configuration formatting
- id: terraform_validate
name: Validate the bootstrap Terraform configuration
files: ^terraform/bootstrap/
args:
- --tf-init-args=-no-color
- --tf-init-args=-upgrade
- --tf-init-args=-get
- --hook-config=--retry-once-with-cleanup=true
- id: terraform_tflint
name: Lint the bootstrap Terraform configuration
files: ^terraform/
args:
- --args=--config=__GIT_WORKING_DIR__/.tflint.hcl
- id: terraform_trivy
name: Analyse the bootstrap Terraform configuration
files: ^terraform/
args:
- --args=--config=__GIT_WORKING_DIR__/.trivy.yaml
- id: terraform_providers_lock
name: Check Terraform Provider plaforms configured
args:
- --args=-platform=linux_amd64
- --args=-platform=linux_arm64
- --args=-platform=darwin_amd64
- --args=-platform=darwin_arm64
- id: terraform_docs
name: Check the documentation for the Terraform configurations
args:
- --args=--config=.terraform-docs.yaml
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
name: Lint selected files with Prettier
args:
- --config=.prettier.yaml
types_or:
- markdown
- json
- yaml
- repo: https://github.com/igorshubovych/markdownlint-cli.git
rev: v0.39.0
hooks:
- id: markdownlint
name: Check Markdown correctness and formatting
- repo: https://github.com/python-jsonschema/check-jsonschema.git
rev: 0.28.0
hooks:
- name: Check Dependabot configuration for correctness
id: check-dependabot
- name: Check GitHub Workflows for correctness
id: check-github-workflows