Skip to content

Commit 1bd58e6

Browse files
committed
Add CI workflow to check for commonly misspelled words
On every push, pull request, and periodically, use the codespell-project/actions-codespell action to check for commonly misspelled words. In the event of a false positive, the problematic word should be added, in all lowercase, to the ignore-words-list field of ./.codespellrc. Regardless of the case of the word in the false positive, it must be in all lowercase in the ignore list. The ignore list is comma-separated with no spaces.
1 parent 1ac6b2d commit 1bd58e6

File tree

5 files changed

+35
-15
lines changed

5 files changed

+35
-15
lines changed

.codespellrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See: https://github.com/codespell-project/codespell#using-a-config-file
2+
[codespell]
3+
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
4+
ignore-words-list = ,
5+
check-filenames =
6+
check-hidden =
7+
skip = ./.git

.github/workflows/spell-check.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Spell Check
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
pull_request:
7+
schedule:
8+
# Run every Tuesday at 8 AM UTC to catch new misspelling detections resulting from dictionary updates.
9+
- cron: "0 8 * * TUE"
10+
workflow_dispatch:
11+
repository_dispatch:
12+
13+
jobs:
14+
spellcheck:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
21+
- name: Spell check
22+
uses: codespell-project/actions-codespell@master

.travis.yml

-12
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,6 @@ matrix:
2828
install:
2929
- arduino-cli core install arduino:sam
3030

31-
# check all files for commonly misspelled words
32-
- env:
33-
- NAME='Spell Check'
34-
language: python
35-
python: 3.6
36-
before_install:
37-
# https://github.com/codespell-project/codespell
38-
- pip install codespell
39-
script:
40-
# codespell will ignore any words in extras/codespell-ignore-words-list.txt, which may be used to fix false positives
41-
- codespell --skip="${TRAVIS_BUILD_DIR}/.git" --ignore-words="${TRAVIS_BUILD_DIR}/extras/codespell-ignore-words-list.txt" "${TRAVIS_BUILD_DIR}"
42-
4331
# default phases shared by the compilation tests
4432
before_install:
4533
- wget http://downloads.arduino.cc/arduino-cli/arduino-cli-$CLI_VERSION-linux64.tar.bz2

README.adoc

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
= SD Library for Arduino =
1+
:repository-owner: arduino-libraries
2+
:repository-name: SD
23

3-
image:https://travis-ci.org/arduino-libraries/SD.svg?branch=master[Build Status, link=https://travis-ci.org/arduino-libraries/SD]
4+
= {repository-name} Library for Arduino =
5+
6+
image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/spell-check.yml/badge.svg["Spell Check status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/spell-check.yml"]
47

58
The SD library allows for reading from and writing to SD cards.
69

710
For more information about this library please visit us at
8-
http://www.arduino.cc/en/Reference/SD
11+
http://www.arduino.cc/en/Reference/repository-name}
912

1013
== License ==
1114

extras/codespell-ignore-words-list.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)