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>> { ... } }

Represents a linter that checks file contents.

Required methods

fn run<'l>(
    &self,
    ctx: &ContentContext<'l>,
    out: &mut LintFormatter<'l, '_>
) -> Result<RunStatus<'l>>
[src]

Executes the lint against the given content context.

Loading content...

Provided methods

fn pre_run<'l>(&self, _file_ctx: &FilePathContext<'l>) -> Result<RunStatus<'l>>[src]

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

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

Loading content...

Implementors

Loading content...