Skip to content

Commit 14593bd

Browse files
Add codespell CI for spell checking documentation
- Add GitHub Actions workflow for codespell - Configure codespell in pyproject.toml - Skip submodules and build output (they have their own checks)
1 parent ccdc7e1 commit 14593bd

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

.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: [main]
8+
pull_request:
9+
branches: [main]
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

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,9 @@ target-version = "py311"
6060
[tool.ruff.lint]
6161
select = ["E", "W", "F", "I", "B", "UP"]
6262
ignore = ["E501"]
63+
64+
[tool.codespell]
65+
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
66+
skip = '.git*,*.svg,site/*,hedit/*,image-annotation/*'
67+
check-hidden = true
68+
# ignore-words-list = ''

0 commit comments

Comments
 (0)