Repository navigation
feat: Link every diagnostic to its entry on the Linter Rules page. - #68
Merged
Merged
Conversation
Meta.DocumentationURL joins the documentation site, the Linter Rules page of the rule's extension (or the core page), and the rule's anchor. A Meta built from a bare ID resolves to the core page, which is where the diagnostics of parser, resolver, and runner are documented. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014C8sbpnyEX9WQ3C3BP1KQ2
Diagnostic carries a DocumentationURL. The runner's rule reporter stamps it from Meta alongside RuleID and Severity, and the pipeline fills it in for the diagnostics of parser, resolver, and runner before returning. A documentation test checks that every URL points at an existing page. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014C8sbpnyEX9WQ3C3BP1KQ2
The human format ends every block with a dimmed see line, the JSON format adds documentationUrl. The CLI reference and the lint guide describe both; the guide's description of the JSON output now matches what the formatter writes, a pretty-printed array rather than one object per line. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014C8sbpnyEX9WQ3C3BP1KQ2
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.
Closes #66.
What changed
seeline at the end of each block; the JSON format addsdocumentationUrl.Meta.DocumentationURL()derives the address from the rule's metadata: the site, the Linter Rules page of the rule's extension (or the core page), and the anchor#<category>-<name>the pages already use. Nothing is stored per rule, so the URL cannot drift away from the page.RuleIDandSeverity. The diagnostics of parser, resolver, and runner carry only an ID; the pipeline fills in their URL before returning, and aMetabuilt from a bare ID resolves to the core page, where those entries live.seeline and the JSON field; the guide's example output shows the new line.Why
A finding named a rule ID but offered no way to the explanation. With the Linter Rules pages from #53 in place, the linter can point at the exact entry, from the terminal and from tooling that consumes the JSON output.
Verification
make qais green,mkdocs build --strictis clean. Running the linter on a broken model shows theseeline in the human format anddocumentationUrlin the JSON output. The links resolve once the pages are published with the next release.🤖 Generated with Claude Code
https://claude.ai/code/session_014C8sbpnyEX9WQ3C3BP1KQ2