-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.pre-commit-config.yaml
90 lines (84 loc) · 2.98 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
88
89
90
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-executables-have-shebangs
- id: check-merge-conflict
exclude: ^helmfile.d/upstream/opensearch-project/opensearch/CHANGELOG.md$
- id: check-json
exclude: ^helmfile\.d/upstream/
- id: check-toml
exclude: ^helmfile\.d/upstream/
- id: check-yaml
exclude: ^helmfile\.d/.*/templates/|^helmfile\.d/upstream/|^helmfile\.d/state.yaml$
args:
- --allow-multiple-documents
- id: detect-private-key
exclude: ^helmfile\.d/upstream/
- id: end-of-file-fixer
exclude: ^helmfile\.d/upstream/|^tests/.*/.*\.out$
- id: mixed-line-ending
exclude: ^helmfile\.d/upstream/
- id: no-commit-to-branch
- id: trailing-whitespace
exclude: ^helmfile\.d/upstream/|^tests/.*/.*\.out$
- 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
- id: shellcheck
name: check scripts
types: [shell]
exclude_types: [csh, tcsh, zsh]
exclude: ^helmfile\.d/charts/opensearch/configurer/files/|^helmfile\.d/upstream/|^images/elasticsearch-curator/
language: script
require_serial: true
entry: scripts/run-from-container.sh
args:
- --network=none
- docker.io/koalaman/shellcheck:v0.10.0@sha256:2097951f02e735b613f4a34de20c40f937a6c8f18ecb170612c88c34517221fb
- --color=always
- --external-sources
- id: shfmt
name: format scripts
types: [shell]
exclude_types: [csh, tcsh, zsh]
exclude: ^helmfile\.d/charts/opensearch/configurer/files/|^helmfile\.d/upstream/|^images/elasticsearch-curator/
language: script
require_serial: true
entry: scripts/run-from-container.sh
args:
- --network=none
- docker.io/mvdan/shfmt:v3.10.0@sha256:d19cc37644449fe9a488f234d2c0cf0b770eaf6a5a40e30103e8099013ef8f9e
- -w
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
name: check spelling
exclude: ^helmfile\.d/charts/hnc/config-and-crds/crds/|^helmfile\.d/upstream/
args:
- -I
- .codespellignore
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.14.0
hooks:
- id: markdownlint-cli2
name: lint markdown files
exclude: ^changelog/|^docs/sbom.md$|^helmfile\.d/charts/opensearch/configurer/files/|^helmfile\.d/upstream/|^images/elasticsearch-curator/
args:
- --fix