Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
111 lines (98 loc) · 3.5 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
111 lines (98 loc) · 3.5 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
---
default_language_version:
node: system
repos:
- repo: https://github.com/crate-ci/typos
rev: 00f422f3b19c57bc6338715ebfe3316d38768461 # v1.50.3
hooks:
- id: typos
# Drop the upstream default `--write-changes` so the hook only
# reports failures instead of writing changes.
# Keep `--force-exclude` so the excludes in typos.toml still
# apply to the paths the hook is given.
args: ['--force-exclude']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # 6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- id: detect-private-key
- repo: https://github.com/adrienverge/yamllint
rev: cba56bcde1fdd01c1deb3f945e69764c291a6530 # 1.38.0
hooks:
- id: yamllint
args: ['--strict']
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: 76b3d32d3f4b965e1d6425253c59407420ae2c43 # 0.47.0
hooks:
- id: markdownlint
types: [text]
files: \.md(\.j2)*$
- repo: https://github.com/koalaman/shellcheck-precommit
rev: 99470f5e12208ff0fb17ab81c3c494f7620a1d8d # 0.11.0
hooks:
- id: shellcheck
args: ['--severity=info']
- repo: https://github.com/rhysd/actionlint
rev: 393031adb9afb225ee52ae2ccd7a5af5525e03e8 # 1.7.11
hooks:
- id: actionlint
- repo: https://github.com/hadolint/hadolint
rev: 57e1618d78fd469a92c1e584e8c9313024656623 # 2.14.0
hooks:
- id: hadolint
- repo: local
hooks:
# ── Fix variant (runs locally on commit — auto-fixes where possible) ──
- id: npm-lint-fix
name: npm lint with --fix (prettier + eslint)
language: system
entry: npm run lint:fix
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.(svelte|ts|js|css|html|json|md)$
# ── Check-only variant (runs in CI — no auto-fix) ──
- id: npm-lint
name: npm lint check only (prettier + eslint)
language: system
entry: npm run lint
stages: [manual]
pass_filenames: false
files: \.(svelte|ts|js|css|html|json|md)$
# ── Shared hooks (same behaviour locally and in CI) ──
- id: npm-check
name: npm check (svelte-check)
language: system
entry: npm run check
stages: [pre-commit, pre-merge-commit, manual]
pass_filenames: false
files: \.(svelte|ts|js)$
- id: npm-arch-test
name: npm arch test (fitness functions)
language: system
entry: npm run test:arch
stages: [pre-commit, pre-merge-commit, manual]
pass_filenames: false
- id: helm-lint
name: helm lint
language: system
entry: helm lint deploy/helm/cockpit
stages: [pre-commit, pre-merge-commit, manual]
pass_filenames: false
files: ^deploy/helm/
- id: helm-template
name: helm template
language: system
entry: >-
bash -c '
helm template test deploy/helm/cockpit
--set auth.oidc.discoveryUrl=https://stub
--set auth.oidc.clientId=stub
--set auth.oidc.clientSecret.secretKeyRef.name=stub
--set database.host=stub
--set database.password.secretKeyRef.name=stub > /dev/null'
stages: [pre-commit, pre-merge-commit, manual]
pass_filenames: false
files: ^deploy/helm/