Trait x_lint::content::ContentLinter[][src]

pub trait ContentLinter: Linter {
    fn run<'l>(
        &self,
        ctx: &ContentContext<'l>,
        out: &mut LintFormatter<'l, '_>
    ) -> Result<RunStatus<'l>>; fn pre_run<'l>(
        &self,
        _file_ctx: &FilePathContext<'l>
    ) -> Result<RunStatus<'l>> { ... } }
Expand description

Represents a linter that checks file contents.

Required methods

Executes the lint against the given content context.

Provided methods

Pre-run step – avoids loading the contents if possible.

The default implementation returns Ok(RunStatus::Executed); individual lints may configure a more restricted set.

Implementors