Skip to content

docs: make HTML link checking actually run, and never false-pass#4104

Merged
andypugh merged 1 commit into
LinuxCNC:masterfrom
grandixximo:docs/checkref-no-false-pass
Jun 2, 2026
Merged

docs: make HTML link checking actually run, and never false-pass#4104
andypugh merged 1 commit into
LinuxCNC:masterfrom
grandixximo:docs/checkref-no-false-pass

Conversation

@grandixximo
Copy link
Copy Markdown
Contributor

HTML link checking has been a silent no-op: w3c-linkchecker 5.0.0 refuses file:// URIs by default, so checkref got an error with no broken-link marker and printed "all links are good!" without inspecting anything. This is very likely why #4053's broken cross-document links shipped uncaught.

This passes --follow-file-links so checklink actually inspects local files (including cross-document fragments), and stops checkref claiming success when checklink never validated a file (exit 64 = found-links is still a valid run; only exec failure or an explicit document refusal counts as not-validated).

Checking runs report-only (--warn-on-failure) for now, since the long no-op let a backlog accumulate. Measured on master: 73 pages / 275 broken refs, of which 270 are fixed by #4100 and 2 by #4103; the last 3 are in a companion PR. Once those land, the flag can be dropped so link breakage fails the build again.

grandixximo added a commit to grandixximo/linuxcnc that referenced this pull request Jun 2, 2026
Broken links surfaced once HTML link checking actually runs (companion
to the checkref fix, LinuxCNC#4104):

- qtvcp-widgets.adoc: link to halcmd.1.html#COMMANDS; the section's
  generated id is _commands.
- linuxcncrsh.1.adoc (x3): links to #_linuxcnc_subcommands; the
  SUBCOMMANDS section's generated id is _subcommands.
Doc link checking has been a silent no-op: recent w3c-linkchecker refuses
file:// URIs, so checklink returned an error with no broken-link marker
and checkref reported "all links are good!" without inspecting anything.
This is how broken cross-document links reached the published docs.

- checkref: pass --follow-file-links so checklink actually inspects the
  local files (and validates cross-document fragments).
- checkref: stop reporting success when checklink did not validate a file
  (nonzero exit or error output); skip with a warning and only vouch for
  files actually checked, warning instead of passing if none were. Never
  fail the build on an unusable checklink (environment problem).
- Submakefile: run checkref with --warn-on-failure for now, since the
  long no-op may have let broken links accumulate; report them without
  breaking the build. Drop the flag once the backlog is cleared.
- linuxcnc-checklink.in: fail clearly when @checklink@ is empty instead of
  "exec: : Permission denied".
@grandixximo grandixximo force-pushed the docs/checkref-no-false-pass branch from af9d51c to 4a3e0d0 Compare June 2, 2026 12:04
@andypugh andypugh merged commit 4415063 into LinuxCNC:master Jun 2, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants