Skip to main content

Module stdlib

Module stdlib 

Source
Expand description

The standard library of lint rules.

Every rule here implements crate::LintRule. The constructors defaults and all return ready-made RuleSets; by_name looks up a fresh instance of one stdlib rule by its kebab-case name, used by the CLI’s --rules parser.

§Rules

NameDefaultAdvisory
unbalanced-backtickyesno
math/unbalanced-delimyesno
math/unbalanced-envyesno
math/unbalanced-bracesyesno
adjacent-code-no-spaceyesno
heading-punctuationyesno
orphan-reference-linkyesno
duplicate-link-labelyesno
bare-urlyesno
trailing-whitespaceyesno
inconsistent-list-markeryesno
list-tightness-flippednoyes
duplicate-headingyesno
unicodeable-subscriptyesyes
info-string-typoyesyes
stray-dollarnono
latex-commandnono
escaped-emphasisnono
subscript-damagenono

Structs§

AdjacentCodeNoSpace
BareUrl
DuplicateHeading
DuplicateLinkLabel
EscapedEmphasis
HeadingPunctuation
InconsistentListMarker
InfoStringTypo
LatexCommand
ListTightnessFlipped
MathUnbalancedBraces
MathUnbalancedDelim
MathUnbalancedEnv
OrphanReferenceLink
StrayDollar
SubscriptDamage
TrailingWhitespace
UnbalancedBacktick
UnicodeableSubscript

Constants§

NAMES
Every stdlib rule’s kebab-case name, in registration order.

Functions§

all
Every stdlib rule, including the default-off ones.
by_name
Construct a fresh instance of one stdlib rule by kebab-case name. Returns None if name is not a stdlib rule. Used by the CLI’s --rules parser to look up +rule-name modifiers.
defaults
The curated default-on subset.
names
Iterator over every stdlib rule’s kebab-case name. Used by the suppression-map builder to validate names in <!-- mdwright: ... --> comments without instantiating every rule.