[][src]Struct rslint_core::LintResult

pub struct LintResult<'s> {
    pub parser_diagnostics: Vec<Diagnostic>,
    pub store: &'s CstRuleStore,
    pub rule_results: HashMap<&'static str, RuleResult>,
    pub directive_diagnostics: Vec<Diagnostic>,
    pub parsed: SyntaxNode,
    pub file_id: usize,
    pub verbose: bool,
    pub fixed_code: Option<String>,
}

The result of linting a file.

Fields

parser_diagnostics: Vec<Diagnostic>

Any diagnostics (errors, warnings, etc) emitted from the parser

store: &'s CstRuleStore

The store used for the lint run

rule_results: HashMap<&'static str, RuleResult>

The diagnostics emitted by each rule run

directive_diagnostics: Vec<Diagnostic>

Any warnings or errors emitted by the directive parser

parsed: SyntaxNodefile_id: usizeverbose: boolfixed_code: Option<String>

Implementations

impl<'_> LintResult<'_>[src]

pub fn diagnostics(&self) -> impl Iterator<Item = &Diagnostic>[src]

Get all of the diagnostics thrown during linting, in the order of parser diagnostics, then the diagnostics of each rule sequentially.

pub fn outcome(&self) -> Outcome[src]

The overall outcome of linting this file (failure, warning, success, etc)

pub fn fix(&mut self, dirty: bool) -> Option<String>[src]

Attempt to automatically fix any fixable issues and return the fixed code.

This will not run if there are syntax errors unless dirty is set to true.

Trait Implementations

impl<'s> Clone for LintResult<'s>[src]

impl<'s> Debug for LintResult<'s>[src]

Auto Trait Implementations

impl<'s> !RefUnwindSafe for LintResult<'s>

impl<'s> Send for LintResult<'s>

impl<'s> Sync for LintResult<'s>

impl<'s> Unpin for LintResult<'s>

impl<'s> !UnwindSafe for LintResult<'s>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> Erasable for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.