Skip to content

Commit d0e5e63

Browse files
authored
Merge pull request #646 from per1234/spell-check-instructions
Print instructions for false positive resolution when spell check fails
2 parents c126ae4 + 8c7e1ea commit d0e5e63

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

Taskfile.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,16 @@ tasks:
599599
vars:
600600
POETRY_GROUPS: dev
601601
cmds:
602-
- poetry run codespell
602+
- |
603+
if
604+
! poetry run \
605+
codespell
606+
then
607+
echo
608+
echo "If this was a false positive, add the word to the ignore list. See:"
609+
echo "https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/spell-check-task.md#false-positives"
610+
exit 1
611+
fi
603612
604613
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-files-task/Taskfile.yml
605614
general:check-symlinks:

workflow-templates/assets/spell-check-task/Taskfile.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ tasks:
1010
vars:
1111
POETRY_GROUPS: dev
1212
cmds:
13-
- poetry run codespell
13+
- |
14+
if
15+
! poetry run \
16+
codespell
17+
then
18+
echo
19+
echo "If this was a false positive, add the word to the ignore list:"
20+
echo "https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/spell-check-task.md#false-positives"
21+
exit 1
22+
fi
1423
1524
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check-task/Taskfile.yml
1625
general:correct-spelling:

workflow-templates/spell-check-task.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ Commit the resulting changes to the `pyproject.toml` and `poetry.lock` files.
4545

4646
If the repository contains generated or vendored files, they can be excluded from the check by adding them to the `skip` field in the `.codespellrc` configuration file.
4747

48+
#### False positives
49+
4850
In the event of a false positive, the problematic word should be added, in all lowercase, to the `ignore-words-list` field of `./.codespellrc`. Regardless of the case of the word in the false positive, it must be in all lowercase in the ignore list. The ignore list is comma-separated with no spaces.
4951

5052
Reference:

0 commit comments

Comments
 (0)