1pub mod betweenness;
2pub mod bridges;
3pub mod change_propagation;
4pub mod connected_components;
5pub mod degree;
6pub mod depth;
7pub mod graph_boundaries;
8pub mod graph_stats;
9pub mod pagerank;
10pub mod scc;
11pub mod transitive_reduction;
12
13use crate::config::Config;
14use crate::graph::Graph;
15use crate::lockfile::Lockfile;
16use std::path::Path;
17
18pub struct AnalysisContext<'a> {
21 pub graph: &'a Graph,
22 pub root: &'a Path,
23 pub config: &'a Config,
24 pub lockfile: Option<&'a Lockfile>,
25}
26
27pub trait Analysis {
32 type Output: serde::Serialize;
33
34 fn name(&self) -> &str;
35
36 fn run(&self, ctx: &AnalysisContext) -> Self::Output;
37}