Skip to content

Commit 780fb5e

Browse files
committed
Print instructions for false positive resolution when spell check fails
The assets include infrastructure to check for commonly misspelled words in the project files. Although the system is designed to reduce the incidence of false positives, they are still relatively common. For this reason, it is important to clearly communicate to the contributor how such false positives can be resolved. This can be accomplished effectively by printing instructions when the spell check fails. In order to avoid excessive verbosity of the output (note that the failure could just as well be a true positive), the description of the procedure is maintained in the asset documentation and the output message simply provides the URL of that documentation.
1 parent 926d5fa commit 780fb5e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Taskfile.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,16 @@ tasks:
236236
vars:
237237
POETRY_GROUPS: dev
238238
cmds:
239-
- poetry run codespell
239+
- |
240+
if ! {
241+
poetry run \
242+
codespell
243+
}; then
244+
echo
245+
echo "If this was a false positive, add the word to the ignore list:"
246+
echo "https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/spell-check-task.md#false-positives"
247+
exit 1
248+
fi
240249
241250
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check-task/Taskfile.yml
242251
general:correct-spelling:

0 commit comments

Comments
 (0)