Skip to main content

crap_core/adapters/
mod.rs

1//! Language-agnostic adapters — IO and presentation layers that make
2//! no assumptions about the source language being analyzed.
3//!
4//! Three families live here:
5//! - **`baseline`**: loads a previously-emitted JSON envelope from disk
6//!   so delta reporting can compare the current run against a prior one.
7//! - **`config`**: parses `crap4rs.toml` configuration (threshold
8//!   overrides, view presets, exclude patterns).
9//! - **`diff`**: shells out to git to compute changed line ranges per
10//!   file for `--diff <ref>` filtering.
11//! - **`reporters`**: render the analyzer output as JSON, Markdown,
12//!   SARIF, HTML, CSV, terminal table, scorecard rows, or advice
13//!   summary.
14//!
15//! Per-language adapters (e.g. `crap4rs::adapters::complexity`,
16//! `crap4rs::adapters::coverage`) live in their parent crate and pull
17//! `crap-core`'s ports / domain types as dependencies.
18//!
19//! Relocated from `crap4rs::adapters::*` in S3 (crap4rs#135). The v0.4
20//! public surface stays buildable through the shim `pub use` re-exports
21//! in `crap4rs::adapters` (see crap4rs/src/lib.rs).
22
23pub mod baseline;
24pub mod config;
25pub mod diff;
26pub mod reporters;