Skip to main content

Crate mdwright_lint

Crate mdwright_lint 

Source

Modules§

stdlib
The standard library of lint rules.

Structs§

Diagnostic
One issue at one source location, optionally with an automatic Fix. Spans are byte ranges into the original source string.
DuplicateRuleName
Error returned by RuleSet::add when a name collides with an already-registered rule.
Fix
LintOptions
Knobs that change lint execution.
RuleSet
An ordered, name-unique collection of LintRules.
Snippet
Source-snippet view shared by the pretty and JSON renderers: the one line of source covering a diagnostic’s span, plus the column range of the underlined region.

Enums§

Severity
Diagnostic severity for serialised output.

Constants§

DOCS_URL_DEFAULT
Published base URL of the mdwright documentation site.

Traits§

LintRule
A lint check. Implementors may be unit structs (stdlib rules) or carry configuration (regex patterns, allowlists, …).

Functions§

apply_safe_fixes
Apply every safe fix from diags to the document’s original source.
docs_url
Resolve the documentation site’s base URL. Honours MDWRIGHT_DOCS_URL if set; otherwise returns DOCS_URL_DEFAULT. The returned value has no trailing slash.
rule_doc_url
Build the published URL of a rule’s documentation page. Math rules preserve their math/ prefix; the rendered file is <name>.html.