Skip to content

Commit 5518d99

Browse files
committed
Add GitHub Actions workflow to check for commonly misspelled words
This workflow uses codespell to check all files in the repository for commonly misspelled words. The "blocklist" strategy used by codespell leads to a minimal number of false positives at the cost of an increased likelihood of false negatives when compared to the more common "smart allowlist" strategy used by spell checkers. In the event of a false positive, add the problematic word, in all lower case (regardless of the case of the occurence of the word in the repository) to extras/codespell-ignore-words-list.txt. The workflow is triggered: - On pull requests - On push (to validate commits in preparation for a PR) - On weekly schedule (to check for new misspelled word detections as a result of updates to the codespell dictionary)
1 parent 52a0ab5 commit 5518d99

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

Diff for: .github/workflows/spell-check.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Spell Check
2+
3+
on:
4+
pull_request:
5+
push:
6+
schedule:
7+
# run every Tuesday at 3 AM UTC
8+
- cron: "0 3 * * 2"
9+
10+
jobs:
11+
spellcheck:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
# See: https://github.com/codespell-project/actions-codespell/blob/master/README.md
19+
- name: Spell check
20+
uses: codespell-project/actions-codespell@master
21+
with:
22+
check_filenames: true
23+
check_hidden: true
24+
# In the event of a false positive, add the word in all lower case to this file:
25+
ignore_words_file: extras/codespell-ignore-words-list.txt

Diff for: README.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
= Built-in Examples =
22

33
image:https://github.com/arduino/arduino-examples/workflows/Compile%20Examples/badge.svg["Compile Examples Status", link="https://github.com/arduino/arduino-examples/actions?workflow=Compile+Examples"]
4+
image:https://github.com/arduino/arduino-examples/workflows/Spell%20Check/badge.svg["Spell Check Status", link="https://github.com/arduino/arduino-examples/actions?workflow=Spell+Check"]
45

56
These are the example Arduino sketches built in to the Arduino IDE.
67

Diff for: extras/codespell-ignore-words-list.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)