Skip to content

Commit 256d281

Browse files
committed
chore: from mdspell to codespell #15149
Related #15149 mdspell is a bit too strict let's explore an alternative. I see codespell has a good amount of starts and it looks maintained. Signed-off-by: Gianluca Arbezzano <[email protected]>
1 parent 0c77432 commit 256d281

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

.codespell-ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
aks

.features/pending/deprecate-36.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ Authors: [Alan Clucas](https://github.com/Joibel)
33
Component: General
44
Issues: 14977
55

6-
Deprecation: remove singluar `mutex`, `semaphore` and `schedule` from the specs, all were replaced by the plural version in 3.6
6+
Deprecation: remove singular `mutex`, `semaphore` and `schedule` from the specs, all were replaced by the plural version in 3.6

Makefile

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ TOOL_SNIPDOC := $(HOME)/.local/bin/snipdoc
166166
# npm bin -g will do this on later npms than we have
167167
NVM_BIN ?= $(shell npm config get prefix)/bin
168168
TOOL_CLANG_FORMAT := /usr/local/bin/clang-format
169-
TOOL_MDSPELL := $(NVM_BIN)/mdspell
169+
TOOL_CODESPELL := /usr/local/bin/codespell
170170
TOOL_MARKDOWN_LINK_CHECK := $(NVM_BIN)/markdown-link-check
171171
TOOL_MARKDOWNLINT := $(NVM_BIN)/markdownlint
172172
TOOL_DEVCONTAINER := $(NVM_BIN)/devcontainer
@@ -830,16 +830,27 @@ docs/cli/argo.md: $(CLI_PKG_FILES) go.sum ui/dist/app/index.html hack/docs/cli.g
830830
docs/go-sdk-guide.md: $(TOOL_SNIPDOC)
831831
$(TOOL_SNIPDOC) run
832832

833-
$(TOOL_MDSPELL): Makefile
834833
# update this in Nix when upgrading it here
835834
ifneq ($(USE_NIX), true)
836835
npm list -g [email protected] > /dev/null || npm i -g [email protected]
837836
endif
838837

838+
$(TOOL_CODESPELL): Makefile
839+
840+
$(TOOL_CODESPELL):
841+
ifeq (, $(shell which codespell))
842+
ifeq ($(shell uname),Darwin)
843+
brew install codespell
844+
else
845+
sudo apt update
846+
sudo apt install -y codespell
847+
endif
848+
endif
849+
839850
.PHONY: docs-spellcheck
840-
docs-spellcheck: $(TOOL_MDSPELL) docs/metrics.md ## Spell check docs
851+
docs-spellcheck: $(TOOL_CODESPELL) docs/metrics.md ## Spell check docs
841852
# check docs for spelling mistakes
842-
$(TOOL_MDSPELL) --ignore-numbers --ignore-acronyms --en-us --no-suggestions --report $(shell find docs -name '*.md' -not -name upgrading.md -not -name README.md -not -name fields.md -not -name workflow-controller-configmap.md -not -name upgrading.md -not -name executor_swagger.md -not -path '*/cli/*' -not -name tested-kubernetes-versions.md -not -name new-features.md)
853+
$(TOOL_CODESPELL) --quiet-level=2 --check-filenames --ignore-words=.codespell-ignore --check-hidden "docs/**/*.md"
843854
# alphabetize spelling file -- ignore first line (comment), then sort the rest case-sensitive and remove duplicates
844855
$(shell cat .spelling | awk 'NR<2{ print $0; next } { print $0 | "LC_COLLATE=C sort" }' | uniq > .spelling.tmp && mv .spelling.tmp .spelling)
845856

docs/configure-artifact-repository.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ $ #create a ram user to access bucket.
394394
$ aliyun ram CreateUser --UserName $mybucket-user
395395
$ # create ram policy with the limit permission.
396396
$ aliyun ram CreatePolicy --PolicyName $mybucket-policy --PolicyDocument "$(cat policy.json)"
397-
$ # attch ram policy to the ram user.
397+
$ # attach ram policy to the ram user.
398398
$ aliyun ram AttachPolicyToUser --UserName $mybucket-user --PolicyName $mybucket-policy --PolicyType Custom
399399
$ # create access key and secret key for the ram user.
400400
$ aliyun ram CreateAccessKey --UserName $mybucket-user > access-key.json

0 commit comments

Comments
 (0)