Skip to main content

AnalysisOutput

Struct AnalysisOutput 

Source
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

Source

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.

Source

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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.