pub trait OutputFormatter {
// Required method
fn format_warnings(
&self,
warnings: &[LintWarning],
file_path: &str,
) -> String;
// Provided methods
fn format_summary(
&self,
_files_processed: usize,
_total_warnings: usize,
_duration_ms: u64,
) -> Option<String> { ... }
fn use_colors(&self) -> bool { ... }
}Expand description
Trait for output formatters
Required Methods§
Sourcefn format_warnings(&self, warnings: &[LintWarning], file_path: &str) -> String
fn format_warnings(&self, warnings: &[LintWarning], file_path: &str) -> String
Format a collection of warnings for output
Provided Methods§
Sourcefn format_summary(
&self,
_files_processed: usize,
_total_warnings: usize,
_duration_ms: u64,
) -> Option<String>
fn format_summary( &self, _files_processed: usize, _total_warnings: usize, _duration_ms: u64, ) -> Option<String>
Format a summary of results across multiple files
Sourcefn use_colors(&self) -> bool
fn use_colors(&self) -> bool
Whether this formatter should use colors