forked from cloudposse/terraform-aws-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
46 lines (42 loc) · 1.81 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
# Git style
- id: check-added-large-files # prevents giant files from being committed.
- id: forbid-new-submodules # prevents addition of new git submodules.
- id: no-commit-to-branch # don't commit to branch
# Common errors
- id: trailing-whitespace # trims trailing whitespace.
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer # ensures that a file is either empty, or ends with one newline.
- id: check-merge-conflict # checks for files that contain merge conflict strings.
- id: check-executables-have-shebangs # ensures that (non-binary) executables have a shebang.
# Cross platform
- id: check-case-conflict # checks for files that would conflict in case-insensitive filesystems.
- id: mixed-line-ending # replaces or checks mixed line ending.
args: [--fix=lf]
# YAML
- id: check-yaml # checks yaml files for parseable syntax.
exclude: |
(?x)^(
deprecated/github-actions-runner/runners/actions-runner/chart/templates/.*.yaml |
modules/eks/cert-manager/cert-manager-issuer/templates/.*.yaml |
modules/strongdm/charts/strongdm/templates/.*.yaml |
modules/eks/.*/charts/.*/templates/.*.yaml
)$
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.80.0
hooks:
- id: terraform_fmt
- id: terraform_docs
args: ["--args=--lockfile=false"]
- repo: local
hooks:
- id: rebuild-mixins-docs
name: rebuild-mixins-docs
entry: bash -c 'make rebuild-mixins-docs'
language: system
types: ["text"]
files: (mixins\/.*|bin\/rebuild-mixins-docs\.sh)
pass_filenames: false