pub struct AnalysisOutput {
pub config: Config,
pub result: AnalysisResult,
pub reporter: Box<dyn Reporter>,
}Expand description
Everything one analysis run produces: the configuration it ran under, what it found, and the reporter that can write it out.
Fields§
§config: Config§result: AnalysisResult§reporter: Box<dyn Reporter>Implementations§
Source§impl AnalysisOutput
impl AnalysisOutput
Sourcepub fn produce(
analyzer: &dyn LanguageAnalyzer,
root: &Path,
format: OutputFormat,
overrides: &CliOverrides,
) -> CliResult<Self>
pub fn produce( analyzer: &dyn LanguageAnalyzer, root: &Path, format: OutputFormat, overrides: &CliOverrides, ) -> CliResult<Self>
Scan files, run the analysis pipeline, and return the output.
Warnings are stored in AnalysisOutput::result but not printed;
the caller is responsible for writing them to stderr.
§Errors
Returns CliError::InvalidConfig when the configuration states a
value the tool cannot run under, CliError::NoSourceFiles when the
scan finds nothing to analyse, and CliError::Analysis when the
pipeline itself fails.
Sourcepub fn produce_ignoring_baseline(
analyzer: &dyn LanguageAnalyzer,
root: &Path,
format: OutputFormat,
overrides: &CliOverrides,
) -> CliResult<Self>
pub fn produce_ignoring_baseline( analyzer: &dyn LanguageAnalyzer, root: &Path, format: OutputFormat, overrides: &CliOverrides, ) -> CliResult<Self>
The same run, with the baseline left out of it.
What baseline records with: a recording that judged against the
previous recording would hold only what had been added since, and the
second run would empty the file.
§Errors
The same as AnalysisOutput::produce, less the baseline.