srcgraph_metrics/lib.rs
1//! Graph-theoretic code-analysis metrics over a `petgraph::Graph<N, E>` where
2//! `N: srcgraph_core::ClassNode` and `E: srcgraph_core::EdgeKind`.
3//!
4//! Each metric is behind its own cargo feature, so a consumer compiles only
5//! what it uses (`default = ["all"]`):
6//!
7//! - `scc` — strongly-connected components (circular dependencies)
8//! - `lcom4` — LCOM4 cohesion (low-cohesion types are split candidates)
9//! - `betweenness` — betweenness centrality (architectural chokepoints / god nodes)
10//! - `instability` — Martin's instability I = Ce/(Ca+Ce) + Stable-Dependencies-Principle violations
11//! - `clone_detection` — n-gram fingerprint clone / near-duplicate detection
12
13#[cfg(feature = "scc")]
14pub mod scc;
15#[cfg(feature = "lcom4")]
16pub mod lcom4;
17#[cfg(feature = "betweenness")]
18pub mod betweenness;
19#[cfg(feature = "instability")]
20pub mod instability;
21#[cfg(feature = "clone_detection")]
22pub mod clone_detection;