]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
GHA: use `pyspelling` directly
authorViktor Szakats <commit@vsz.me>
Thu, 25 Sep 2025 12:50:15 +0000 (14:50 +0200)
committerViktor Szakats <commit@vsz.me>
Thu, 25 Sep 2025 14:59:27 +0000 (16:59 +0200)
To avoid depending on Docker Hub, an Docker image and a GitHub Action.
Also to simplify running this check on a local machine.

Pending question if Dependabot and Mend/Renovate will automatically pick
up `requirements-docs.txt`.

Also:
- enable parallel spellchecking. (also to win back the time lost with
  installing components directly from Debian and pip.)
- pin `pyspelling`.
- link to official `pyspelling` docs.

Closes #18736

.github/scripts/requirements-docs.txt [new file with mode: 0644]
.github/scripts/spellcheck.yaml
.github/workflows/checkdocs.yml

diff --git a/.github/scripts/requirements-docs.txt b/.github/scripts/requirements-docs.txt
new file mode 100644 (file)
index 0000000..bd50e50
--- /dev/null
@@ -0,0 +1,5 @@
+# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# SPDX-License-Identifier: curl
+
+pyspelling==2.11
index 05ddf0d937f11963d6c710f682d0ba65d703def1..8e26b76189bc716e132326b7862607c79e282d5f 100644 (file)
@@ -2,6 +2,7 @@
 #
 # SPDX-License-Identifier: curl
 #
+# Docs: https://facelessuser.github.io/pyspelling/configuration/
 # Docs: https://github.com/UnicornGlobal/spellcheck-github-actions
 matrix:
   - name: Markdown
index f236ebc850131a5ed9baf2f032a99812346091ef..a34a341a636f3502778d0e35df98c2aa8a1b4bb7 100644 (file)
@@ -113,13 +113,22 @@ jobs:
           # shellcheck disable=SC2046
           .github/scripts/cleancmd.pl $(find docs -name '*.md')
 
-      - name: 'setup the custom wordlist'
-        run: grep -v '^#' .github/scripts/spellcheck.words > wordlist.txt
-
-      - name: 'check Spelling'
-        uses: rojopolis/spellcheck-github-actions@739a1e3ceb79a98a5d4a9bf76f351137f9d78892 # v0
-        with:
-          config_path: .github/scripts/spellcheck.yaml
+      - name: 'install'
+        run: |
+          sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
+          sudo apt-get -o Dpkg::Use-Pty=0 update
+          sudo rm -f /var/lib/man-db/auto-update
+          sudo apt-get -o Dpkg::Use-Pty=0 install aspell aspell-en
+          python3 -m venv ~/venv
+          ~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r .github/scripts/requirements-docs.txt
+
+      - name: 'check spelling'
+        run: |
+          source ~/venv/bin/activate
+          grep -v '^#' .github/scripts/spellcheck.words > wordlist.txt
+          aspell --version
+          pyspelling --version
+          pyspelling --verbose --jobs 5 --config .github/scripts/spellcheck.yaml
 
   badwords-synopsis:
     name: 'badwords, synopsis'