Validate spec URL fragments with @webref/xref - #4320
Open
schalkneethling wants to merge 1 commit into
Open
Conversation
Check the fragment of every spec URL against the definition and heading anchors that w3c/webref crawls, using the same rules as BCD's spec_url linter (skip fragment-less URLs, strip text fragments, lookup with series: true and standing: good). Unknown fragments warn without failing the build while existing data is cleaned up; flip fragmentErrorsAreFatal to make them errors. npm run test:specs -- --report additionally writes a self-contained HTML report of every fragment check to reports/spec-fragments.html. Progress on web-platform-dx#84 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Progress on #84.
Checks the fragment of every spec URL against the anchors w3c/webref crawls, using the same rules as BCD's
spec_urllinter (mdn/browser-compat-data#23958): skip fragment-less URLs, strip:~:text=fragments,lookup(url, { series: true, standing: "good" }).fragmentErrorsAreFatalinscripts/specs.tsto enforce once the data is clean.npm run test:specs -- --reportwrites a self-contained HTML report of every fragment check toreports/spec-fragments.html.Currently 32 of 1,356 spec URLs warn. Per @tidoust's suggestion, I'll relink those to current ids in a follow-up PR rather than asking webref to carry legacy alias ids.