Skip to content

Commit 305d4c1

Browse files
authored
Add codespell support (config, workflow to detect/not fix) and make it fix a single typo! (#216)
* Add github action to codespell master on push and PRs * Add rudimentary codespell config * [DATALAD RUNCMD] chore: run codespell throughout fixing few left typos automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^
1 parent f27b2b3 commit 305d4c1

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

.github/workflows/codespell.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Codespell configuration is within pyproject.toml
2+
---
3+
name: Codespell
4+
5+
on:
6+
push:
7+
branches: [master]
8+
pull_request:
9+
branches: [master]
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
codespell:
16+
name: Check for spelling errors
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Annotate locations with typos
23+
uses: codespell-project/codespell-problem-matcher@v1
24+
- name: Codespell
25+
uses: codespell-project/actions-codespell@v2

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ To run with a config file, use the following command:
208208
lfbw -c ./config-example.ini
209209
```
210210

211-
The files that you might want to replace are the followings:
211+
The files that you might want to replace are the following:
212212

213213
- ``background.jpg`` - the background image
214214
- ``foreground.jpg`` - the foreground image

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@ cmapy = ">=0.6.6"
2525
configargparse = ">=1.7.1"
2626
protobuf = ">=4.25.8"
2727

28+
29+
[tool.codespell]
30+
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
31+
skip = '.git*'
32+
check-hidden = true
33+
# ignore-regex = ''
34+
# ignore-words-list = ''

0 commit comments

Comments
 (0)