Linter

Trait Linter 

Source
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§

Source

fn lint(&mut self, document: &Document) -> Vec<Lint>

Analyzes a document and produces zero or more Lints. We pass self mutably for caching purposes.

Source

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.

Implementors§