Skip to content

Commit 320e6c9

Browse files
committed
Add a codespell spellcheck pass to the lint job
1 parent a840e1f commit 320e6c9

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/scripts/lint.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ if command -v cppcheck >/dev/null 2>&1; then
3737
|| echo "cppcheck: reported issues above (informational)"
3838
fi
3939

40+
# codespell over the repo's own text. Informational: vendored SDKs and binary
41+
# assets are skipped, and common-word false positives should not fail the build.
42+
if command -v codespell >/dev/null 2>&1; then
43+
codespell --skip='./.git,*/pico-sdk/*,*/mcux-sdk/*,*.der,*.pem,*.raw,*.enc' \
44+
. || echo "codespell: reported issues above (informational)"
45+
fi
46+
4047
# make -n parses every Makefile without building. Informational: a few dirs
4148
# (RT1060, riot, SGX, uefi) are driven by external SDKs whose fragments a bare
4249
# make cannot resolve, so a parse miss there is expected, not a defect.

.github/workflows/lint.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Lint
22

33
on:
44
push:
5+
branches: [master]
56
paths:
67
- '**/*.sh'
78
- '**/*.c'
@@ -35,10 +36,10 @@ jobs:
3536
steps:
3637
- uses: actions/checkout@v5
3738
- uses: ./.github/actions/apt-update
38-
- name: Install shellcheck + cppcheck + actionlint
39+
- name: Install shellcheck + cppcheck + codespell + actionlint
3940
run: |
4041
set -euo pipefail
41-
sudo apt-get install -y --no-install-recommends shellcheck cppcheck
42+
sudo apt-get install -y --no-install-recommends shellcheck cppcheck codespell
4243
.github/scripts/retry.sh bash -c \
4344
'bash <(curl -fsSL https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)'
4445
echo "$PWD" >> "$GITHUB_PATH"

0 commit comments

Comments
 (0)