]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
GHA/checkdocs: re-enable proselint, update setup, fix issues found
authorViktor Szakats <commit@vsz.me>
Thu, 11 Dec 2025 01:46:24 +0000 (02:46 +0100)
committerViktor Szakats <commit@vsz.me>
Thu, 11 Dec 2025 10:42:28 +0000 (11:42 +0100)
- update configuration and invocation.
- install via pip.
- drop a file exception.
- alpha sort proselint settings.
- FILEFORMAT: update text about XML compliance.
- CI job takes 22 seconds total.

Ref: https://github.com/amperser/proselint/releases/tag/v0.16.0

Follow-up to 38bfe1c2aa2a6c8af29d525eb231ad66861199b1 #15314

Closes #19931

.github/scripts/requirements-proselint.txt [new file with mode: 0644]
.github/workflows/checkdocs.yml
docs/HTTP3.md
docs/INFRASTRUCTURE.md
docs/cmdline-opts/form.md
docs/cmdline-opts/ssl.md
docs/cmdline-opts/upload-flags.md
docs/internals/CODE_STYLE.md
docs/libcurl/opts/CURLOPT_USE_SSL.md
docs/tests/FILEFORMAT.md

diff --git a/.github/scripts/requirements-proselint.txt b/.github/scripts/requirements-proselint.txt
new file mode 100644 (file)
index 0000000..1896109
--- /dev/null
@@ -0,0 +1,5 @@
+# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# SPDX-License-Identifier: curl
+
+proselint==0.16.0
index 7962034e9673be8222424c956569530f73a24058..9272969275daad1b429c1ad6503596764ca8ef95 100644 (file)
@@ -35,59 +35,57 @@ concurrency:
 permissions: {}
 
 jobs:
-  #  proselint:
-  #    name: 'proselint'
-  #    runs-on: ubuntu-latest
-  #    steps:
-  #      - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
-  #        with:
-  #          persist-credentials: false
-  #
-  #      - name: 'install prereqs'
-  #        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 python3-proselint
-  #
-  #      # config file help: https://github.com/amperser/proselint/
-  #      - name: 'create proselint config'
-  #        run: |
-  #          cat <<JSON > ~/.proselintrc.json
-  #          {
-  #            "checks": {
-  #              "typography.diacritical_marks": false,
-  #              "typography.symbols": false,
-  #              "annotations.misc": false,
-  #              "security.password": false,
-  #              "misc.annotations": false
-  #            }
-  #          }
-  #          JSON
-  #
-  #      - name: 'trim headers off all *.md files'
-  #        run: git ls-files '*.md' -z | xargs -0 -n1 .github/scripts/trimmarkdownheader.pl
-  #
-  #      - name: 'check prose'
-  #        run: git ls-files '*.md' -z | grep -Evz 'CHECKSRC\.md|DISTROS\.md|curl_mprintf\.md|CURLOPT_INTERFACE\.md|interface\.md' | xargs -0 proselint -- README
-  #
-  #      # This is for CHECKSRC and files with aggressive exclamation mark needs
-  #      - name: 'create second proselint config'
-  #        run: |
-  #          cat <<JSON > ~/.proselintrc.json
-  #          {
-  #            "checks": {
-  #              "typography.diacritical_marks": false,
-  #              "typography.symbols": false,
-  #              "typography.exclamation": false,
-  #              "lexical_illusions.misc": false,
-  #              "annotations.misc": false
-  #            }
-  #          }
-  #          JSON
-  #
-  #      - name: 'check special prose'
-  #        run: proselint docs/internals/CHECKSRC.md docs/libcurl/curl_mprintf.md docs/libcurl/opts/CURLOPT_INTERFACE.md docs/cmdline-opts/interface.md
+  # config file help: https://github.com/amperser/proselint/
+  proselint:
+    name: 'proselint'
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
+        with:
+          persist-credentials: false
+
+      - name: 'install prereqs'
+        run: |
+          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-proselint.txt
+
+      - name: 'trim headers off all *.md files'
+        run: git ls-files '*.md' -z | xargs -0 -n1 .github/scripts/trimmarkdownheader.pl
+
+      - name: 'check prose'
+        run: |
+          cat <<JSON > ~/.proselintrc.json
+          {
+            "checks": {
+              "annotations.misc": false,
+              "lexical_illusions": false,
+              "misc.annotations": false,
+              "redundancy.misc.garner": false,
+              "security.password": false,
+              "spelling.ve_of": false,
+              "typography.diacritical_marks": false,
+              "typography.symbols": false
+            }
+          }
+          JSON
+          source ~/venv/bin/activate
+          git ls-files README '*.md' -z | grep -Evz '(CHECKSRC|DISTROS|CURLOPT_INTERFACE|interface)\.md' | xargs -0 proselint check --
+
+      - name: 'check special prose'  # For CHECKSRC and files with aggressive exclamation mark needs
+        run: |
+          cat <<JSON > ~/.proselintrc.json
+          {
+            "checks": {
+              "annotations.misc": false,
+              "lexical_illusions": false,
+              "typography.diacritical_marks": false,
+              "typography.punctuation.exclamation": false,
+              "typography.symbols": false
+            }
+          }
+          JSON
+          source ~/venv/bin/activate
+          proselint check docs/internals/CHECKSRC.md docs/libcurl/opts/CURLOPT_INTERFACE.md docs/cmdline-opts/interface.md
 
   pyspelling:
     name: 'pyspelling'
