-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.pre-commit-config.yaml
72 lines (58 loc) · 2.31 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
---
fail_fast: true
minimum_pre_commit_version: "2.6.0"
repos:
- # see https://github.com/pre-commit/pre-commit-hooks
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-added-large-files
name: Check for accidentally added Large Files
- id: check-case-conflict
name: Check for cross-OS File Name Case Conflicts
- id: check-merge-conflict
name: Check for Git Merge Conflicts
- id: check-vcs-permalinks
name: Check VCS Permalinks
- id: check-json
name: Validate JSON files
- id: check-yaml
name: Validate YAML files
- # see https://github.com/antonbabenko/pre-commit-terraform
repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.64.0
hooks:
# see https://github.com/antonbabenko/pre-commit-terraform#terraform_fmt
- id: terraform_fmt
name: Run `terraform fmt` recursively
args:
- --args=-recursive
# see https://github.com/antonbabenko/pre-commit-terraform#terraform_validate
- id: terraform_validate
name: Run `terraform validate` against `examples/basic`
files: examples/basic
# see https://github.com/antonbabenko/pre-commit-terraform#terraform_docs
- id: terraform_docs
name: Render documentation for Module
args:
- "--args=--config=.terraform-docs.yml"
# see https://github.com/antonbabenko/pre-commit-terraform#terraform_docs
- id: terraform_docs
name: Render documentation for `basic` example
files: examples/basic
args:
- "--args=--config=.terraform-docs.yml"
# see https://github.com/antonbabenko/pre-commit-terraform#terraform_providers_lock
- id: terraform_providers_lock
name: Run `terraform init` and `terraform providers lock`
# see https://github.com/antonbabenko/pre-commit-terraform#terraform_tflint
- id: terraform_tflint
name: Run `tflint`
args:
- "--args=--config=__GIT_WORKING_DIR__/.tflint.hcl"
# see https://github.com/antonbabenko/pre-commit-terraform#terraform_tfsec
- id: terraform_tfsec
name: Run `tfsec` against `examples/basic`
files: "examples/basic"
args:
- --args= --config-file=__GIT_WORKING_DIR__/tfsec.yml