Skip to main content

Crate crap_core

Crate crap_core 

Source
Expand description

crap-core — language-agnostic CRAP analyzer foundation.

Domain types, port traits, and shared invariants used by every per-language CRAP adapter (crap4rs, crap4ts, …). The domain/ and ports/ modules pull no AST-library dependency and no coverage parser; core/ and adapters/ add filesystem walking, git diffs, and reporter rendering, all language-agnostic. Coverage adapters supply a concrete ParseDiagnostic impl; the analyzer pipeline flows that type through ParseOutput<P> and AnalysisDiagnostics<P>.

core::analyze<P> and cli::run<P> are language-agnostic; the per-adapter binaries inject their own ComplexityPort + CoveragePort<Diagnostic = P> and adapter metadata via cli::AdapterMeta.

Modules§

adapters
Language-agnostic adapters — IO and presentation layers that make no assumptions about the source language being analyzed.
cli
CLI entry point — thin shell over the library crate.
core
Wiring layer — composes adapters through ports, exposes analyze() API.
domain
ports