Skip to content

Commit 7f31372

Browse files
ericdlaspebbatsov
authored andcommittedMay 24, 2022
Fix false positives in automated spellchecking
By adding an --exclude-file argument, we can add exact lines that will be matched against to ignore. This prevents us having to add a word such as "juxt" to the ignored words list when we usually want to catch that as a misspelling of "just" except in one context. With all spelling errors fixed and false-positives ignored, the status of codespell run on each commit can now be trusted. If any of the lines specified in cs-excludelines.txt need to be modified in the README, they just need to be adjusted both places.
1 parent 0731dd8 commit 7f31372

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed
 

‎.github/workflows/spell_checking.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
pip install codespell
2222
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
2323
- name: Check spelling with codespell
24-
run: codespell --ignore-words=codespell.txt || exit 1
24+
run: codespell --ignore-words=cs-ignorewords.txt --exclude-file=cs-excludelines.txt || exit 1
2525
misspell:
2626
name: Check spelling with misspell
2727
runs-on: ubuntu-latest

‎cs-excludelines.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:source-highlighter: rouge
2+
gem install rouge
3+
((juxt :a :b) {:a "ala" :b "bala"})

‎codespell.txt ‎cs-ignorewords.txt

File renamed without changes.

0 commit comments

Comments
 (0)