-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.pre-commit-config.yaml
73 lines (67 loc) · 2.47 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
repos:
- repo: local
hooks:
- id: terraform_fmt
name: Terraform Format
description: Rewrites Terraform configuration files to a canonical format and style.
entry: terraform fmt -recursive
language: system
pass_filenames: false
files: (\.tf|\.tfvars)$
exclude: \.terraform\/.*$
- id: terraform_init
name: Terraform Init
description: Initializes a working directory containing Terraform configuration files.
entry: terraform init -backend=false -upgrade
language: system
pass_filenames: false
files: (\.tf|\.tfvars)$
exclude: \.terraform\/.*$
- id: terraform_validate
name: Terraform Validate
description: Validates the configuration files.
entry: terraform validate
language: system
pass_filenames: false
files: (\.tf|\.tfvars)$
exclude: \.terraform\/.*$
- id: tflint
name: TFLint
description: Finds possible errors (like illegal instance types) for Major Cloud providers (AWS/Azure/GCP), warns about deprecated syntax, unused declarations, enforces best practices, naming conventions.
require_serial: true
entry: tflint --format compact
language: system
pass_filenames: false
files: (\.tf|\.tfvars)$
exclude: \.terraform\/.*$
- id: terraform_full_docs
name: Terraform Full Docs
description: Generates documentation from Terraform modules in various output formats.
require_serial: true
entry: terraform-docs -c .terraform-full-docs.yml .
language: system
pass_filenames: false
files: (\.tf|\.terraform\.lock\.hcl)$
exclude: \.terraform\/.*$
- id: terraform_partial_docs
name: Terraform Partial Docs
description: Generates documentation from Terraform modules in various output formats.
require_serial: true
entry: terraform-docs -c .terraform-partial-docs.yml .
language: system
pass_filenames: false
files: (\.tf|\.terraform\.lock\.hcl)$
exclude: \.terraform\/.*$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: end-of-file-fixer
name: End of line fixer
description: Ensures that files is either empty, or ends with one newline.
- id: trailing-whitespace
name: Trailing whitespace
description: Trims trailing whitespace.
- id: mixed-line-ending
name: Mixed Line Ending
description: Replaces or checks mixed line ending.
args: ['--fix=lf']