Skip to content

Latest commit

 

History

History
79 lines (51 loc) · 3.29 KB

spell-check-task.md

File metadata and controls

79 lines (51 loc) · 3.29 KB

"Spell Check" workflow (Task)

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.

Installation

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.

Assets

  • .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 and general:correct-spelling tasks into the existing Taskfile.yml)
  • [Taskfile.yml](assets/shared/Taskfile.yml] - Installation task.
    • Add the poetry:install-deps task into the existing Taskfile.yml

Readme badge

Markdown badge:

[![Spell Check status](https://github.com/REPO_OWNER/REPO_NAME/actions/workflows/spell-check-task.yml/badge.svg)](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).

Commit message

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.

PR message

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.