generated from aws-ia/terraform-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
64 lines (56 loc) · 2.02 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
---
fail_fast: false
minimum_pre_commit_version: 2.6.0
repos:
-
repo: https://github.com/pre-commit/pre-commit-hooks
rev: f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9 # frozen: v4.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-symlinks
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
args: [--allow-multiple-documents]
exclude: templates/.*
- id: mixed-line-ending
args: [--fix=lf]
# - id: trailing-whitespace
#- id: flake8
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: 3420134c37197c21edffc7e6093b14ffae8402f2 # frozen: v1.81.0
hooks:
# see https://github.com/antonbabenko/pre-commit-terraform#terraform_fmt
- id: terraform_fmt
# see https://github.com/antonbabenko/pre-commit-terraform#terraform_validate
- id: terraform_validate
exclude: examples/.*
# see https://github.com/antonbabenko/pre-commit-terraform#terraform_docs
- id: terraform_docs
args:
- --args=--config=.terraform-docs.yaml
- --args=--lockfile=false
# see https://github.com/antonbabenko/pre-commit-terraform#terraform_providers_lock
- id: terraform_providers_lock
# see https://github.com/antonbabenko/pre-commit-terraform#terraform_tflint
- id: terraform_tflint
exclude: 'examples/.*'
args:
- --args=--config=__GIT_WORKING_DIR__/.tflint.hcl
- id: terraform_tfsec
args:
- --args=--exclude-downloaded-modules
- --args=--custom-check-dir=__GIT_WORKING_DIR__/.tfsec
files: \.tf$
exclude: \.terraform\/.*$
- repo: local
hooks:
- id: restricted-filenames
name: Check commits for unexpected file extensions
entry: These files are prohibited and should be removed.
language: fail
files: '.*\.(taskcat_overrides.yml)'