index 2b0a4c72b8724471b223eeee1d4acf8bb8db33dd..e18277cb3c87b031c9d96b5024967fa32a91974c 100644 (file)
@@ -317,7 +317,7 @@ See this [list of public HTTP/3 servers](https://bagder.github.io/HTTP3-test/)
 ### HTTPS eyeballing
 
 With option `--http3` curl attempts earlier HTTP versions as well should the
-connect attempt via HTTP/3 not succeed "fast enough". This strategy is similar
+connect attempt via HTTP/3 fail "fast enough". This strategy is similar
 to IPv4/6 happy eyeballing where the alternate address family is used in
 parallel after a short delay.
 
index 7a6bafb9dbabab93d9a801d410043af264347176..6acc8757f010df3cedd85b86c3679e1f10e7f31f 100644 (file)
@@ -60,7 +60,7 @@ account.
 
 We regularly run our code through the [Coverity static code
 analyzer](https://scan.coverity.com/) thanks to them offering this service to
-us for free.
+us free of charge.
 
 ## CodeSonar
 
@@ -76,7 +76,7 @@ domain names, including `curl.se` and `curl.dev`. Daniel Stenberg owns these
 domain names.
 
 Until a few years ago, the curl website was present at `curl.haxx.se`. The
-`haxx.se` domain is owned by Haxx AB, administrated by Daniel Stenberg. The
+`haxx.se` domain is owned by Haxx AB, administered by Daniel Stenberg. The
 curl.haxx.se name is meant to keep working and be redirecting to curl.se for
 the foreseeable future.
 
index 100e29e5716ee208aee46423ca27a741293e82a7..abe4fa998b25a34379e91a301eb858cf6248209a 100644 (file)
@@ -127,7 +127,7 @@ text file:
     curl -F '=(;type=multipart/alternative' \
          -F '=plain text message' \
          -F '= <body>HTML message</body>;type=text/html' \
-         -F '=)' -F '=@textfile.txt' ...  smtp://example.com
+         -F '=)' -F '=@textfile.txt' ... smtp://example.com
 
 Data can be encoded for transfer using encoder=. Available encodings are
 *binary* and *8bit* that do nothing else than adding the corresponding
index 0c0f28172acb72c69d4723900884b48e6c4c28f5..5951d01991231ef6e8e1c136fe5f6539fb0ad1ae 100644 (file)
@@ -28,8 +28,7 @@ different levels of encryption required.
 This option is handled in LDAP (added in 7.81.0). It is fully supported by the
 OpenLDAP backend and ignored by the generic ldap backend.
 
-Please note that a server may close the connection if the negotiation does
-not succeed.
+Please note that a server may close the connection if the negotiation fails.
 
 This option was formerly known as --ftp-ssl (added in 7.11.0). That option
 name can still be used but might be removed in a future version.
index d1761487683663ceb5e91584c30846d840182de5..6c014d0895f3955418b768ac6974d3fbacaed8cc 100644 (file)
@@ -21,5 +21,5 @@ specified as either a single flag value or a comma-separated list
 of flag values. These values are case-sensitive and may be negated
 by prepending them with a '-' character. Currently the following
 flag values are accepted: answered, deleted, draft, flagged, and
-seen. The currently-accepted flag values are used to set flags on
+seen. The currently accepted flag values are used to set flags on
 IMAP uploads.
index 43b873be9b37e04771e6b6b13027555e07623576..d8f97594f5bf96561cc1281d42f544ced409af32 100644 (file)
@@ -24,8 +24,8 @@ need to copy the style already used in the source code and there are no
 particularly unusual rules in our set of rules.
 
 We also work hard on writing code that are warning-free on all the major
-platforms and in general on as many platforms as possible. Code that obviously
-causes warnings is not accepted as-is.
+platforms and in general on as many platforms as possible. Code that causes
+warnings is not accepted as-is.
 
 ## Readability
 
index 9a2d2abe5e9a8c46f52187ccef9424ec3e4a554f..0729f6e84ee291db0e2c9f22d666c0921a6f9155 100644 (file)
@@ -45,7 +45,7 @@ do not attempt to use SSL.
 ## CURLUSESSL_TRY
 
 Try using SSL, proceed as normal otherwise. Note that server may close the
-connection if the negotiation does not succeed.
+connection if the negotiation fails.
 
 ## CURLUSESSL_CONTROL
 
index 84188e9dd9dcd2b0d4dd63a7a1784f2f6d3167f5..4749d809e0d21c632d081a3327f70c5c9480855e 100644 (file)
@@ -11,10 +11,9 @@ XML. All data for a single test case resides in a single ASCII file. Labels
 mark the beginning and the end of all sections, and each label must be written
 in its own line. Comments are either XML-style (enclosed with `<!--` and
 `-->`) or shell script style (beginning with `#`) and must appear on their own
-lines and not alongside actual test data. Most test data files are
-syntactically-valid XML (a few files are not); lack of support for character
-entities is a big difference but macros like %CR fill that particular role
-here.
+lines and not alongside actual test data. Test data files are syntactically
+valid XML; lack of support for character entities is a big difference but macros
+like %CR fill that particular role here.
 
 Each test case source exists as a file matching the format
 `tests/data/testNUM`, where `NUM` is the unique test number, and must begin