pub struct AnalyzeOptions {
pub src: PathBuf,
pub coverage: PathBuf,
pub threshold_config: ThresholdConfig,
pub metric: ComplexityMetric,
pub coverage_metric: CoverageMetric,
pub exclude: Vec<String>,
pub respect_gitignore: bool,
pub diff_ref: Option<String>,
pub compute_diagnostics: bool,
}Expand description
Options for running a CRAP analysis.
Fields§
§src: PathBufRoot directory of Rust source files to analyze.
coverage: PathBufPath to the LCOV coverage file.
threshold_config: ThresholdConfigThreshold configuration with optional per-path overrides.
metric: ComplexityMetricWhich complexity metric to use.
coverage_metric: CoverageMetricWhich coverage metric to use for analysis.
exclude: Vec<String>Glob patterns to exclude from file discovery.
respect_gitignore: boolWhether to respect .gitignore files during file discovery.
diff_ref: Option<String>Git ref to diff against. When set, only changed functions are analyzed.
compute_diagnostics: boolWhen true, populate FunctionVerdict.diagnostic for every
over-threshold verdict via domain::diagnostic::compute_diagnostic.
CLI sets this for --format advice and --format sarif. The
computation is pure-domain and bounded — runs only on exceeding
verdicts, so the cost scales with violations, not total functions.
Trait Implementations§
Source§impl Debug for AnalyzeOptions
impl Debug for AnalyzeOptions
Auto Trait Implementations§
impl Freeze for AnalyzeOptions
impl RefUnwindSafe for AnalyzeOptions
impl Send for AnalyzeOptions
impl Sync for AnalyzeOptions
impl Unpin for AnalyzeOptions
impl UnsafeUnpin for AnalyzeOptions
impl UnwindSafe for AnalyzeOptions
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