Workflow file: spell-check-task.yml
Use codespell to check for commonly misspelled words in the repository files.
This is the version of the workflow for projects using the Task task runner tool.
The codespell
tool dependency is managed by Poetry.
Install Poetry by following these instructions:
https://python-poetry.org/docs/#installation
If your project does not already use Poetry, you can initialize the pyproject.toml
file using these commands:
poetry init --python="^3.9" --dev-dependency="codespell@^2.1.0"
poetry install
If already using Poetry, add the tool using this command:
poetry add --dev "codespell@^2.1.0"
Make sure to commit the resulting pyproject.toml
and poetry.lock
files.
- .codespellrc - codespell configuration file.
- Install to: repository root
- [
Taskfile.yml
](assets/spell-check-task/Taskfile.yml] - spell check and spelling correction tasks.- Install to: repository root (or add the
general:general:check-spelling
andgeneral:correct-spelling
tasks into the existingTaskfile.yml
)
- Install to: repository root (or add the
- [
Taskfile.yml
](assets/shared/Taskfile.yml] - Installation task.- Add the
poetry:install-deps
task into the existingTaskfile.yml
- Add the
Markdown badge:
[](https://github.com/REPO_OWNER/REPO_NAME/actions/workflows/spell-check-task.yml)
Replace the REPO_OWNER
and REPO_NAME
placeholders in the URLs with the final repository owner and name (example).
Asciidoc badge:
image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/spell-check-task.yml/badge.svg["Spell Check status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/spell-check-task.yml"]
Define the {repository-owner}
and {repository-name}
attributes and use them throughout the readme (example).
Add CI workflow to check for commonly misspelled words
On every push, pull request, and periodically, use the codespell to check for commonly
misspelled words.
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.
On every push, pull request, and periodically, use [codespell](https://github.com/codespell-project/codespell) to check for commonly misspelled words.
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.