Skip to content

Commit 6b42a95

Browse files
committed
Update 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 d4c9714 commit 6b42a95

File tree

5 files changed

+31
-11
lines changed

5 files changed

+31
-11
lines changed

Diff for: .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

Diff for: .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

Diff for: .travis.yml

-11
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,6 @@ matrix:
1010
- BOARD="arduino:samd:mkrwifi1010"
1111
- env:
1212
- BOARD="arduino:samd:mkrgsm1400"
13-
- env:
14-
- NAME=Spell Check
15-
language: python
16-
python: 3.6
17-
# must define an empty before_install phase, otherwise the default one is used
18-
before_install: true
19-
install:
20-
# https://github.com/codespell-project/codespell
21-
- pip install codespell
22-
script:
23-
- codespell --skip="${TRAVIS_BUILD_DIR}/.git" --ignore-words="${TRAVIS_BUILD_DIR}/extras/codespell-ignore-words-list.txt" "${TRAVIS_BUILD_DIR}"
2413
# default phases
2514
before_install:
2615
- wget http://downloads.arduino.cc/arduino-cli/arduino-cli-$CLI_VERSION-linux64.tar.bz2

Diff for: README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Arduino_DebugUtils
22
==================
33

4+
[![Spell Check status](https://github.com/arduino-libraries/Arduino_DebugUtils/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_DebugUtils/actions/workflows/spell-check.yml)
5+
46
This class provides functionality useful for debugging sketches via `printf`-style statements.
57

68
# How-To-Use Basic

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

Whitespace-only changes.

0 commit comments

Comments
 (0)