A Github Action that spell checks a wide range of human readable files including Python, HTML, Markdown and plain text. This action uses PySpelling to check files in the repository that it is applied too using a configuration file and dictionary provided by the repository owner.
To incorporate this action into your workflow carry out the following steps:
-
Create a
.spellcheck.yaml
configuration file in the top level of your repository. See this link for configuration options. If you do not create this file the action will use its default. That default may well not work for you. -
Create a
.wordlist.txt
file in the top level of your repository with a dictionary of acceptable words and abbreviations that are not covered in the default aspell dictionary. If you have aspell installed you can run it against the target files in your configuration to get a list of words here. -
Add the github action to either a new workflow file or an existing one.
As an example, here is a workflow file that should work (though please check here for the latest release version):
name: spellcheck
on:
push:
jobs:
spellcheck:
name: runner / spellcheck
runs-on: ubuntu-latest
steps:
- name: Check out code.
uses: actions/checkout@v2
- name: Run PySpelling as a GitHub action
uses: sbates130272/[email protected]
Several examples of spellcheck and wordlist files are included in the
examples folder. Please feel free to use these by renaming them to
.spellcheck.yaml
and .wordlist.txt
and placing them in the top
level of your repository. Pull requests for new examples are welcome.