Skip to main content

analyze

Function analyze 

Source
pub fn analyze<P: ParseDiagnostic>(
    options: &AnalyzeOptions,
    complexity: &dyn ComplexityPort,
    coverage: &dyn CoveragePort<Diagnostic = P>,
) -> Result<AnalysisOutput<P>>
Expand description

Run CRAP analysis: discover files, extract complexity, parse coverage, match, score, and produce results with diagnostics.

Thin facade over a private AnalysisContext. Phase methods on the context compose the pipeline; diff-mode short-circuits are surfaced via Option<AnalysisOutput<P>> so the top-level orchestration stays flat.

Mixed dispatch (ADR D9): port adapters arrive as trait objects so the monomorphization tax stays bounded; <P> is the single generic parameter that flows from CoveragePort::Diagnostic through to AnalysisDiagnostics<P> in the result.