generated from equinix-labs/terraform-equinix-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
87 lines (80 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
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
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.77.1
hooks:
- id: terraform_fmt
args:
- "--args=-recursive"
- id: terraform_validate
exclude: "^[^/]+$"
- id: terraform_tflint
args:
- "--args=--config=__GIT_WORKING_DIR__/.tflint.hcl"
- id: terraform_tfsec
args:
- "--args=--soft-fail"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
# Git style
- id: check-added-large-files
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: forbid-new-submodules
- id: no-commit-to-branch
args: ['--branch', 'master']
# Common errors
- id: end-of-file-fixer
- id: trailing-whitespace
args:
- "--markdown-linebreak-ext=md"
exclude: CHANGELOG.md
- id: check-yaml
args:
- "--allow-multiple-documents"
exclude: |
(?x)^(
examples/|
\.*?.yaml$"
)$
- id: check-json
- id: check-symlinks
- id: check-executables-have-shebangs
# Cross platform
- id: check-case-conflict
- id: mixed-line-ending
args:
- "--fix=lf"
# Security
- id: detect-private-key
# Shell Script Formatter and Markdown Linter
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: shfmt
exclude: |
(?x)^(
helpers/helper-script.sh|
scripts/template-script.sh
)$
- id: shellcheck
args:
- "--severity=warning"
- "--source-path=SCRIPTDIR scripts/* helpers/*"
- "--shell=bash"
exclude: |
(?x)^(
helpers/helper-script.sh|
scripts/template-script.sh
)$
- id: markdownlint
exclude: "CHANGELOG.md"
# JSON5 and Yaml Prettyfier
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
hooks:
- id: prettier
types: [json5, yaml]
exclude: "^examples/"