pub trait Linter: LSend {
// Required methods
fn lint(&mut self, document: &Document) -> Vec<Lint>;
fn description(&self) -> &str;
}
Expand description
A stateless rule that searches documents for grammatical errors.
Commonly implemented via ExprLinter
.
See also: LintGroup
.
Required Methods§
Sourcefn lint(&mut self, document: &Document) -> Vec<Lint>
fn lint(&mut self, document: &Document) -> Vec<Lint>
Analyzes a document and produces zero or more Lint
s.
We pass self
mutably for caching purposes.
Sourcefn description(&self) -> &str
fn description(&self) -> &str
A user-facing description of what kinds of grammatical errors this rule looks for. It is usually shown in settings menus.