Skip to content

Commit 5a53135

Browse files
committed
Modernize spell checking infrastructure
The repository contains a CI workflow to check for commonly misspelled words in the project files. This is done using the "codespell" tool. A GitHub Actions action handles the installation and execution of the tool. At the time Arduino started setting up such infrastructure in project repositories, no such action was available and so Arduino created an action. Since that time, the codespell developers created an equivalent action and so Arduino's action was abandoned. Most of the libraries were migrated to the new action, but somehow this repository is still using the abandoned action. Due to bit rot, Arduino's action now fails to initialize: ``` stm32duino#8 [3/4] RUN pip3 install codespell stm32duino#8 0.401 error: externally-managed-environment [...] ERROR: failed to solve: process "/bin/sh -c pip3 install codespell" did not complete successfully: exit code: 1 Error: Docker build failed with exit code 1 ``` The problem is solved by migrating the spell check workflow to using the codespell action.
1 parent 30e2cac commit 5a53135

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

Diff for: .codespellrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check/.codespellrc
2+
# See: https://github.com/codespell-project/codespell#using-a-config-file
3+
[codespell]
4+
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
5+
ignore-words-list = ,
6+
skip = ./.git,./.licenses,__pycache__,node_modules,./go.mod,./go.sum,./package-lock.json,./poetry.lock,./yarn.lock,./extras/test
7+
builtin = clear,informal,en-GB_to_en-US
8+
check-filenames =
9+
check-hidden =

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

+15-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
1+
# Source: https://github.com/per1234/.github/blob/main/workflow-templates/spell-check.md
12
name: Spell Check
23

3-
on: [push, pull_request]
4+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
5+
on:
6+
push:
7+
pull_request:
8+
schedule:
9+
# Run every Tuesday at 8 AM UTC to catch new misspelling detections resulting from dictionary updates.
10+
- cron: "0 8 * * TUE"
11+
workflow_dispatch:
12+
repository_dispatch:
413

514
jobs:
6-
build:
15+
spellcheck:
716
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
819

920
steps:
10-
- name: Checkout
21+
- name: Checkout repository
1122
uses: actions/checkout@v4
1223

1324
- name: Spell check
14-
uses: arduino/actions/libraries/spell-check@master
15-
with:
16-
skip-paths: ./extras/test
25+
uses: codespell-project/actions-codespell@v2

0 commit comments

Comments
 (0)