Skip to content

Commit c701049

Browse files
committed
automatic spellcheck by codespell for common misspellings.
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
1 parent b0a330a commit c701049

File tree

6 files changed

+33
-1
lines changed

6 files changed

+33
-1
lines changed

.github/workflows/test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,23 @@ jobs:
3737
- name: Lint
3838
run: make lint
3939

40+
spellcheck:
41+
runs-on: ubuntu-22.04
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
46+
- name: Setup Python
47+
uses: actions/setup-python@v5
48+
with:
49+
python-version: '3.10'
50+
51+
- name: Install dependencies with pip
52+
run: pip install --no-warn-script-location --user -r requirements.txt -c constraints.txt
53+
54+
- name: Spellcheck
55+
run: make spellcheck
56+
4057
build:
4158
needs: [test, lint]
4259
runs-on: ubuntu-22.04

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ lint:
2828
test:
2929
doc8 --ignore D001 --ignore-path build
3030

31+
spellcheck:
32+
git ls-files '*.md' '*.rst' | xargs codespell --ignore-words=codespell_whitelist.txt --skip="source/Releases/*"
33+
3134
linkcheck:
3235
$(BUILD) -b linkcheck $(OPTS) $(SOURCE) $(LINKCHECKDIR)
3336
@echo

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@ For local testing of the current tree use:
5151

5252
`sensible-browser build/html/index.html`
5353

54+
### Spelling Check
55+
56+
To check the spelling, use:
57+
58+
`make spellcheck`
59+
60+
> [!NOTE]
61+
> If that detects specific words that need to be ignored, add it to [codespell_whitelist](./codespell_whitelist.txt).
62+
5463
### Deployment test
5564

5665
To test building the multisite version deployed to the website use:

codespell_whitelist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
empy
2+
indention

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
codespell
12
doc8
23
docutils
34
pip

source/Concepts/Basic/About-Interfaces.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ For example:
207207
Constants
208208
^^^^^^^^^
209209

210-
Each constant definition is like a field description with a default value, except that this value can never be changed programmatically.
210+
Each constant definition is like a field description with a default value, except that this value can never be changed programatically.
211211
This value assignment is indicated by use of an equal '=' sign, e.g.
212212

213213
.. code-block:: bash

0 commit comments

Comments
 (0)