Skip to content

Commit a139ff6

Browse files
committed
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 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
1 parent 2b2f850 commit a139ff6

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/qa.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Basic QA checks
2+
3+
on:
4+
push:
5+
pull_request:
6+
# Allow manually triggering the workflow.
7+
workflow_dispatch:
8+
9+
# Cancels all previous workflow runs for the same branch that have not yet completed.
10+
concurrency:
11+
# The concurrency group contains the workflow name and the branch name.
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
typos-spellcheck:
17+
name: "Find typos"
18+
19+
runs-on: "ubuntu-latest"
20+
21+
steps:
22+
- name: "Checkout"
23+
uses: "actions/checkout@v4"
24+
25+
- name: "Search for misspellings"
26+
uses: "crate-ci/typos@v1"

_typos.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[files]
2+
ignore-hidden = true
3+
4+
[default]
5+
locale = "en-us"
6+
check-filename = true

0 commit comments

Comments
 (0)