Skip to content

Latest commit

 

History

History
92 lines (58 loc) · 3.83 KB

spell-check-task.md

File metadata and controls

92 lines (58 loc) · 3.83 KB

"Spell Check" workflow (Task)

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

Workflow

Install the spell-check-task.yml GitHub Actions workflow to .github/workflows/

Assets

  • .codespellrc - codespell configuration file.
    • Install to: repository root
  • Taskfile.yml - spell check and spelling correction tasks.
    • Install to: repository root (or merge into the existing Taskfile.yml).
  • Taskfile.yml - Installation task.
    • Merge into Taskfile.yml

Dependencies

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.2.1"
poetry install

If already using Poetry, add the tool using this command:

poetry add --dev "codespell@^2.2.1"

Commit the resulting pyproject.toml and poetry.lock files.

Configuration

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.

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.

Reference: https://github.com/codespell-project/codespell#using-a-config-file

Readme badge

Markdown badge:

[![Spell Check status](https://github.com/TODO_REPO_OWNER/TODO_REPO_NAME/actions/workflows/spell-check-task.yml/badge.svg)](https://github.com/TODO_REPO_OWNER/TODO_REPO_NAME/actions/workflows/spell-check-task.yml)

Replace the TODO_REPO_OWNER and TODO_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 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.