Skip to content

Commit 30d1bab

Browse files
feat: Rollout crate/typos for operators (#1092)
* chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@0f53eec Reference-to: stackabletech/operator-templating@0f53eec (feat: Rollout crate/typos for operators) * chore: Add typos.toml and fix spelling findings --------- Co-authored-by: Maxi Wittich <maximilian.wittich@stackable.tech>
1 parent 4c29b43 commit 30d1bab

5 files changed

Lines changed: 61 additions & 3 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ default_language_version:
77
node: system
88

99
repos:
10+
# The word lists live in a per-repo `typos.toml`, which is not templated.
11+
# typos has no layered configuration (https://github.com/crate-ci/typos/issues/193).
12+
# A templated config can currently not be extended locally.
13+
- repo: https://github.com/crate-ci/typos
14+
rev: 00f422f3b19c57bc6338715ebfe3316d38768461 # v1.50.3
15+
hooks:
16+
- id: typos
17+
# Drop the upstream default `--write-changes` so the hook only
18+
# reports failures instead of writing changes.
19+
# Keep `--force-exclude` so the excludes in typos.toml still
20+
# apply to the paths prek passes in.
21+
args: ["--force-exclude"]
22+
1023
- repo: https://github.com/pre-commit/pre-commit-hooks
1124
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # 6.0.0
1225
hooks:

‎docs/modules/zookeeper/pages/znodes.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ as it sees fit. This can be thought of like a namespace for that client, and pre
99

1010
The Stackable Operator for Apache ZooKeeper manages ZNodes using the _ZookeeperZnode_ resource.
1111

12-
IMPORTANT: The Operator connects directly to ZooKeeper to manage the ZNodes inside of the ZooKeeper ensemble. This means that network access to the ZooKeeper pods is necessary. If your Kubernetes cluster restricts network acess, you need to configure a NetworkPolicy to allow the operator to connect to ZooKeeper.
12+
IMPORTANT: The Operator connects directly to ZooKeeper to manage the ZNodes inside of the ZooKeeper ensemble. This means that network access to the ZooKeeper pods is necessary. If your Kubernetes cluster restricts network access, you need to configure a NetworkPolicy to allow the operator to connect to ZooKeeper.
1313

1414
== Configuring ZNodes
1515

‎rust/operator-binary/src/crd/security.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl ZookeeperSecurity {
9393
pub const SSL_QUORUM_TRUST_STORE_PASSWORD: &'static str = "ssl.quorum.trustStore.password";
9494
pub const SSL_TRUST_STORE_LOCATION: &'static str = "ssl.trustStore.location";
9595
pub const SSL_TRUST_STORE_PASSWORD: &'static str = "ssl.trustStore.password";
96-
// Mis
96+
// Miscellaneous
9797
pub const SYSTEM_TRUST_STORE_DIR: &'static str = "/etc/pki/java/cacerts";
9898
pub const TRUSTSTORE_FILE: &'static str = "truststore.p12";
9999

‎rust/operator-binary/src/zk_controller/build/command.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::crd::{STACKABLE_CONFIG_DIR, STACKABLE_DATA_DIR, STACKABLE_RW_CONFIG_D
22

33
pub fn create_init_container_command_args() -> Vec<String> {
44
vec![
5-
// copy config files to a writeable empty folder in order to set key and
5+
// copy config files to a writable empty folder in order to set key and
66
// truststore passwords in the init container via script
77
format!(
88
"echo copying {conf} to {rw_conf}",

‎typos.toml‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Configuration for typos (https://github.com/crate-ci/typos), run via the prek
2+
# hook in .pre-commit-config.yaml.
3+
4+
[files]
5+
# Bare `typos` skips hidden dirs by default, but prek passes explicit paths and
6+
# so does check them. Turn it off so both agree.
7+
ignore-hidden = false
8+
9+
extend-exclude = [
10+
# Ignore `.git`, which the above `ignore-hidden = false` would otherwise pull in.
11+
".git/",
12+
# Generated by crate2nix (`make regenerate-nix`). Already skipped by the prek
13+
# top-level `exclude`; listed here so a bare `typos` run agrees.
14+
"Cargo.nix",
15+
# Generated by `make regenerate-charts` from the Rust doc comments, which are
16+
# checked at their source. The rest is Kubernetes' own schema documentation.
17+
"extra/crds.yaml",
18+
]
19+
20+
[default]
21+
# typos has no native suppression directive
22+
# (https://github.com/crate-ci/typos/issues/316), so these regexes provide one.
23+
# A marker must sit in a comment: after `#`, `//` or `;` (free text may follow),
24+
# or inside a closed `<!-- -->`, `/* */` or `{# #}` (free text may precede the
25+
# closer). An unterminated `typos:ignore-block-start` suppresses nothing.
26+
#
27+
# Use one of the following when the word is correct at one place but would still be a typo elsewhere:
28+
#
29+
# # typos:ignore-line at the end of the line it applies to
30+
# # typos:ignore-next-line on its own line, above the offending line
31+
# # typos:ignore-block-start / typos:ignore-block-end around a block
32+
extend-ignore-re = [
33+
'(?Rm)^.*?(?:(?:^|[^{])(?:#|//|;)[ \t]*typos:ignore-line\b.*|(?:<!--[ \t]*typos:ignore-line\b.*?-->|/\*[ \t]*typos:ignore-line\b.*?\*/|\{#[ \t]*typos:ignore-line\b.*?#\})[ \t]*)$',
34+
'(?Rm)^[ \t]*(?:(?:#|//|;)[ \t]*typos:ignore-next-line\b.*|(?:<!--[ \t]*typos:ignore-next-line\b.*?-->|/\*[ \t]*typos:ignore-next-line\b.*?\*/|\{#[ \t]*typos:ignore-next-line\b.*?#\})[ \t]*)\r?\n.*$',
35+
'(?ms)(?:(?:^|[^{])(?:#|//|;)[ \t]*typos:ignore-block-start\b|<!--[ \t]*typos:ignore-block-start\b[^\n]*?-->|/\*[ \t]*typos:ignore-block-start\b[^\n]*?\*/|\{#[ \t]*typos:ignore-block-start\b[^\n]*?#\}).*?(?:(?:^|[^{])(?:#|//|;)[ \t]*typos:ignore-block-end\b|<!--[ \t]*typos:ignore-block-end\b[^\n]*?-->|/\*[ \t]*typos:ignore-block-end\b[^\n]*?\*/|\{#[ \t]*typos:ignore-block-end\b[^\n]*?#\})',
36+
# Random draw.io cell IDs in `.drawio.svg` files, both in the rendered SVG
37+
# (`data-cell-id="..."`) and in the embedded diagram source (`id=&quot;...&quot;`).
38+
'(?:id|source|target|parent)=(?:"|&quot;)[A-Za-z0-9_-]{20}-\d+',
39+
]
40+
41+
# Before adding an entry in here, consider an in-place marker instead.
42+
# Every entry below gets a one-line comment saying what the word is.
43+
[default.extend-words]
44+
# Azure Kubernetes Service
45+
aks = "aks"

0 commit comments

Comments
 (0)