-
Notifications
You must be signed in to change notification settings - Fork 6
/
.pre-commit-config.yaml
87 lines (79 loc) · 3.01 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
85
86
87
---
fail_fast: false
minimum_pre_commit_version: "2.6.0"
repos:
-
repo: https://github.com/pre-commit/pre-commit-hooks
rev: 8fe62d14e0b4d7d845a7022c5c2c3ae41bdd3f26 # frozen: v4.1.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
exclude: "templates/.*"
- # see https://github.com/antonbabenko/pre-commit-terraform
# Temporary, pending approval/merge of https://github.com/antonbabenko/pre-commit-terraform/pull/347
# repo: https://github.com/antonbabenko/pre-commit-terraform
# rev: v1.64.0
repo: https://github.com/aws-ia/pre-commit-terraform
rev: c3fb6c23f30a7951bd2eee6a756a6696824e5e53 # frozen: v1.65.0.pre1
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: https://github.com/aws-quickstart/qs-cfn-lint-rules
rev: 195c1c9825b1b911b2384e45c6cd18af14e7307d # frozen: v1.1
hooks:
# Inverse flag passed to effectively enforce that CFN templates must be in `templates/`
- id: files-are-not-cfn
name: Validating no CFN files exist outside of templates/
verbose: true
types_or: [json,yaml]
require_serial: true
args:
- '-i'
exclude: 'templates/.*'
- id: files-are-cfn
name: Validating only CFN files exist in templates/
verbose: true
require_serial: true
files: 'templates/.*'
- id: qs-cfn-lint-wrapped
files: 'templates/.*'
- repo: https://github.com/aws-ia/pre-commit-hooks
rev: 16be3ef859223383f402c8523bfd3bbb5f750894 # frozen: v1.0
hooks:
- id: git-submodule-sanity-check
always_run: true
- 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)'