-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
160 lines (140 loc) · 5.01 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
160 lines (140 loc) · 5.01 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# This file is automatically generated from the templates in stackabletech/operator-templating
# DO NOT MANUALLY EDIT THIS FILE
---
exclude: ^(Cargo\.nix|crate-hashes\.json|nix/.*)$
default_language_version:
node: system
repos:
- 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/EmbarkStudios/cargo-deny
rev: 1c9ca2b643ee15722178c1350501aabb024dd6f3 # 0.19.9
hooks:
- id: cargo-deny
args: ["--all-features", "check", "advisories", "bans", "licenses", "sources"]
- repo: https://github.com/adrienverge/yamllint
rev: 79a6b2b1392eaf49cdd32ac4f14be1a809bbd8f7 # 1.37.1
hooks:
- id: yamllint
args: ["--strict"]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: a4d5d37e66ebcd6b3705204a1d6dbb56dea66338 # 0.49.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"]
# Temporarily needed until all getting_started.sh.j2 scripts are made non-executable.
# As long as they are, prek will treat them as shell scripts and so this hook will fail.
# pre-commit behaves differently apparently and doesn't pass .j2 files to this hook.
exclude: \.j2$
# WARNING (@NickLarsenNZ): Nix users need to install ruff first.
# If you do not, you will need to delete the cached ruff binary shown in the
# error message
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: c59bba8fb259db0fec2bbb77ad8ba51ea7341b56 # 0.15.20
hooks:
# Run the linter.
- id: ruff-check
# Run the formatter.
- id: ruff-format
- repo: https://github.com/rhysd/actionlint
rev: 914e7df21a07ef503a81201c76d2b11c789d3fca # 1.7.12
hooks:
- id: actionlint
- repo: https://github.com/hadolint/hadolint
rev: 57e1618d78fd469a92c1e584e8c9313024656623 # 2.14.0
hooks:
- id: hadolint
- repo: local
hooks:
- id: script-tests
name: script-tests
language: system
entry: python3 -m unittest discover --start-directory scripts --pattern '*.py'
pass_filenames: false
files: ^scripts/.*\.py$
- id: check-namespaced-defines
name: check-namespaced-defines
language: system
entry: python3 scripts/check_namespaced_defines.py
files: ^deploy/helm/[^/]+/templates/
- id: regenerate-charts
name: regenerate-charts
language: system
entry: make regenerate-charts
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$|Cargo\.(toml|lock)
- id: regenerate-nix
name: regenerate-nix
language: system
entry: make regenerate-nix
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: Cargo\.lock
- id: check-readme
name: check-readme
language: system
entry: make render-readme
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: .readme
- id: cargo-doc
name: cargo-doc
language: system
env:
RUSTDOCFLAGS: "-D warnings"
entry: cargo doc --no-deps --document-private-items
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$|Cargo\.(toml|lock)
- id: cargo-doc-all-features
name: cargo-doc-all-features
language: system
env:
RUSTDOCFLAGS: "-D warnings"
entry: cargo doc --no-deps --document-private-items --all-features
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$|Cargo\.(toml|lock)
- id: cargo-doc-no-default-features
name: cargo-doc-no-default-features
language: system
env:
RUSTDOCFLAGS: "-D warnings"
entry: cargo doc --no-deps --document-private-items --no-default-features
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$|Cargo\.(toml|lock)
- id: cargo-test
name: cargo-test
language: system
entry: cargo test
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$|Cargo\.(toml|lock)
- id: cargo-rustfmt
name: cargo-rustfmt
language: system
entry: cargo +nightly-2026-08-23 fmt --all -- --check
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$
- id: cargo-clippy
name: cargo-clippy
language: system
entry: cargo clippy --all-targets -- -D warnings
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$