Skip to content

Commit

Permalink
GHA: silence proselint warnings and an error
Browse files Browse the repository at this point in the history
Fix new issues found by `proselint`.

Also:
- silence this technical warning:
  ```
  :0: DeprecationWarning: /home/runner/.proselintrc was found instead of a JSON file. Rename to /home/runner/.proselintrc.json.
  ```
- fix an input filename.
  `proselints` fails now if an input file is missing.

Reported-by: Jay Satiro
Bug: curl#15291 (comment)
Closes curl#15293
  • Loading branch information
vszakats committed Oct 15, 2024
1 parent 8403e5a commit 3040971
Show file tree
Hide file tree
Showing 84 changed files with 95 additions and 93 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Send your suggestions using one of these methods:

3. as an [issue](https://github.com/curl/curl/issues)

/ The curl team!
/ The curl team
9 changes: 5 additions & 4 deletions .github/workflows/checkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
# config file help: https://github.com/amperser/proselint/
- name: create proselint config
run: |
cat <<JSON > $HOME/.proselintrc
cat <<JSON > $HOME/.proselintrc.json
{
"checks": {
"typography.diacritical_marks": false,
Expand All @@ -62,24 +62,25 @@ jobs:
run: git ls-files -z '*.md' | xargs -0 -n1 .github/scripts/trimmarkdownheader.pl

- name: check prose
run: git ls-files -z '*.md' | grep -Evz 'CHECKSRC.md|DISTROS.md|CURLOPT_INTERFACE.md|interface.md' | xargs -0 proselint README
run: git ls-files -z '*.md' | 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 > $HOME/.proselintrc
cat <<JSON > $HOME/.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/CHECKSRC.md docs/libcurl/opts/CURLOPT_INTERFACE.md docs/cmdline-opts/interface.md
run: proselint docs/internals/CHECKSRC.md docs/libcurl/curl_mprintf.md docs/libcurl/opts/CURLOPT_INTERFACE.md docs/cmdline-opts/interface.md

# Docs: https://github.com/marketplace/actions/markdown-link-check
linkcheck:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ distribution terms.

## Backers

Thank you to all our backers! 🙏 [Become a backer](https://opencollective.com/curl#section-contribute).
Thank you to all our backers 🙏 [Become a backer](https://opencollective.com/curl#section-contribute).

## Sponsors

Expand Down
2 changes: 1 addition & 1 deletion docs/CIPHERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ TLS_AES_128_CCM_8_SHA256
In addition to above list the following cipher suites can be used:
`TLS_SM4_GCM_SM3` `TLS_SM4_CCM_SM3` `TLS_SHA256_SHA256` `TLS_SHA384_SHA384`.
Usage of these cipher suites is not recommended. (The last two cipher suites
are NULL ciphers!)
are NULL ciphers, offering no encryption whatsoever.)

### Schannel notes

Expand Down
2 changes: 1 addition & 1 deletion docs/ECH.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ Then:
autoreconf -fi
LDFLAGS="-Wl,-rpath,$HOME/code/boringssl/inst/lib" ./configure --with-ssl=$HOME/code/boringssl/inst --enable-ech --enable-httpsrr
...lots of output...
WARNING: ECH HTTPSRR enabled but marked EXPERIMENTAL. Use with caution!
WARNING: ECH HTTPSRR enabled but marked EXPERIMENTAL. Use with caution.
make
```

Expand Down
8 changes: 4 additions & 4 deletions docs/HTTP3.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ You can build curl with cmake:
% cd ..
% git clone https://github.com/curl/curl
% cd curl
% cmake . -B build -DCURL_USE_OPENSSL=ON -DUSE_OPENSSL_QUIC=ON
% cmake --build build
% cmake --install build
% cmake . -B bld -DCURL_USE_OPENSSL=ON -DUSE_OPENSSL_QUIC=ON
% cmake --build bld
% cmake --install bld

If `make install` results in `Permission denied` error, you need to prepend
it with `sudo`.
Expand Down Expand Up @@ -404,7 +404,7 @@ Get, build and install nghttp2:
% git clone https://github.com/nghttp2/nghttp2.git
% cd nghttp2
% autoreconf -fi
% PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/daniel/build-quictls/lib/pkgconfig:/home/daniel/build-nghttp3/lib/pkgconfig:/home/daniel/build-ngtcp2/lib/pkgconfig LDFLAGS=-L/home/daniel/build-quictls/lib CFLAGS=-I/home/daniel/build-quictls/include ./configure --enable-maintainer-mode --prefix=/home/daniel/build-nghttp2 --disable-shared --enable-app --enable-http3 --without-jemalloc --without-libxml2 --without-systemd
% PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/daniel/build-quictls/lib/pkgconfig:/home/daniel/build-nghttp3/lib/pkgconfig:/home/daniel/build-ngtcp2/lib/pkgconfig LDFLAGS=-L/home/daniel/build-quictls/lib CFLAGS=-I/home/daniel/build-quictls/include ./configure --enable-maintainer-mode --prefix=/home/daniel/build-nghttp2 --disable-shared --enable-app --enable-http3 --without-jemalloc --without-libxml2 --without-systemd
% make && make install

Run the local h3 server on port 9443, make it proxy all traffic through to
Expand Down
2 changes: 1 addition & 1 deletion docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ that are not automatically detected:

This is a probably incomplete list of known CPU architectures and operating
systems that curl has been compiled for. If you know a system curl compiles
and runs on, that is not listed, please let us know!
and runs on, that is not listed, please let us know.

## 101 Operating Systems

Expand Down
2 changes: 1 addition & 1 deletion docs/MAIL-ETIQUETTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ We allow subscribers to subscribe to the "digest" version of the mailing
lists. A digest is a collection of mails lumped together in one single mail.

Should you decide to reply to a mail sent out as a digest, there are two
things you MUST consider if you really really cannot subscribe normally
things you MUST consider if you really, really cannot subscribe normally
instead:

Cut off all mails and chatter that is not related to the mail you want to
Expand Down
2 changes: 1 addition & 1 deletion docs/MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ To get even more details and information on what curl does, try using the
`--trace` or `--trace-ascii` options with a given filename to log to, like
this:

curl --trace trace.txt www.haxx.se
curl --trace my-trace.txt www.haxx.se


## Detailed Information
Expand Down
2 changes: 1 addition & 1 deletion docs/SPONSORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ gambling, pornography, social media manipulation etc.
## Past Sponsors

Sponsors that stop paying are considered *Past Sponsors* and are not displayed
on the sponsor page anymore. We thank you for your contributions!
on the sponsor page anymore. We thank you for your contributions.
2 changes: 1 addition & 1 deletion docs/SSL-PROBLEMS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ SPDX-License-Identifier: curl
when connecting to make the connection succeed.

An additional complication can be that modern SSL libraries sometimes are
built with support for older SSL and TLS versions disabled!
built with support for older SSL and TLS versions disabled.

All versions of SSL and the TLS versions before 1.2 are considered insecure
and should be avoided. Use TLS 1.2 or later.
Expand Down
2 changes: 1 addition & 1 deletion docs/TheArtOfHttpScripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ SPDX-License-Identifier: curl

Curl supports encrypted fetches when built to use a TLS library and it can be
built to use one out of a fairly large set of libraries - `curl -V` shows
which one your curl was built to use (if any!). To get a page from an HTTPS
which one your curl was built to use (if any). To get a page from an HTTPS
server, simply run curl like:

curl https://secure.example.com
Expand Down
2 changes: 1 addition & 1 deletion docs/URL-SYNTAX.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ unlikely that multiple parsers treat URLs the same way.

Due to the inherent differences between URL parser implementations, it is
considered a security risk to mix different implementations and assume the
same behavior!
same behavior.

For example, if you use one parser to check if a URL uses a good hostname or
the correct auth field, and then pass on that same URL to a *second* parser,
Expand Down
2 changes: 1 addition & 1 deletion docs/cmdline-opts/_EXITCODES.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Too many redirects. When following redirects, curl hit the maximum amount.
## 48
Unknown option specified to libcurl. This indicates that you passed a weird
option to curl that was passed on to libcurl and rejected. Read up in the
manual!
manual.
## 49
Malformed telnet option.
## 52
Expand Down
1 change: 1 addition & 0 deletions docs/cmdline-opts/_OPTIONS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!-- Copyright (C) Daniel Stenberg, <[email protected]>, et al. -->
<!-- SPDX-License-Identifier: curl -->
# OPTIONS

Options start with one or two dashes. Many of the options require an
additional value next to them. If provided text does not start with a dash, it
is presumed to be and treated as a URL.
Expand Down
2 changes: 1 addition & 1 deletion docs/cmdline-opts/data-urlencode.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ curl using one of the following syntaxes:
## content
URL-encode the content and pass that on. Just be careful so that the content
does not contain any `=` or `@` symbols, as that makes the syntax match one of
the other cases below!
the other cases below.

## =content
URL-encode the content and pass that on. The preceding `=` symbol is not
Expand Down
4 changes: 2 additions & 2 deletions docs/cmdline-opts/head.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Example:

# `--head`

Fetch the headers only! HTTP-servers feature the command HEAD which this uses
to get nothing but the header of a document. When used on an FTP or FILE file,
Fetch the headers only. HTTP-servers feature the command HEAD which this uses
to get nothing but the header of a document. When used on an FTP or FILE URL,
curl displays the file size and last modification time only.
2 changes: 1 addition & 1 deletion docs/cmdline-opts/libcurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Example:

Append this option to any ordinary curl command line, and you get
libcurl-using C source code written to the file that does the equivalent of
what your command-line operation does!
what your command-line operation does.
2 changes: 1 addition & 1 deletion docs/cmdline-opts/range.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ specifies two separate 100-byte ranges(*) (HTTP)
##

(*) = NOTE that these make the server reply with a multipart response, which
is returned as-is by curl! Parsing or otherwise transforming this response is
is returned as-is by curl. Parsing or otherwise transforming this response is
the responsibility of the caller.

Only digit characters (0-9) are valid in the 'start' and 'stop' fields of the
Expand Down
2 changes: 1 addition & 1 deletion docs/cmdline-opts/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ To control where this URL is written, use the --output or the --remote-name
options.

**WARNING**: On Windows, particular `file://` accesses can be converted to
network accesses by the operating system. Beware!
network accesses by the operating system. Beware.
2 changes: 1 addition & 1 deletion docs/cmdline-opts/version.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ curl was built with support for character set conversions (like EBCDIC)

## `Debug`
This curl uses a libcurl built with Debug. This enables more error-tracking
and memory debugging etc. For curl-developers only!
and memory debugging etc. For curl-developers only.

## `ECH`
ECH support is present.
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ first.

Most examples should build fine using a command line like this:

`curl-config --cc --cflags --libs` -o example example.c
`curl-config --cc --cflags --libs` -o example-my example.c

Some compilers do not like having the arguments in this order but instead
want you do reorganize them like:

`curl-config --cc` -o example example.c `curl-config --cflags --libs`
`curl-config --cc` -o example-my example.c `curl-config --cflags --libs`

**Please** do not use the `curl.se` site as a test target for your libcurl
applications/experiments. Even if some of the examples use that site as a URL
Expand Down
2 changes: 1 addition & 1 deletion docs/internals/HYPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SPDX-License-Identifier: curl
Hyper is a separate HTTP library written in Rust. curl can be told to use this
library as a backend to deal with HTTP.

## Experimental!
## EXPERIMENTAL

Hyper support in curl is considered **EXPERIMENTAL** until further notice. It
needs to be explicitly enabled at build-time.
Expand Down
2 changes: 1 addition & 1 deletion docs/internals/NEW-PROTOCOL.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ peculiarities of the protocol. It needs documentation.

Maybe it even needs some internal documentation so that the developers who try
to debug something five years from now can figure out functionality a little
easier!
easier.

The protocol specification itself should be freely available without requiring
a non-disclosure agreement or similar.
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/curl_easy_getinfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ In microseconds. See CURLINFO_STARTTRANSFER_TIME_T(3)
## CURLINFO_TLS_SESSION
(**Deprecated**) TLS session info that can be used for further processing. See
CURLINFO_TLS_SESSION(3). Use CURLINFO_TLS_SSL_PTR(3) instead!
CURLINFO_TLS_SESSION(3). Use CURLINFO_TLS_SSL_PTR(3) instead.
## CURLINFO_TLS_SSL_PTR
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/curl_easy_setopt.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ appropriate options, the application can change libcurl's behavior. All
options are set with an *option* followed by a *parameter*. That parameter can
be a **long**, a **function pointer**, an **object pointer** or a
**curl_off_t**, depending on what the specific option expects. Read this
manual carefully as bad input values may cause libcurl to behave badly! You
manual carefully as bad input values may cause libcurl to behave badly. You
can only set one option in each function call. A typical application uses many
curl_easy_setopt(3) calls in the setup phase.
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/curl_easy_unescape.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int main(void)
int decodelen;
char *decoded = curl_easy_unescape(curl, "%63%75%72%6c", 12, &decodelen);
if(decoded) {
/* do not assume printf() works on the decoded data! */
/* do not assume printf() works on the decoded data */
printf("Decoded: ");
/* ... */
curl_free(decoded);
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/curl_escape.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ char *curl_escape(const char *string, int length);
# DESCRIPTION
Obsolete function. Use curl_easy_escape(3) instead!
Obsolete function. Use curl_easy_escape(3) instead.
This function converts the given input **string** to a URL encoded string
and return that as a new allocated string. All input characters that are not
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/curl_formadd.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ you must make sure strlen() on the data pointer returns zero.
## CURLFORM_CONTENTSLENGTH
(This option is deprecated. Use *CURLFORM_CONTENTLEN* instead!)
(This option is deprecated. Use *CURLFORM_CONTENTLEN* instead.)
followed by a long giving the length of the contents. Note that for
*CURLFORM_STREAM* contents, this option is mandatory.
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/curl_formfree.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void curl_formfree(struct curl_httppost *form);
# DESCRIPTION
This function is deprecated. Do not use. See curl_mime_init(3) instead!
This function is deprecated. Do not use. See curl_mime_init(3) instead.
curl_formfree() is used to clean up data previously built/appended with
curl_formadd(3). This must be called when the data has been used, which
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/curl_formget.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ return the buffer length passed to it on success.

If the **CURLFORM_STREAM** option is used in the formpost, it prevents
curl_formget(3) from working until you have performed the actual HTTP request.
This, because first then does libcurl known which actual read callback to use!
This, because first then does libcurl known which actual read callback to use.

# %PROTOCOLS%

Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/curl_free.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int main(void)
{
char *width = curl_getenv("COLUMNS");
if(width) {
/* it was set! */
/* it was set */
curl_free(width);
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/curl_getenv.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ int main(void)
{
char *width = curl_getenv("COLUMNS");
if(width) {
/* it was set! */
/* it was set */
curl_free(width);
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/curl_global_init_mem.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ to that man page for documentation.
# CAUTION
Manipulating these gives considerable powers to the application to severely
screw things up for libcurl. Take care!
screw things up for libcurl. Take care.
# %PROTOCOLS%
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/curl_mprintf.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ pointer to a long argument
(ell-ell). A following integer conversion corresponds to a *long long* or
*unsigned long long* argument, or a following n conversion corresponds to
a pointer to a long long argument.
a pointer to a *long long* argument.
## q
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/curl_multi_perform.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ int main(void)
break;
}
/* if there are still transfers, loop! */
/* if there are still transfers, loop */
} while(still_running);
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/curl_multi_socket.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ int main(void)

# DEPRECATED

curl_multi_socket(3) is deprecated, use curl_multi_socket_action(3) instead!
curl_multi_socket(3) is deprecated, use curl_multi_socket_action(3) instead.

# %AVAILABILITY%

Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/curl_url_cleanup.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void curl_url_cleanup(CURLU *handle);
# DESCRIPTION
Frees all the resources associated with the given *CURLU* handle!
Frees all the resources associated with the given *CURLU* handle.
Passing in a NULL pointer in *handle* makes this function return
immediately with no action.
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/curl_url_dup.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ int main(void)
CURLU *url2;
rc = curl_url_set(url, CURLUPART_URL, "https://example.com", 0);
if(!rc) {
url2 = curl_url_dup(url); /* clone it! */
url2 = curl_url_dup(url); /* clone it */
curl_url_cleanup(url2);
}
curl_url_cleanup(url);
Expand Down
2 changes: 1 addition & 1 deletion docs/libcurl/curl_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ char *curl_version();
Returns a human readable string with the version number of libcurl and some of
its important components (like OpenSSL version).

We recommend using curl_version_info(3) instead!
We recommend using curl_version_info(3) instead.

# %PROTOCOLS%

Expand Down
Loading

0 comments on commit 3040971

Please sign in to comment.