-
-
Notifications
You must be signed in to change notification settings - Fork 217
/
.pre-commit-config.yaml
67 lines (61 loc) · 2.63 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
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/eks/.*/charts/.*/templates/.*.yaml
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 |
modules/eks/.*/charts/.*/templates/.*.yml |
modules/eks/promtail/scrape_config/.*.yaml |
modules/eks/promtail/scrape_config/.*.yml
)$
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.80.0
hooks:
- id: terraform_fmt
- id: terraform_docs
args: ["--args=--lockfile=false"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
name: prettier
entry: prettier --write --prose-wrap always --print-width 120
types: ["markdown"]
# If prettier chokes on the output of the `terraform-docs` command for a file, don't
# exclude it here. Instead, wrap the terraform-docs comment in the README with
# `<!-- prettier-ignore-start -->` and `<!-- prettier-ignore-end -->` comments.
exclude: |
(?x)^(
README.md |
deprecated/.*.md
)$
- 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