generated from Infrastrukturait/terraform-module-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
84 lines (78 loc) · 3.23 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
# Git style
- id: check-added-large-files
name: "[pre-commit/pre-commit-hooks]check-added-large-files"
- id: check-merge-conflict
name: "[pre-commit/pre-commit-hooks]check-merge-conflict"
- id: check-vcs-permalinks
name: "[pre-commit/pre-commit-hooks]check-vcs-permalinks"
- id: forbid-new-submodules
name: "[pre-commit/pre-commit-hooks]forbid-new-submodules"
# Common errors
- id: end-of-file-fixer
name: "[pre-commit/pre-commit-hooks]end-of-file-fixer"
- id: trailing-whitespace
name: "[pre-commit/pre-commit-hooks]trailing-whitespace"
args: ['--markdown-linebreak-ext=md']
exclude: CHANGELOG.md
- id: check-yaml
name: "[pre-commit/pre-commit-hooks]check-yaml"
args: ['--unsafe']
- id: check-json
name: "[pre-commit/pre-commit-hooks]check-json"
- id: pretty-format-json
name: "[pre-commit/pre-commit-hooks]pretty-format-json"
args: ['--autofix', '--no-ensure-ascii', '--no-sort-keys']
- id: check-merge-conflict
name: "[pre-commit/pre-commit-hooks]check-merge-conflict"
- id: check-executables-have-shebangs
name: "[pre-commit/pre-commit-hooks]check-executables-have-shebangs"
# Cross platform
- id: check-case-conflict
name: "[pre-commit/pre-commit-hooks]check-case-conflict"
- id: mixed-line-ending
name: "[pre-commit/pre-commit-hooks]mixed-line-ending"
args: [--fix=lf]
# Security
- id: detect-aws-credentials
name: "[pre-commit/pre-commit-hooks]detect-aws-credentials"
args: ['--allow-missing-credentials']
- id: detect-private-key
name: "[pre-commit/pre-commit-hooks]detect-private-key"
- repo: https://github.com/terraform-docs/terraform-docs
rev: "v0.16.0"
hooks:
- id: terraform-docs-go
name: "[terraform-docs/terraform-docs]terraform-docs-go"
args: ["markdown", "table", "--output-file=./docs/terraform.md", "--config=./.terraform-docs.yml", "./"]
- repo: https://github.com/Infrastrukturait/pre-commit-readmegen
rev: v0.3.0
hooks:
- id: readmegen
name: "[Infrastrukturait/pre-commit-readmegen]readmegen"
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.76.0
hooks:
- id: terraform_fmt
name: "[antonbabenko/pre-commit-terraform]terraform_fmt"
- id: terraform_validate
name: "[antonbabenko/pre-commit-terraform]terraform_validate"
- id: terraform_tflint
name: "[antonbabenko/pre-commit-terraform]terraform_tflint"
args:
- '--args=--only=terraform_deprecated_interpolation'
- '--args=--only=terraform_deprecated_index'
- '--args=--only=terraform_unused_declarations'
- '--args=--only=terraform_comment_syntax'
- '--args=--only=terraform_documented_outputs'
- '--args=--only=terraform_documented_variables'
- '--args=--only=terraform_typed_variables'
- '--args=--only=terraform_module_pinned_source'
- '--args=--only=terraform_naming_convention'
- '--args=--only=terraform_required_version'
- '--args=--only=terraform_required_providers'
- '--args=--only=terraform_standard_module_structure'
- '--args=--only=terraform_workspace_remote'