-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
194 lines (170 loc) · 6.92 KB
/
.pre-commit-config.yaml
File metadata and controls
194 lines (170 loc) · 6.92 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
---
default_language_version:
node: system
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # 5.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: 79a6b2b1392eaf49cdd32ac4f14be1a809bbd8f7 # 1.37.1
hooks:
- id: yamllint
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: 192ad822316c3a22fb3d3cc8aa6eafa0b8488360 # 0.45.0
hooks:
- id: markdownlint
- repo: https://github.com/koalaman/shellcheck-precommit
rev: 2491238703a5d3415bb2b7ff11388bf775372f29 # 0.10.0
hooks:
- id: shellcheck
args: ["--severity=info"]
- repo: https://github.com/rhysd/actionlint
rev: 03d0035246f3e81f36aed592ffb4bebf33a03106 # 1.7.7
hooks:
- id: actionlint
- repo: https://github.com/hadolint/hadolint
rev: b3555ba9c2bfd9401e79f2f0da68dd1ae38e10c7 # 2.12.0
hooks:
- id: hadolint
- repo: local
hooks:
- id: .scripts/verify-crate-versions
name: .scripts/verify-crate-versions
language: system
entry: .scripts/verify_crate_versions.sh
stages: [pre-commit, pre-merge-commit, manual]
pass_filenames: false
- id: cargo-doc
name: cargo-doc
language: system
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-no-default-features
name: cargo-doc-no-default-features
language: system
entry: cargo doc --no-deps --no-default-features --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
entry: cargo doc --no-deps --all-features --document-private-items
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$|Cargo\.(toml|lock)
# As long as we run tests for every contained crate (to test turning off all features),
# we don't need to re-run them here
# - id: cargo-test
# name: cargo-test
# language: system
# entry: cargo test --workspace
# stages: [pre-commit, pre-merge-commit]
# pass_filenames: false
# files: \.rs$|Cargo\.(toml|lock)
# - id: cargo-test-no-default-features
# name: cargo-test-no-default-features
# language: system
# entry: cargo test --no-default-features --workspace
# stages: [pre-commit, pre-merge-commit]
# pass_filenames: false
# files: \.rs$|Cargo\.(toml|lock)
- id: cargo-test-all-features
name: cargo-test-all-features
language: system
entry: cargo test --all-features --workspace
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$|Cargo\.(toml|lock)
- id: cargo-test-k8s-version-no-default-features
name: cargo-test-k8s-version-no-default-features
language: system
entry: cargo test --no-default-features --package k8s-version
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$|Cargo\.(toml|lock)
- id: cargo-test-stackable-certs-no-default-features
name: cargo-test-stackable-certs-no-default-features
language: system
entry: cargo test --no-default-features --package stackable-certs
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$|Cargo\.(toml|lock)
- id: cargo-test-stackable-operator-no-default-features
name: cargo-test-stackable-operator-no-default-features
language: system
entry: cargo test --no-default-features --package stackable-operator
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$|Cargo\.(toml|lock)
- id: cargo-test-stackable-operator-derive-no-default-features
name: cargo-test-stackable-operator-derive-no-default-features
language: system
entry: cargo test --no-default-features --package stackable-operator-derive
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$|Cargo\.(toml|lock)
- id: cargo-test-stackable-shared-no-default-features
name: cargo-test-stackable-shared-no-default-features
language: system
entry: cargo test --no-default-features --package stackable-shared
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$|Cargo\.(toml|lock)
- id: cargo-test-stackable-telemetry-no-default-features
name: cargo-test-stackable-telemetry-no-default-features
language: system
entry: cargo test --no-default-features --package stackable-telemetry
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$|Cargo\.(toml|lock)
- id: cargo-test-stackable-versioned-no-default-features
name: cargo-test-stackable-versioned-no-default-features
language: system
entry: cargo test --no-default-features --package stackable-versioned
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$|Cargo\.(toml|lock)
- id: cargo-test-stackable-versioned-macros-no-default-features
name: cargo-test-stackable-versioned-macros-no-default-features
language: system
entry: cargo test --no-default-features --package stackable-versioned-macros
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$|Cargo\.(toml|lock)
- id: cargo-test-stackable-webhook-no-default-features
name: cargo-test-stackable-webhook-no-default-features
language: system
entry: cargo test --no-default-features --package stackable-webhook
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$|Cargo\.(toml|lock)
- id: cargo-rustfmt
name: cargo-rustfmt
language: system
# Pinning to a specific rustc version, so that we get consistent formatting
entry: cargo +nightly-2026-02-24 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$
- id: crd-preview
name: crd-preview
language: system
entry: cargo xtask crd preview
stages: [pre-commit, pre-merge-commit]
pass_filenames: false
files: \.rs$