-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
55 lines (50 loc) · 1.82 KB
/
.pre-commit-config.yaml
File metadata and controls
55 lines (50 loc) · 1.82 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
# Git Style
- id: check-added-large-files # default=500kb
alias: check-added-large-files-500kb
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: forbid-new-submodules
# TODO Upon deploying into production, add "no-commit-to-branch" to protect "main".
# Common Errors
- id: check-executables-have-shebangs
- id: check-yaml
- id: end-of-file-fixer # Ensures files end in newline char
alias: end-of-file-newline-fixer
- id: trailing-whitespace # Trims superfluous whitespace from eol
alias: trailing-whitespace-eol-trimmer
args: [--markdown-linebreak-ext=md]
# Security
- id: detect-aws-credentials
args: ["--allow-missing-credentials"]
- id: detect-private-key
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.17
hooks:
- id: shellcheck
- id: terraform-fmt
- id: tflint
exclude: examples/.*
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.72.1
hooks:
- id: terraform_tfsec
- id: tfupdate
alias: tf-version-autoupdate
- id: terraform_docs
# DOCS: https://terraform-docs.io/user-guide/configuration/
# HOOK DOCS: https://github.com/antonbabenko/pre-commit-terraform#terraform_docs
args:
- --hook-config=--path-to-file=README.md
- --hook-config=--add-to-existing-file=true
- --args=--config=.terraform_docs/config.yml
- repo: local
hooks:
- id: validate-custom-tfsec-checks
name: validate-custom-tfsec-checks
entry: /bin/bash -c 'for file in .tfsec/*; do tfsec-checkgen validate "$file"; done'
language: script
files: ^.tfsec/