Skip to content

Commit 46ad090

Browse files
committed
Use configuration file to configure spell checker tool
Support for a configuration file was added in the 2.0.0 release of the codespell tool used for spell check in this repository. Use of this file allows consolidating all the configuration options in a single place, rather than having some in `etc/codespell-ignore-words-list.txt` and the others in the taskfile.
1 parent e17a1a9 commit 46ad090

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

.codespellrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check/.codespellrc
2+
# See: https://github.com/codespell-project/codespell#using-a-config-file
3+
[codespell]
4+
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
5+
ignore-words-list = ot,propert
6+
builtin = clear,informal,en-GB_to_en-US
7+
check-filenames =
8+
check-hidden =
9+
skip = ./.git,./go.mod,./go.sum,./package-lock.json,./poetry.lock,./yarn.lock,./arduino-lint,./arduino-lint.exe,./internal/rule/rulefunction/testdata/libraries/MisspelledSentenceParagraphValue/library.properties,./site

Taskfile.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ vars:
3434

3535
3636

37-
CODESPELL_SKIP_OPTION: '--skip "./.git,go.mod,go.sum,./arduino-lint,./arduino-lint.exe,./internal/rule/rulefunction/testdata/libraries/MisspelledSentenceParagraphValue/library.properties,./site"'
38-
CODESPELL_IGNORE_WORDS_OPTION: "--ignore-words ./etc/codespell-ignore-words-list.txt"
39-
4037
tasks:
4138
build:
4239
desc: Build the project
@@ -409,10 +406,10 @@ tasks:
409406
desc: Check for commonly misspelled words
410407
cmds:
411408
- poetry install --no-root
412-
- poetry run codespell {{.CODESPELL_SKIP_OPTION}} {{.CODESPELL_IGNORE_WORDS_OPTION}}
409+
- poetry run codespell
413410

414411
correct-spelling:
415412
desc: Correct commonly misspelled words where possible
416413
cmds:
417414
- poetry install --no-root
418-
- poetry run codespell --write-changes {{.CODESPELL_SKIP_OPTION}} {{.CODESPELL_IGNORE_WORDS_OPTION}}
415+
- poetry run codespell --write-changes

etc/codespell-ignore-words-list.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)