Skip to content

Commit 7a3866c

Browse files
committed
fix(ci): new spell check workflow
1 parent 3e21312 commit 7a3866c

File tree

3 files changed

+44
-31
lines changed

3 files changed

+44
-31
lines changed

.github/config/ignored-words.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/config/typos.toml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[
2+
default
3+
]
4+
extend-ignore-re = [
5+
"WNat",
6+
"WNAT",
7+
"wNat",
8+
"bU",
9+
"whats",
10+
"requestor",
11+
"devlop",
12+
"crate"
13+
]
14+
15+
[
16+
type.md
17+
]
18+
check-file = true
19+
extend-ignore-identifiers-re = [
20+
"WNat",
21+
"WNAT",
22+
"wNat"
23+
]
24+
25+
[
26+
files
27+
]
28+
extend-exclude = [
29+
"*.svg",
30+
"*.png",
31+
"*.jpg",
32+
"*.woff",
33+
"*.woff2",
34+
"*.pdf",
35+
"package-lock.json"
36+
]

.github/workflows/spell-check.yml

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Spell Check
2-
32
on:
43
pull_request:
54
paths:
@@ -13,39 +12,25 @@ on:
1312
- "**/*.tsx"
1413
- "**/*.html"
1514
- "**/*.rst"
16-
- "!**/*.svg" # Exclude svg files from triggering the workflow
17-
- "!**/*.sol"
1815
- "**/*.go"
16+
- "!**/*.svg"
17+
- "!**/*.sol"
1918
- "!**/*.sum"
2019
- "!**/*.mod"
2120
- "!**/*.json"
2221

22+
permissions:
23+
contents: read
24+
2325
jobs:
2426
spell-check:
2527
if: github.event.pull_request.changed_files > 0
2628
runs-on: ubuntu-latest
27-
2829
steps:
2930
- name: Checkout code
3031
uses: actions/checkout@v4
3132

32-
- name: Set up Python
33-
uses: actions/setup-python@v5
34-
with:
35-
python-version: "3.x"
36-
37-
- name: Install codespell
38-
run: pip install codespell
39-
4033
- name: Run Spell Check
41-
run: |
42-
codespell \
43-
--ignore-words=.github/config/ignored-words.txt \
44-
--skip="*.svg,*.png,*.jpg,*.woff,*.woff2,*.pdf,package-lock.json" \
45-
--quiet-level=2 \
46-
--check-filenames \
47-
.
48-
49-
- name: Annotate spelling errors
50-
if: failure()
51-
run: echo "::error::Spelling errors detected. Please fix the typos or add to the ignore list if intentional."
34+
uses: crate-ci/typos@v1.29.4
35+
with:
36+
config: ./.github/config/typos.toml

0 commit comments

Comments
 (0)