Skip to main content

run_dead_code_with_baseline

Function run_dead_code_with_baseline 

Source
pub fn run_dead_code_with_baseline(
    options: &DeadCodeOptions,
    baseline: Option<&Path>,
) -> Result<DeadCodeProgrammaticOutput, ProgrammaticError>
Expand description

Run dead-code analysis and hide the findings of a saved dead-code baseline.

The baseline is the file that fallow dead-code --save-baseline writes. It is applied by the same engine function as fallow dead-code --baseline, so both hide the same findings. A file that another command saved suppresses nothing, as on the CLI.

ยงErrors

Returns the errors of run_dead_code, and a structured error when the baseline cannot be read, is not valid, or was saved with an incompatible analysis identity.