Skip to content

Commit

Permalink
Fix false positives in automated spellchecking
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ericdlaspe authored and bbatsov committed May 24, 2022
1 parent 0731dd8 commit 7f31372
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/spell_checking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
pip install codespell
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Check spelling with codespell
run: codespell --ignore-words=codespell.txt || exit 1
run: codespell --ignore-words=cs-ignorewords.txt --exclude-file=cs-excludelines.txt || exit 1
misspell:
name: Check spelling with misspell
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions cs-excludelines.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:source-highlighter: rouge
gem install rouge
((juxt :a :b) {:a "ala" :b "bala"})
File renamed without changes.

0 comments on commit 7f31372

Please sign in to comment.