17 Commits

Author SHA1 Message Date
Daniel Stenberg
2e3687c60c
mdlinkcheck: only look for markdown links in markdown files
It finds debug outputs in source code otherwise.

Output the whitelist "warnings" to stderr to better allow us to count
URLs with `./mdlinkcheck --dry-run | wc -l`.

Closes #19938
2025-12-11 23:40:07 +01:00
Daniel Stenberg
26d766596e
mdlinkcheck: add --dry-run to only show all found URLs
- remove the debug tracing leftovers from d9d2e339ced3fa02 that made exit
  unconditonally

Closes #19914
2025-12-10 10:51:10 +01:00
Viktor Szakats
d9d2e339ce
tidy-up: URLs (cont.) and mdlinkcheck
- add missing ending slashes.
  To avoid duplicates and to use canonical URLs.
- reapply lost updates.
  Follow-up to 2ae983bf4ea5ef86f0e68ea0ff219a91b1aa3428 #19879
- mdlinkcheck: include the `include` directory.
- mdlinkcheck: show unused whitelist items.
- mdlinkcheck: improve debug output.
- mdlinkcheck: delete redundant whitelist items.
- examples/simplessl: lowercase the protocol part.
- BINDINGS: replace one remaining HTTP URL with HTTPS.
  Issue: https://github.com/pycurl/pycurl/issues/892
- BINDINGS: fix a broken link.
- BINDINGS: follow a refresh content redirect.
- KNOWN_BUGS: whitespace.

Closes #19911
2025-12-10 01:21:07 +01:00
Viktor Szakats
3fb932d492
mdlinkcheck: do not pick up single quote and backslash after URLs
Closes #19910
2025-12-09 23:54:55 +01:00
Viktor Szakats
920319855d
mdlinkcheck: exclude self from URL search
To avoid picking up the whitelist.

Closes #19909
2025-12-09 23:54:54 +01:00
Daniel Stenberg
073b85cefe
GHA: make links get checked daily
Assisted-by: Viktor Szakats
Closes #19898
2025-12-09 16:28:23 +01:00
Daniel Stenberg
3dd1ffdeb0
FAQ/TODO/KNOWN_BUGS: convert to markdown
- convert to markdown
- auto-generate the TOCs on the website, remove them from the docs
- cleanups
- spellchecked
- updated links

Closes #19875
2025-12-09 10:52:56 +01:00
Daniel Stenberg
a1c01b2015
mdlinkcheck: ignore IP numbers, allow '@' in raw URLs 2025-12-08 12:57:51 +01:00
Daniel Stenberg
51587f6f14
mdlinkcheck: detect and check "raw" links
- URLs specified outside of the markdown []() are now extracted and
  checked

- also check TODO, FAQ and KNOWN_BUGS

- more aggressive avoiding to check github.com/curl/curl, all uses of
  example domains and some more established URLs on the curl.se site

- list all errors in the end to make them easier to spot in CI logs

Closes #19848
2025-12-05 23:41:41 +01:00
Viktor Szakats
d499aa5238
mk-ca-bundle.pl: use open() with argument list to replace backticks
On Windows this requires Perl 5.22 from year 2015.

Also:
- mdlinkcheck: delete redundant error handling logic.
  Follow-up to 77be4a7ab2b5a0c633b9107fd286bda1f57e4725 #19437

Closes #19461
2025-11-12 00:53:43 +01:00
Viktor Szakats
77be4a7ab2
mdlinkcheck: pass curl arguments to open() as list
To prevent misinterpreting quotes or other special characters.

Requires Perl 5.22+ (2015-Jun-01) on Windows.

Ref: https://perldoc.perl.org/functions/open

Closes #19437
2025-11-10 14:21:35 +01:00
Daniel Stenberg
71b5e02590
mdlinkcheck: reject URLs containing quotes
Those would be illegal anyway and would make the script misbehave

Reported-by: Stanislav Fort
Closes #18889
2025-10-06 23:38:41 +02:00
Daniel Stenberg
aa4596a97e
mdlinkcheck: handle links with a leading slash properly
Ref: #18372
Closes #18382
2025-08-23 23:07:13 +02:00
Viktor Szakats
2ec54556d4
scripts: enable strict warnings in Perl where missing, fix fallouts
- add 'use warnings' and 'use strict' where missing from Perl scripts.
- fix 'Use of uninitialized value'.
- fix missing declarations.
- test1140.pl: fix 'Possible precedence issue with control flow operator'.
- fix other misc issues.

Most actual errors found during this PR were fixed and merged via
separate PRs.

Likely there are remaining warnings not found and fixed in this PR.

Closes #17877
2025-07-27 22:35:18 +02:00
Viktor Szakats
ddcfd2d511
tidy-up: whitespace (more in Perl)
Follow-up to 8eab2b70860e285525130f69b22ac5567292c659 #17896
Cherry-picked from #17877
Closes #17901
2025-07-12 08:59:44 +02:00
Daniel Stenberg
28dd14aafe
scripts/mdlinkcheck: fix the ../ handling in file links
Follow-up to 62515e8e9d750f

Closes #15797
2024-12-21 13:57:38 +01:00
Daniel Stenberg
62515e8e9d
scripts/mdlinkcheck: markdown link checker
This script parses all markdown files in the repository, extracts all
links and verifies that they work.

It makes sure to only check the URLs once, even if used in multiple
links. There is a whitelist for URLs we deem unnecessary to check.

It uses curl to do the checks.

As a bonus, this makes it easy to run this check locally.

Closes #15742
2024-12-14 14:22:30 +01:00