-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
doc,tools: checkLinks.js does not cover api #35189
Copy link
Copy link
Closed
Labels
buildIssues and PRs related to build files or the CI.Issues and PRs related to build files or the CI.discussIssues opened for discussions and feedbacks.Issues opened for discussions and feedbacks.docIssues and PRs related to the documentations.Issues and PRs related to the documentations.toolsIssues and PRs related to the tools directory.Issues and PRs related to the tools directory.
Metadata
Metadata
Assignees
Labels
buildIssues and PRs related to build files or the CI.Issues and PRs related to build files or the CI.discussIssues opened for discussions and feedbacks.Issues opened for discussions and feedbacks.docIssues and PRs related to the documentations.Issues and PRs related to the documentations.toolsIssues and PRs related to the tools directory.Issues and PRs related to the tools directory.
This should be tested when building the HTML, but apparently it only tests links internal to
all.htmlpage:node/tools/doc/allhtml.js
Lines 85 to 88 in 9d12c14
Usually that would cover all links internal to the docs, as all links to doc pages are stripped from the filename to keep only the hash part:
node/tools/doc/allhtml.js
Lines 39 to 45 in 9d12c14
But in this case, because
modules_module.htmldoesn't exist, it's treated as an external page and the broken links slip through the test…Yes indeed. The reason
checkLinks.jsdoes not coverapiis because we are using.htmlextension to reference other doc pages, whilecheckLinks.jswould expect.md. One way of fixing it would be to use.mdextensions in the Markdown files, and usecheckLinks.jsto test said links – it would also improve the experience of navigating the docs through GitHub web UI. Another way would be to tweak the current test to make sure this doesn't reproduce.Originally posted by @aduh95 in #35182 (comment)