Skip to content

Commit 98f7ff9

Browse files
committed
Adding typos crate with typos.toml, update and pin other actions
1 parent 3853d7c commit 98f7ff9

2 files changed

Lines changed: 73 additions & 5 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,18 @@ default_language_version:
55
exclude: '(stacks/_templates/minio-.*/rendered-chart\.yaml|\.svg)$'
66

77
repos:
8+
- repo: https://github.com/crate-ci/typos
9+
rev: 00f422f3b19c57bc6338715ebfe3316d38768461 # v1.50.3
10+
hooks:
11+
- id: typos
12+
# Drop the upstream default `--write-changes` so the hook reports and
13+
# fails instead of rewriting files.
14+
# Keep `--force-exclude` so the
15+
# excludes in typos.toml still apply to the paths prek passes in.
16+
args: ["--force-exclude"]
17+
818
- repo: https://github.com/pre-commit/pre-commit-hooks
9-
rev: v6.0.0 # 4.6.0
19+
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # 6.0.0
1020
hooks:
1121
- id: trailing-whitespace
1222
- id: end-of-file-fixer
@@ -16,23 +26,23 @@ repos:
1626
exclude: '^stacks/argo-cd-git-ops/secrets/sealed-secrets-key\.yaml$'
1727

1828
- repo: https://github.com/adrienverge/yamllint
19-
rev: v1.37.1 # 1.35.1
29+
rev: cba56bcde1fdd01c1deb3f945e69764c291a6530 # 1.38.0
2030
hooks:
2131
- id: yamllint
2232

2333
- repo: https://github.com/igorshubovych/markdownlint-cli
24-
rev: v0.46.0 # 0.41.0
34+
rev: a4d5d37e66ebcd6b3705204a1d6dbb56dea66338 # 0.49.0
2535
hooks:
2636
- id: markdownlint
2737

2838
- repo: https://github.com/koalaman/shellcheck-precommit
29-
rev: v0.11.0 # 0.10.0
39+
rev: 99470f5e12208ff0fb17ab81c3c494f7620a1d8d # 0.11.0
3040
hooks:
3141
- id: shellcheck
3242
args: ["--severity=info"]
3343

3444
- repo: https://github.com/rhysd/actionlint
35-
rev: e7d448ef7507c20fc4c88a95d0c448b848cd6127 # 1.7.8
45+
rev: 914e7df21a07ef503a81201c76d2b11c789d3fca # 1.7.12
3646
hooks:
3747
- id: actionlint
3848

‎typos.toml‎

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Configuration for typos (https://github.com/crate-ci/typos), run via the prek
2+
# hook in .pre-commit-config.yaml.
3+
#
4+
# Before adding an entry here, consider an in-place marker instead. Use one when
5+
# the word is correct at this one site and would still be a typo elsewhere:
6+
#
7+
# # spellchecker:disable-line at the end of the line it applies to
8+
# # spellchecker:ignore-next-line on its own line, above the offending line
9+
# # spellchecker:off / :on around a block
10+
#
11+
# Every entry below gets a one-line comment saying what the word is.
12+
13+
[files]
14+
# Bare `typos` skips hidden dirs by default, but prek passes explicit paths and
15+
# so does check them. Turn it off so both agree.
16+
ignore-hidden = false
17+
18+
extend-exclude = [
19+
# `.git` itself, which ignore-hidden = false would otherwise pull in.
20+
".git/",
21+
# Generated by generate-embeddings-local.py from a crawl of
22+
# docs.stackable.tech. Typos in it belong to the documentation repository.
23+
"demos/opensearch-rag/embeddings/stackable-docs-embeddings.json",
24+
# Base64-encoded demo key material, not prose.
25+
"stacks/argo-cd-git-ops/secrets/sealed-secrets-key.yaml",
26+
]
27+
28+
[default]
29+
# typos has no native suppression directive
30+
# (https://github.com/crate-ci/typos/issues/316), so these regexes provide one.
31+
# They cover `#`, `//`, `<!-- -->`, `;`, `/* */` and Jinja `{# #}` comments,
32+
# which spans every file type in this repo.
33+
#
34+
# Both failure modes are safe:
35+
# * unterminated `:off` suppresses nothing rather than swallowing the rest of the file.
36+
# * `disable-line` only matches when the marker ends the line.
37+
extend-ignore-re = [
38+
"(?Rm)^.*(#|//|<!--|;|/\\*)\\s*spellchecker:disable-line\\s*(-->|#\\}|\\*/)?\\s*$",
39+
"(#|//|<!--|;|/\\*)\\s*spellchecker:ignore-next-line\\s*(-->|#\\}|\\*/)?\\s*\\n.*",
40+
"(?s)(#|//|<!--|;|/\\*|\")\\s*spellchecker:off\\s*(-->|#\\}|\\*/|\")?.*?(#|//|<!--|;|/\\*|\")\\s*spellchecker:on\\s*(-->|#\\}|\\*/|\")?",
41+
# Random Kafka topic IDs in `kafka-topics.sh --describe` output. They sit
42+
# inside AsciiDoc listing blocks, where a marker would render verbatim.
43+
"TopicId:\\s*\\S+",
44+
]
45+
46+
[type.jupyter]
47+
# Random notebook cell IDs. JSON has no comments, so no marker can go here.
48+
extend-ignore-re = [
49+
"\"id\": \"[0-9a-z]+\"",
50+
]
51+
52+
[default.extend-words]
53+
# Azure Kubernetes Service. Appears in docs/modules/demos/pages/argo-cd-git-ops.adoc.
54+
# A single lowercase entry covers every casing, so no separate `AKS` entry is needed.
55+
aks = "aks"
56+
# Apache Druid's ingestion row-stats field name, referenced verbatim in the
57+
# Druid demo docs.
58+
unparseable = "unparseable"

0 commit comments

Comments
 (0)