mirror of
https://github.com/curl/curl.git
synced 2026-07-24 18:57:18 +03:00
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
This commit is contained in:
parent
6bb76d92e1
commit
62515e8e9d
3 changed files with 168 additions and 11 deletions
12
.github/workflows/checkdocs.yml
vendored
12
.github/workflows/checkdocs.yml
vendored
|
|
@ -85,22 +85,14 @@ jobs:
|
|||
# - 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
|
||||
|
||||
# Docs: https://github.com/UmbrellaDocs/action-linkspector
|
||||
linkcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
name: checkout
|
||||
|
||||
- name: trim the cmdline docs markdown files
|
||||
run: find docs/cmdline-opts -name "*.md" ! -name "_*" ! -name MANPAGE.md -print0 | xargs -0 -n1 .github/scripts/cleancmd.pl
|
||||
|
||||
- name: Run linkspector
|
||||
uses: umbrelladocs/action-linkspector@fc382e19892aca958e189954912fe379a8df270c # v1
|
||||
with:
|
||||
github_token: ${{ secrets.github_token }}
|
||||
reporter: github-pr-review
|
||||
fail_on_error: true
|
||||
- name: Run mdlinkcheck
|
||||
run: ./scripts/mdlinkcheck
|
||||
|
||||
spellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue