pub struct LintResult<'s> {
pub parser_diagnostics: Vec<Diagnostic>,
pub rule_results: HashMap<&'static str, RuleResult>,
pub directive_diagnostics: Vec<DirectiveError>,
pub store: &'s CstRuleStore,
pub parsed: SyntaxNode,
pub file_id: usize,
pub verbose: bool,
pub fixed_code: Option<String>,
}Expand description
The result of linting a file.
Fields§
§parser_diagnostics: Vec<Diagnostic>Any diagnostics (errors, warnings, etc) emitted from the parser
rule_results: HashMap<&'static str, RuleResult>The diagnostics emitted by each rule run
directive_diagnostics: Vec<DirectiveError>Any warnings or errors emitted by the directive parser
store: &'s CstRuleStore§parsed: SyntaxNode§file_id: usize§verbose: bool§fixed_code: Option<String>Implementations§
Source§impl LintResult<'_>
impl LintResult<'_>
Sourcepub fn diagnostics(&self) -> impl Iterator<Item = &Diagnostic>
pub fn diagnostics(&self) -> impl Iterator<Item = &Diagnostic>
Get all of the diagnostics thrown during linting, in the order of parser diagnostics, then the diagnostics of each rule sequentially.
Trait Implementations§
Source§impl<'s> Clone for LintResult<'s>
impl<'s> Clone for LintResult<'s>
Source§fn clone(&self) -> LintResult<'s>
fn clone(&self) -> LintResult<'s>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'s> !RefUnwindSafe for LintResult<'s>
impl<'s> !UnwindSafe for LintResult<'s>
impl<'s> Freeze for LintResult<'s>
impl<'s> Send for LintResult<'s>
impl<'s> Sync for LintResult<'s>
impl<'s> Unpin for LintResult<'s>
impl<'s> UnsafeUnpin for LintResult<'s>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more