Skip to content

Commit 8a9f113

Browse files
authored
fix(ci): new spell check workflow (#542)
2 parents 3dd8724 + e96d9d8 commit 8a9f113

File tree

3 files changed

+33
-46
lines changed

3 files changed

+33
-46
lines changed

.github/config/ignored-words.txt

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

.github/config/typos.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[default]
2+
binary = false
3+
4+
[default.extend-words]
5+
WNat = "WNat"
6+
WNAT = "WNAT"
7+
wNat = "wNat"
8+
bU = "bU"
9+
whats = "whats"
10+
requestor = "requestor"
11+
devlop = "devlop"
12+
crate = "crate"
13+
mis = "mis"
14+
15+
[files]
16+
extend-exclude = [
17+
"*.svg",
18+
"*.png",
19+
"*.jpg",
20+
"*.woff",
21+
"*.woff2",
22+
"*.pdf",
23+
"package-lock.json",
24+
"*.mod",
25+
"*.sum",
26+
"*.lock"
27+
]

.github/workflows/spell-check.yml

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,19 @@
11
name: Spell Check
2-
32
on:
43
pull_request:
5-
paths:
6-
- "**/*.md"
7-
- "**/*.mdx"
8-
- "**/*.txt"
9-
- "**/*.yml"
10-
- "**/*.yaml"
11-
- "**/*.py"
12-
- "**/*.js"
13-
- "**/*.tsx"
14-
- "**/*.html"
15-
- "**/*.rst"
16-
- "!**/*.svg" # Exclude svg files from triggering the workflow
17-
- "!**/*.sol"
18-
- "**/*.go"
19-
- "!**/*.sum"
20-
- "!**/*.mod"
21-
- "!**/*.json"
4+
5+
permissions:
6+
contents: read
227

238
jobs:
249
spell-check:
2510
if: github.event.pull_request.changed_files > 0
2611
runs-on: ubuntu-latest
27-
2812
steps:
2913
- name: Checkout code
3014
uses: actions/checkout@v4
3115

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-
4016
- 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."
17+
uses: crate-ci/typos@master
18+
with:
19+
config: ./.github/config/typos.toml

0 commit comments

Comments
 (0)