Spelling checker action to check spelling in repositories / pull requests / commits
Going forward, if you have suppress_push_for_open_pull_request: 1
in your workflow, you should probably change it to suppress_push_for_open_pull_request: ${{ github.actor != 'dependabot[bot]' && 1 }}
see Suppress PR check when workflow changes.
cspell:
dictionaries have been reorganized.
There are 3 related configuration items:
dictionary_source_prefixes
v0.0.21
, this had: "cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220816/dictionaries/"
v0.0.22
, it has: "cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/"
extra_dictionaries
check_extra_dictionaries
v0.0.21
and v0.0.22
, a bunch have moved, some have split, and a bunch have been added.You can migrate in a couple of ways:
dictionary_source_prefixes
, you can temporarily clear extra_dictionaries
and check_extra_dictionaries
and then use one run to get a new set of recommended extra_dictionaries
and then set check_extra_dictionaries
(typically to ''
).extra_dictionaries
, change cspell
to cspell_old
(or anything that isn't cspell
) and set dictionary_source_prefixes
to something like this: {"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220816/dictionaries/", "cspell_old": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220427/dictionaries/"}
.Note that the main
branch for check-spelling/cspell-dicts
will move (roughly at the time of the v0.0.22
release and again for future releases).
check-spelling has evolved from a very simple script that included some special handling for \r
/\t
/\n
because it was originally developed to focus on C++ and similar files. Over time, check-spelling has been used on many repositories where these patterns can appear in contexts where they aren't C style escapes, and thus it has outgrown this assumption.
You can copy the code from:
https://github.com/check-spelling/spell-check-this/blob/b968ca32e0e5961a85c7fe3e9431f81553c3f434/.github/actions/spelling/candidate.patterns#L591-L595 into candidate.patterns
and consider one of those patterns is the appropriate pattern to include in your configuration.
If you have workarounds for the old behavior, you should be able to remove them.
nektos/act is an alternate implementation of the GitHub Actions api environment. Each of check-spelling, GHA, and act have bugs and evolve at different rates (check-spelling releases on by far the slowest cycle). check-spelling had some workarounds for quirks of act
from a long time ago and those interacted badly with newer GHA behaviors. In order to simplify life, support for some of those quirks has been removed.
Install a newer version of nektos/act.
check-spelling will use components that rely on node20
, support for not complaining about it was added to act in v0.2.51
on: schedule
Support for on: schedule
will be removed in a future release (it probably hasn't been working for a while, but this is an official announcement that its support will be removed).
Full Changelog: https://github.com/check-spelling/check-spelling/compare/v0.0.21...v0.0.22
Note that there are over 200 commits in this release, the above is not a complete list of features.
with:
elements you're using (into each place that uses: check-spelling/check-spelling
).There are 3 related configuration items:
dictionary_source_prefixes
v0.0.20
, this had: "cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220427/dictionaries/"
v0.0.21
, it has: "cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220816/dictionaries/"
extra_dictionaries
check_extra_dictionaries
v0.0.20
and v0.0.21
, a bunch have moved, some have split, and a bunch have been added.You can migrate in a couple of ways:
dictionary_source_prefixes
, you can temporarily clear extra_dictionaries
and check_extra_dictionaries
and then use one run to get a new set of recommended extra_dictionaries
and then set check_extra_dictionaries
(typically to ''
).extra_dictionaries
, change cspell
to cspell_old
(or anything that isn't cspell
) and set dictionary_source_prefixes
to something like this: {"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220816/dictionaries/", "cspell_old": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220427/dictionaries/"}
.Note that the main
branch for check-spelling/cspell-dicts
will move (roughly at the time of the v0.0.21
release and again for future releases).
act
Some changes in how the action works require actions/download-artifact
and actions/upload-artifact
which aren't generally supported by act
. It might be possible to use --artifact-server-path
, but I don't know how to do it.
You can apply changes equivalent to the changes to .github/workflows/spelling.yml
to your workflow. This should enable the act workflows to conspire to share data between jobs. Alternatively, you could remove post_comment: 0
from your spelling
job. And that should result in a report.
The log will include a base64 encoded zip file along with instructions to decode it and a command that will let you feed the file to apply.pl
to apply its suggestions.
Log output will now use a format like .github/workflows/spelling.yml:54:9 ... 21
to report problems. This should be friendlier to automated tools. Anyone who had written their own code to parse the old format will need to adjust their tooling. I don't expect this to be a big concern.
Apply handling for Matrix probably won't do the right thing. Instead, it will probably apply the results from the last job. This is fixed in prerelease
and will be included in the next release.
Instead of using a matrix, you can manually expand the matrix content. If you're feeling adventurous, you can make a pre job and then have each dependent item reuse that prejob. If you're using a matrix because the repository is expensive, the pre job might enable you to cache the repository itself.
Alternatively, you can test using prerelease
.
check-spelling's detection of GitHub SARIF support no longer works. As such, you can't use SARIF with this version.
A prerelease version should have working detection soon.
check-file-path
set-output
is replacedNote that there are nearly 100 commits in this release, the above is not a complete list of features.
Full Changelog: https://github.com/check-spelling/check-spelling/compare/v0.0.20...v0.0.21
with:
elements you're using (into each place that uses: check-spelling/check-spelling
).There are 3 related configuration items:
dictionary_source_prefixes
v0.0.20
, this had: "cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220427/dictionaries/"
v0.0.21
, it has: "cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220816/dictionaries/"
extra_dictionaries
check_extra_dictionaries
v0.0.20
and v0.0.21
, a bunch have moved, some have split, and a bunch have been added.You can migrate in a couple of ways:
dictionary_source_prefixes
, you can temporarily clear extra_dictionaries
and check_extra_dictionaries
and then use one run to get a new set of recommended extra_dictionaries
and then set check_extra_dictionaries
(typically to ''
).extra_dictionaries
, change cspell
to cspell_old
(or anything that isn't cspell
) and set dictionary_source_prefixes
to something like this: {"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220816/dictionaries/", "cspell_old": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220427/dictionaries/"}
.Note that the main
branch for check-spelling/cspell-dicts
will move (roughly at the time of the v0.0.21
release and again for future releases).
act
Some changes in how the action works require actions/download-artifact
and actions/upload-artifact
which aren't generally supported by act
. It might be possible to use --artifact-server-path
, but I don't know how to do it.
You can apply changes equivalent to the changes to .github/workflows/spelling.yml
to your workflow. This should enable the act workflows to conspire to share data between jobs. Alternatively, you could remove post_comment: 0
from your spelling
job. And that should result in a report.
The log will include a base64 encoded zip file along with instructions to decode it and a command that will let you feed the file to apply.pl
to apply its suggestions.
Log output will now use a format like .github/workflows/spelling.yml:54:9 ... 21
to report problems. This should be friendlier to automated tools. Anyone who had written their own code to parse the old format will need to adjust their tooling. I don't expect this to be a big concern.
check-file-path
set-output
is replacedNote that there are nearly 100 commits in this release, the above is not a complete list of features. I'll try to improve the list for the official release.
Full Changelog: https://github.com/check-spelling/check-spelling/compare/v0.0.20...v0.0.21-alpha1
with:
elements you're using (into each place that uses: check-spelling/check-spelling
).There are 3 related configuration items:
dictionary_source_prefixes
v0.0.20
, this had: "cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220427/dictionaries/"
v0.0.21
, it has: "cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220816/dictionaries/"
extra_dictionaries
check_extra_dictionaries
v0.0.20
and v0.0.21
, a bunch have moved, some have split, and a bunch have been added.You can migrate in a couple of ways:
dictionary_source_prefixes
, you can temporarily clear extra_dictionaries
and check_extra_dictionaries
and then use one run to get a new set of recommended extra_dictionaries
and then set check_extra_dictionaries
(typically to ''
).extra_dictionaries
, rename cspell
to cspell_old
(or anything that isn't cspell
) and set dictionary_source_prefixes
to something like this: {"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220816/dictionaries/", "cspell_old": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220427/dictionaries/"}
.Note that the main
branch for check-spelling/cspell-dicts
will move (roughly at the time of the v0.0.21
release and again for future releases).
act
Act is broken in v0.0.21-alpha1. It should work better in v0.0.21-alpha2.
check-file-path
set-output
is replacedNote that there are nearly 100 commits in this release, the above is not a complete list of features. I'll try to improve the list for the official release.
Full Changelog: https://github.com/check-spelling/check-spelling/compare/v0.0.20...v0.0.21-alpha1
with:
elements you're using (into each place that uses: check-spelling/check-spelling
).b'...
or r'...
or similar, you probably should add something like this (from https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) to patterns.txt
(you can select the subset that you actually use, which may be just b
, r
, and f
):
# Python stringprefix / binaryprefix
\b(?:B|BR|Br|F|FR|Fr|R|RB|RF|Rb|Rf|U|UR|Ur|b|bR|br|f|fR|fr|r|rB|rF|rb|rf|u|uR|ur)'
artifact.zip
file. This was implemented because at times the upload-artifact action needed to retry its uploads which was unreasonably slow for the files it was uploading.@dependabot
curl
, git
, and jq
.dictionary
, expect
, and allow
files (note that various components may drop comments from expect
)we'd
(due to changing the minimum word length from 2 to 3, we
no longer was a base word, but we'd
wanted to stem to it)parallel
-- it's too inconsistent and xargs -P
is sufficient and sufficiently portable to satisfy the requirements of check-spelling.with:
elements you're using (into each place that uses: check-spelling/check-spelling
).b'...
or r'...
or similar, you probably should add something like this (from https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) to patterns.txt
(you can select the subset that you actually use, which may be just b
, r
, and f
):
# Python stringprefix / binaryprefix
\b(?:B|BR|Br|F|FR|Fr|R|RB|RF|Rb|Rf|U|UR|Ur|b|bR|br|f|fR|fr|r|rB|rF|rb|rf|u|uR|ur)'
@dependabot
curl
, git
, and jq
.dictionary
, expect
, and allow
files (note that various components may drop comments from expect
)we'd
(due to changing the minimum word length from 2 to 3, we
no longer was a base word, but we'd
wanted to stem to it)parallel
-- it's too inconsistent and xargs -P
is sufficient and sufficiently portable to satisfy the requirements of check-spelling.with:
elements you're using (into each place that uses check-spelling/check-spelling
).b'...
or r'...
or similar, you probably should add something like this (from https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) to patterns.txt
(you can select the subset that you actually use, which may be just b
, r
, and f
):
# Python stringprefix / binaryprefix
\b(?:B|BR|Br|F|FR|Fr|R|RB|RF|Rb|Rf|U|UR|Ur|b|bR|br|f|fR|fr|r|rB|rF|rb|rf|u|uR|ur)'
@dependabot
we'd
(due to changing the minimum word length from 2 to 3, we
no longer was a base word, but we'd
wanted to stem to it)with:
elements you're using (into each place that uses check-spelling/check-spelling
).b'...
or r'...
or similar, you probably should add something like this (from https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) to patterns.txt
(you can select the subset that you actually use, which may be just b
, r
, and f
):
# Python stringprefix / binaryprefix
\b(?:B|BR|Br|F|FR|Fr|R|RB|RF|Rb|Rf|U|UR|Ur|b|bR|br|f|fR|fr|r|rB|rF|rb|rf|u|uR|ur)'
@dependabot
we'd
(due to changing the minimum word length from 2 to 3, we
no longer was a base word, but we'd
wanted to stem to it)You can just change your tag to this release, but please consider applying the workflow from check-spelling/spell-check-this@prerelease.
with:
elements you're using (into each place that uses check-spelling/check-spelling
.@dependabot
we'd
(due to changing the minimum word length from 2 to 3, we
no longer was a base word, but we'd
wanted to stem to it)You can just change your tag to this release, but please consider applying the workflow from check-spelling/spell-check-this@prerelease.
with:
elements you're using (into each place that uses check-spelling/check-spelling
.@dependabot
we'd
(due to changing the minimum word length from 2 to 3, we
no longer was a base word, but we'd
wanted to stem to it)