Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Jun 26, 2025

GH Actions: add spellcheck

I was having a play with adding a spellchecker to the WPCS repo and when doing so, realized that some of the flagged texts - particularly in the WPCS-Core ruleset.xml file - are coming from this repo, so should probably be fixed here first.

So, this commit adds a basic workflow with a spellcheck job.

Notes:

  • The "Typos" tool is known for having a low false positive ratio and being aware of code contexts. However, this also means, it may at times miss some things.
    When selecting it, I deemed the low false positive ratio more important.
  • The language has been set to en-US as that's the language predominantly used for the WordPress documentation.
    This does mean that various phrases using en-GB spelling will need to be fixed/updated.
  • I've named the workflow file qa.yml with a workflow name of "Basic QA checks", even though there is only one check in the file at this time.
    The idea behind this is that we may potentially want to add some markdown check tooling at some point and this way, that could go into the same workflow.

Ref: https://github.com/crate-ci/typos

Fix typos

Mostly UK spelling vs US spelling.

jrfnl added 2 commits June 26, 2025 12:20
I was having a play with adding a spellchecker to the WPCS repo and when doing so, realized that some of the flagged texts - particularly in the WPCS-Core `ruleset.xml` file - are coming from this repo, so should probably be fixed here first.

So, this commit add a basic workflow with a spellcheck job.

Notes:
* The "Typos" tool is known for having a low false positive ratio and being aware of code contexts. However, this also means, it may at times miss some things.
    When selecting it, I deemed the low false positive ratio more important.
* The language has been set to `en-US` as that's the language predominantly used for the WordPress documentation.
    This does mean that various phrases using `en-GB` spelling will need to be fixed/updated.
* I've named the workflow file `qa.yml` with a workflow name of "Basic QA checks", even though there is only one check in the file at this time.
    The idea behind this is that we may potentially want to add some markdown check tooling at some point and this way, that could go into the same workflow.

Ref: https://github.com/crate-ci/typos
Mostly UK spelling vs US spelling.
jrfnl added a commit to WordPress/WordPress-Coding-Standards that referenced this pull request Jun 26, 2025
Mostly US English vs UK English and as WP Core predominantly uses US English, I think we should standardize on that for this spellcheck as well.

Note: where text was copied from the rules on https://developer.wordpress.org/coding-standards/ (typically to the `ruleset.xml` files), the text upstream has been updated via WordPress/wpcs-docs#151.
jrfnl added a commit to WordPress/WordPress-Coding-Standards that referenced this pull request Jun 26, 2025
Mostly US English vs UK English and as WP Core predominantly uses US English, I think we should standardize on that for this spellcheck as well.

Note: where text was copied from the rules on https://developer.wordpress.org/coding-standards/ (typically to the `ruleset.xml` files), the text upstream has been updated via WordPress/wpcs-docs#151.
jrfnl added a commit to WordPress/WordPress-Coding-Standards that referenced this pull request Jun 26, 2025
Mostly US English vs UK English and as WP Core predominantly uses US English, I think we should standardize on that for this spellcheck as well.

Note: where text was copied from the rules on https://developer.wordpress.org/coding-standards/ (typically to the `ruleset.xml` files), the text upstream has been updated via WordPress/wpcs-docs#151.
@jrfnl jrfnl merged commit c60d51e into master Jun 26, 2025
2 checks passed
@jrfnl jrfnl deleted the feature/ghactions-add-spellcheck branch June 26, 2025 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants