Skip to main content

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`, `crap4ts`, …). The `domain/`
5//! and `ports/` modules pull no AST-library dependency and no coverage
6//! parser; `core/` and `adapters/` add filesystem walking, git diffs,
7//! and reporter rendering, all language-agnostic. Coverage adapters
8//! supply a concrete `ParseDiagnostic` impl; the analyzer pipeline
9//! flows that type through `ParseOutput<P>` and
10//! `AnalysisDiagnostics<P>`.
11//!
12//! `core::analyze<P>` and `cli::run<P>` are language-agnostic; the
13//! per-adapter binaries inject their own `ComplexityPort` +
14//! `CoveragePort<Diagnostic = P>` and adapter metadata via
15//! `cli::AdapterMeta`.
16
17pub mod adapters;
18pub mod cli;
19pub mod core;
20pub mod domain;
21pub mod ports;
22
23/// Shared proptest strategies + a stub `ParseDiagnostic` impl, exposed
24/// for downstream adapter tests via the `test-helpers` feature. Always
25/// available inside crap-core's own tests; gated for external consumers
26/// so production builds don't pull `proptest`.
27#[cfg(any(test, feature = "test-helpers"))]
28pub mod test_strategies;