Skip to main content

Module core

Module core 

Source
Expand description

Wiring layer — composes adapters through ports, exposes analyze() API.

Language-agnostic orchestrator: discovers source files, dispatches per- function complexity extraction through ComplexityPort, parses coverage through CoveragePort<Diagnostic = P>, matches functions, scores, and produces results. Per-adapter language coupling stays in the caller’s crate (crap4rs::adapters::complexity, crap4rs::adapters::coverage).

Relocated from crap4rs::core in S4 (#136). analyze is generic over <P: ParseDiagnostic> so the same orchestrator powers both the LCOV adapter (crap4rs) and future siblings (crap4ts’s Istanbul adapter), per ADR D9 (mixed-dispatch-strategy).

Modules§

walker
Filesystem walker — discovers Rust source files for analysis, respecting .gitignore and user-provided exclude patterns.

Structs§

AnalysisOutput
Full output from an analysis run, including both the scored results and process diagnostics (surfaced by --verbose).
AnalyzeOptions
Options for running a CRAP analysis.

Functions§

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