Closed Bug 1945858 Opened 14 days ago Closed 12 days ago

Several firefox-source-docs.mozilla.org links within the tree are broken

Categories

(Developer Infrastructure :: Firefox Source Docs: Content, defect)

defect

Tracking

(firefox137 fixed)

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

Details

(Whiteboard: [addons-jira])

Attachments

(2 files)

I encountered a broken link in the tree. Instead of just fixing that one, I decided to look for all broken firefox-source-docs.mozilla.org links and fix the broken links.

I filed new bugs for unclear cases (see "See Also"), and will use this bug to attach the "obvious" cases.

Attached file dl.js

Quick and dirty script to look for broken links.

The urls in the script are found by searching for https://firefox-source-docs.mozilla.org with Searchfox (Searchfox link) and then extracting potential links via the devtools as follows:

copy(Array.from(new Set(document.body.innerText.match(/https:\/\/firefox-source-docs.mozilla.org\/(?!,)[^ "')>*\s{}]+/g))))`

What the script then does is to request all referenced URLs, and if there is a reference fragment present, also check whether the reference fragment appears in the generated documentation. Any missing link or fragment is printed.

This fuzzy approach works good enough. Some parts of the code construct the documentation links from substrings instead of having the link embedded at once, but I can easily resolve these cases manually.

Pushed by rob@robwu.nl: https://hg.mozilla.org/integration/autoland/rev/074feeb33389 Resolve many broken links to firefox-source-docs.mozilla.org r=webdriver-reviewers,perftest-reviewers,devtools-reviewers,translations-reviewers,android-reviewers,frontend-codestyle-reviewers,sparky,ohall
Status: NEW → RESOLVED
Closed: 12 days ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: