crap_core/lib.rs
1//! crap-core — language-agnostic CRAP analyzer foundation.
2//!
3//! Domain types, port traits, and shared invariants used by every
4//! per-language CRAP adapter (`crap4rs`, future `crap4ts`, …). Pure
5//! domain — no `syn`, no LCOV, no I/O. Coverage adapters supply a
6//! concrete `ParseDiagnostic` impl; the analyzer pipeline flows that
7//! type through `ParseOutput<P>` and `AnalysisDiagnostics<P>`.
8//!
9//! Imported in S2 ([crap4rs#134](https://github.com/breezy-bays-labs/crap4rs/issues/134)).
10//! Adapter relocation (reporters + baseline + config + diff + filesystem
11//! walker) landed in S3
12//! ([crap4rs#135](https://github.com/breezy-bays-labs/crap4rs/issues/135)).
13//! Core orchestration + CLI dispatch landed in S4
14//! ([crap4rs#136](https://github.com/breezy-bays-labs/crap4rs/issues/136)) —
15//! `core::analyze<P>` and `cli::run<P>` are language-agnostic; the
16//! per-adapter binaries (`crap4rs`, future `crap4ts`) inject their own
17//! `ComplexityPort` + `CoveragePort<Diagnostic = P>`.
18
19pub mod adapters;
20pub mod cli;
21pub mod core;
22pub mod domain;
23pub mod ports;
24
25/// Shared proptest strategies + a stub `ParseDiagnostic` impl, exposed
26/// for downstream adapter tests via the `test-helpers` feature. Always
27/// available inside crap-core's own tests; gated for external consumers
28/// so production builds don't pull `proptest`.
29#[cfg(any(test, feature = "test-helpers"))]
30pub mod test_strategies;