pub struct RunResult {
pub total_files: usize,
pub files_with_issues: usize,
pub files_formatted: usize,
pub issues: Vec<LintIssue>,
pub issues_before_format: usize,
pub issues_fixed: usize,
pub format_results: Vec<FormatResult>,
pub duration_ms: u64,
pub exit_code: i32,
pub run_mode: RunModeKind,
pub unavailable_tools: Vec<UnavailableTool>,
pub target_paths: Vec<String>,
}Expand description
Aggregated result of a linthis run
Fields§
§total_files: usizeTotal number of files processed
files_with_issues: usizeNumber of files with lint issues
files_formatted: usizeNumber of files that were formatted
issues: Vec<LintIssue>All lint issues found (after formatting)
issues_before_format: usizeIssues found before formatting (for comparison)
issues_fixed: usizeIssues fixed by formatting
format_results: Vec<FormatResult>All format results
duration_ms: u64Total execution time in milliseconds
exit_code: i32Exit code: 0 = success, 1 = issues found, 2 = error
run_mode: RunModeKindRun mode for appropriate output messages
Tools that were not available during the run
target_paths: Vec<String>Target paths that were scanned (CLI paths before expansion)
Implementations§
Source§impl RunResult
impl RunResult
pub fn new() -> Self
pub fn add_issue(&mut self, issue: LintIssue)
pub fn add_format_result(&mut self, result: FormatResult)
Sourcepub fn calculate_exit_code(&mut self)
pub fn calculate_exit_code(&mut self)
Calculate exit code based on results
Exit codes:
- 0: No issues (success)
- 1: Has errors
- 2: Formatting errors occurred
- 3: Has warnings only (no errors)
Sourcepub fn count_files_with_issues(&mut self)
pub fn count_files_with_issues(&mut self)
Count files with issues
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunResult
impl<'de> Deserialize<'de> for RunResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RunResult
impl RefUnwindSafe for RunResult
impl Send for RunResult
impl Sync for RunResult
impl Unpin for RunResult
impl UnsafeUnpin for RunResult
impl UnwindSafe for RunResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more