Skip to content

Commit 0238504

Browse files
committed
ci: Add spellcheck task
Based on slog-rs/slog#6b98d9e
1 parent 6ca6e5a commit 0238504

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/workflows/spellcheck.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Checks spelling with typos
2+
# This has very few false positives, only checking for known misspellings (similar to codespell).
3+
# This action is based on https://github.com/crate-ci/typos/blob/master/docs/github-action.md
4+
name: Check Spelling
5+
on: [push, pull_request]
6+
7+
env:
8+
CLICOLOR: 1
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
typos:
15+
name: Check spelling with typos
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Run typos (pinned version)
20+
uses: crate-ci/[email protected]

.typos.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[default]
2+
extend-ignore-re = [
3+
# support spellchecker directives (ideally this would be builtin)
4+
"(?Rm)^.*(#|//)\\s*spellchecker:ignore$",
5+
"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on",
6+
]
7+
8+
[files]
9+
ignore-hidden = false
10+
extend-exclude = [
11+
".git", # needed because we set 'ignore-hidden'
12+
]
13+

0 commit comments

Comments
 (0)