forked from elastisys/compliantkubernetes-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
83 lines (78 loc) · 2.93 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: no-commit-to-branch
- id: check-merge-conflict
- id: check-yaml
exclude: ^helmfile\.d/(bases/.*|charts/.*/templates/.*|stacks/.*|upstream/.*|state.yaml)$
args:
- --allow-multiple-documents
- id: check-json
exclude: ^helmfile\.d/(charts/.*/templates/|upstream/)
- id: detect-private-key
exclude: ^helmfile\.d/upstream/|^pipeline/sops-pgp-setup.bash$
- id: end-of-file-fixer
exclude: ^helmfile\.d/upstream/|^tests/.*/resources/
- id: trailing-whitespace
exclude: ^helmfile\.d/upstream/|^tests/.*/resources/
# TODO: Migrate to same config as compliantkubernetes repo.
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.39.0
hooks:
- id: markdownlint
name: lint markdown
args:
- --disable
- MD007 # Unordered list indentation
- MD013 # Line length
- MD024 # Multiple headings with the same content
- MD026 # Trailing punctuation in heading
- MD028 # Blank line inside blockquote
- MD029 # Ordered list item prefix
- MD033 # Inline HTML
- MD034 # Bare URL used
- MD036 # Emphasis used instead of a heading
- MD040 # Fenced code blocks should have a language specified
- MD041 # First line in a file should be a top-level heading
- MD042 # No empty links
- MD051 # Link fragments should be valid
- --
exclude: ^helmfile\.d/upstream/|^helmfile\.d/charts/grafana-dashboards/files/welcome.md$|^helmfile\.d/charts/opensearch/configurer/files/dashboards-resources/welcome.md$|^images/elasticsearch-curator/README.md|^docs/sbom.md
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
name: check spelling
exclude: ^helmfile\.d/upstream/|^helmfile\.d/charts/hnc/config-and-crds/crds/|^helmfile\.d/charts/grafana-dashboards/dashboards/scripts/|^tests/package-lock.json$
args:
- -L
- fpr
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.9.0
hooks:
- id: shellcheck
name: check scripts
exclude: ^helmfile\.d/upstream/|^helmfile\.d/charts/opensearch/configurer/files/configurer.sh$
require_serial: true
args:
- --color=always
- --external-sources
- repo: local
hooks:
- id: generate-cypress-tests
name: generate cypress tests
language: script
require_serial: true
files: '.*\.cy.js'
entry: tests/common/gen.bash
args:
- cypress
- id: generate-template-tests
name: generate template tests
language: script
require_serial: true
files: '.*\.bats.gotmpl'
entry: tests/common/gen.bash
args:
- template