Spellcheck Github Actions
Spell check action
Install / Use
npx skills add rojopolis/spellcheck-github-actionsInstalls into whichever agent you are using.
README
spellcheck-github-actions
<!-- omit from toc -->![Markdownlint Action][GHAMKDBADGE]
![Spellcheck Action][GHASPLLBADGE]
A GitHub Action that spell checks Python, Markdown, and Text files.
This action uses [PySpelling][pyspelling] to check spelling in source files in the designated repository.
Table of Contents
- Features
- Configuration
- Specifying Sources Files To Check
- Examples
- No spaces, quotes not required
- No spaces, quotes not required, double quotes used for complete parameter
- No spaces, quotes not required, double quotes used for single parameters
- Spaces, quotes required, single quotes used
- Spaces, quotes required, double quotes used
- Spaces, quotes required, intermixed quotes, will not work
- Examples
- Specify a Specific Task To Run
- Specify a PySpelling Output Artifact
- Spellcheck Configuration File
- Specifying Number of Jobs for Parallel Processing
- Specifying Language and spellchecker
- Checking For Bad Spelling
- Language Support
- Configuring Action to Skip Custom Dictionary Compilation if Not Needed
- Tips
- Diagnostics
- Diagnostic text:
!!!Spelling check failed!!! - Diagnostic text:
RuntimeError: None of the source targets from the configuration match any files: - Diagnostic text:
FileNotFoundError: [Errno 2] No such file or directory: '.wordlist.txt' - Diagnostic text:
ValueError: Unable to find or load pyspelling configuration from - Diagnostic text:
ERROR: *.md -- 'NoneType' object has no attribute 'end' - Diagnostic text:
ValueError: Pipline step in unexpected format: - Diagnostic text:
re.error: global flags not at the start of the expression at position 1
- Diagnostic text:
- DockerHub
- Development
- Resources and References
- Author
- Acknowledgements
- Copyright and License
Features
- Customizable configuration and spell checking using [PySpelling][pyspelling]
- Support for the following formats (via PySpelling):
- Markdown
- Python
- C++
- HTML
- JavaScript
- ODF
- OOXML
- CSS
- XML
- Plain text
- Support for
aspellandhunspell, Do see the section on Language Support for details - Support for the following languages:
- English
- French
- German
- Italian
- Spanish
- Russian
- Ukrainian
- Portuguese
- Do see the section on Language Support for details
- Per repository and format custom word list to avoid errors based on words not known to default dictionary, see: PySpelling for more options
- Flexible repository layout integration via file name matching using [Wildcard Match][wcmatch]
- Support for Python's Markdown extensions, namely the [pymdown-extensions] via [PySpelling][pyspelling]
Configuration
- First you have to add a configuration for the spelling checker
- Create a file named:
.spellcheck.ymlor.spellcheck.yaml, do note if both files exist the prior will have precedence. Do note the recommendation is hidden files since these configuration files are not first rate citizens of your repository. You can also provide your own configuration file. Check out spellcheck configuration section down below. - Paste the contents of the outlined example, which is a configuration for Markdown, useful for your README file
Do note that this action requires the contents of the repository, so it is recommended used with [the Checkout action][actioncheckout].
You have to define this part in your workflow, since it not a part of the action itself.
Example:
name: Spellcheck Action
on: push
permissions:
contents: read
jobs:
build:
name: Spellcheck
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Spellcheck
uses: rojopolis/spellcheck-github-actions@0.65.0
This configuration file must be created in a the .github/workflows/ directory.
For example, it could be named .github/workflows/spelling_action.yml for easy identification, if other actions are present.
Using a Canonical Version
In the above example, the configuration is pointing to the exact version of 0.51.0, this repository also offers the canonical version v0, so there is less hassle keeping the action up to date.
name: Spellcheck Action
on: push
permissions:
contents: read
jobs:
build:
name: Spellcheck
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Spellcheck
uses: rojopolis/spellcheck-github-actions@v0
Specifying Sources Files To Check
By default, this action will use the sources: list under each task in your config file to identify which files to scan. You can override this behaviour by setting source_files to the list of files or file patterns you want scanning.
When this option is used, you must also specify the task_name to override the sources: list for.
Do note that file paths containing spaces need to be quoted using either ' (single quotes) or " (double quotes). The quoting has to be uniform and the two quoting styles can not be intermixed.
Examples
Parts are lifted from issue #84
No spaces, quotes not required
source_files: README.md CHANGELOG.md notes/Notes.md
No spaces, quotes not required, double quotes used for complete parameter
source_files: "README.md CHANGELOG.md notes/Notes.md"
This might actually work, but it is not recommended and might it might break, instead using proper quoting.
No spaces, quotes not required, double quotes used for single parameters
source_files: "README.md" "CHANGELOG.md" "notes/Notes.md"
This would also work using single quotes
Spaces, quotes required, single quotes used
source_files: 'Managed Services/Security Monitor/README.md' 'Terraform/Development Guide/README.md'
Spaces, quotes required, double quotes used
source_files: "Managed Services/Security Monitor/README.md" "Terraform/Development Guide/README.md"
Spaces, quotes required, intermixed quotes, will not work
source_files: README.md CHANGELOG.md notes/Notes.md
Specify a Specific Task To Run
By default, all tasks in your config file will be run. By setting task_name you can override this and run only the task you require.
A configuration for designated source files could look as follows.
Example:
name: Spellcheck Action
on: push
permissions:
contents: read
jobs:
build:
name: Spellcheck
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Spellcheck
uses: rojopolis/spellcheck-github-actions@0.65.0
with:
source_files: README.md CHANGELOG.md notes/Notes.md
task_name: Markdown
Specify a PySpelling Output Artifact
In order to make it easier to process larger amount of output. The action allows for the user to enable the generation of an artifact.
The optional output_file
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.7kCommit, push, and open a PR
