Repository navigation
Commit afaee3d
authored
dev: include Markdown link checks in the local lint suite (#25287)
## Which issue does this PR close?
- Part of #21048. The issue stays open for the other checklist items.
## Rationale for this change
`dev/rust_lint.sh` is the local mirror of the CI lint jobs, but it does
not run the Markdown link check. CI runs
`ci/scripts/markdown_link_check.sh` in `dev.yml`. A developer can push a
broken internal link after a clean local lint run and then see the
failure only in CI. This PR adds the existing checker to the local
suite.
## What changes are included in this PR?
- `dev/rust_lint.sh` runs `ci/scripts/markdown_link_check.sh` as a
read-only step, after the workflow install check and before the Rust
documentation build. The `--write` and `--allow-dirty` flags never reach
it.
- The runner loads `LYCHEE_VERSION` from
`ci/scripts/utils/tool_versions.sh` and installs that version when
`lychee` is missing. An installed `lychee` is used as is, which is the
runner's existing policy for other tools.
- `ci/scripts/markdown_link_check.sh` becomes executable, because the
runner invokes each registered script directly. The script body,
`lychee.toml`, the file selection, and the GitHub workflow do not
change.
- `docs/source/contributor-guide/testing.md` documents the new behavior
and keeps the standalone instructions.
## What is the testing strategy for this PR?
- A disposable fixture with stubbed steps and tools: the checker runs
once with no arguments in check mode and in both write modes, a missing
`lychee` triggers exactly the pinned install command, a present `lychee`
triggers no install, and a checker failure stops the suite before the
later steps.
- A disposable clone with an injected broken internal link: the
standalone checker and `./dev/rust_lint.sh` both fail with the same exit
code and name the file. After the fix, the full suite passes.
- The real checker and the full `./dev/rust_lint.sh` pass on this branch
with `lychee` 0.23.0.
## Are there any user-facing changes?
No. Developers get the link check in the local lint suite. CI is
unchanged.
🤖 Generated with [Claude Code](https://claude.com/claude-code)1 parent 22cf99d commit afaee3d
3 files changed
Lines changed: 16 additions & 2 deletions
File mode changed.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
87 | 93 | | |
88 | 94 | | |
89 | 95 | | |
90 | 96 | | |
| 97 | + | |
91 | 98 | | |
92 | 99 | | |
93 | 100 | | |
| |||
107 | 114 | | |
108 | 115 | | |
109 | 116 | | |
| 117 | + | |
110 | 118 | | |
111 | 119 | | |
112 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
192 | 197 | | |
193 | 198 | | |
194 | 199 | | |
| |||
200 | 205 | | |
201 | 206 | | |
202 | 207 | | |
| 208 | + | |
203 | 209 | | |
204 | 210 | | |
205 | 211 | | |
| |||
0 commit comments