Skip to content

Commit 413d2d1

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 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 413d2d1

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[files]
2+
extend-exclude = [
3+
".git/",
4+
]
5+
ignore-hidden = true
6+
7+
[default]
8+
locale = "en-us"
9+
check-filename = true
10+
unicode = false
11+
12+
[default.extend-words]
13+
# Don't correct a limited list of specific words.

0 commit comments

Comments
 (0)