Skip to main content

fallow_cli/
lib.rs

1#![expect(
2    clippy::print_stdout,
3    clippy::print_stderr,
4    reason = "CLI binary produces intentional terminal output"
5)]
6#![cfg_attr(
7    test,
8    allow(
9        clippy::unwrap_used,
10        clippy::expect_used,
11        reason = "tests use unwrap and expect to keep fixture setup concise"
12    )
13)]
14
15#[allow(
16    dead_code,
17    unused_imports,
18    reason = "shared CLI library compiles bin-oriented support modules for reuse"
19)]
20mod api;
21#[allow(
22    dead_code,
23    unused_imports,
24    reason = "shared CLI library compiles bin-oriented support modules for reuse"
25)]
26pub mod audit;
27/// `fallow audit --brief` (alias `fallow review`): deterministic, always-exit-0
28/// rendering mode layered over the audit analysis. Public so the schema-emit
29/// binary can derive the `ReviewBriefOutput` envelope.
30#[allow(
31    dead_code,
32    unused_imports,
33    reason = "shared CLI library compiles bin-oriented support modules for reuse"
34)]
35pub mod audit_brief;
36/// Decision-surface extractor (stage 6 / 6.G): the apex of the review brief.
37/// Public so the schema-emit binary can derive the `DecisionSurface` types.
38#[allow(
39    dead_code,
40    unused_imports,
41    reason = "shared CLI library compiles bin-oriented support modules for reuse"
42)]
43pub mod audit_decision_surface;
44/// Weighted focus map (stage 4): the composite attention score per review unit
45/// plus the no-skip labels, confidence flags, and escape hatch. Public so the
46/// schema-emit binary can derive the `FocusMap` types.
47#[allow(
48    dead_code,
49    unused_imports,
50    reason = "shared CLI library compiles bin-oriented support modules for reuse"
51)]
52pub mod audit_focus;
53/// Agent-contract loop (the codiff pattern, graph-extended): the walkthrough
54/// guide (digest + schema + graph-snapshot pin) and the `--walkthrough-file`
55/// post-validation against the live graph. Public so the schema-emit binary can
56/// derive the guide + validation envelopes.
57#[allow(
58    dead_code,
59    unused_imports,
60    reason = "shared CLI library compiles bin-oriented support modules for reuse"
61)]
62pub mod audit_walkthrough;
63#[allow(
64    dead_code,
65    unused_imports,
66    reason = "shared CLI library compiles bin-oriented support modules for reuse"
67)]
68mod base_worktree;
69#[allow(
70    dead_code,
71    unused_imports,
72    reason = "shared CLI library compiles bin-oriented support modules for reuse"
73)]
74mod baseline;
75#[allow(
76    dead_code,
77    unused_imports,
78    reason = "shared CLI library compiles bin-oriented support modules for reuse"
79)]
80mod cache_notice;
81#[allow(
82    dead_code,
83    unused_imports,
84    reason = "shared CLI library compiles bin-oriented support modules for reuse"
85)]
86mod check;
87/// CODEOWNERS file parser and ownership lookup.
88pub mod codeowners;
89#[allow(
90    dead_code,
91    unused_imports,
92    reason = "shared CLI library compiles bin-oriented support modules for reuse"
93)]
94mod combined;
95#[allow(
96    dead_code,
97    unused_imports,
98    reason = "shared CLI library compiles bin-oriented support modules for reuse"
99)]
100mod dupes;
101
102/// Structured error output for CLI and JSON formats.
103pub mod error;
104
105#[allow(
106    dead_code,
107    unused_imports,
108    reason = "shared CLI library compiles bin-oriented support modules for reuse"
109)]
110mod fix;
111#[allow(
112    dead_code,
113    unused_imports,
114    reason = "shared CLI library compiles bin-oriented support modules for reuse"
115)]
116mod init;
117
118/// Metric and rule definitions for explainable CLI output.
119pub mod explain;
120
121#[allow(
122    dead_code,
123    unused_imports,
124    reason = "shared CLI library compiles bin-oriented support modules for reuse"
125)]
126mod health;
127/// Health / complexity analysis report types.
128pub mod health_types;
129#[allow(
130    dead_code,
131    unused_imports,
132    reason = "shared CLI library compiles bin-oriented support modules for reuse"
133)]
134mod license;
135/// Typed wrapper envelopes for duplication findings emitted by
136/// `fallow dupes --format json`. Lives here (rather than in `fallow-types`)
137/// because the bare findings live in `fallow-core` and `crates/cli/src/report/dupes_grouping.rs`.
138pub mod output_dupes;
139#[allow(
140    dead_code,
141    unused_imports,
142    reason = "shared CLI library compiles bin-oriented support modules for reuse; the findings-present accumulator must be reachable from the lib-compiled analysis modules"
143)]
144mod telemetry;
145
146/// Typed envelope structs for the JSON output contract. Live here rather
147/// than in `fallow-types` because the body fields reach into `fallow-core`
148/// and into this crate's own `health_types`.
149pub mod output_envelope;
150
151/// Programmatic Rust API reused by the NAPI bindings.
152pub mod programmatic;
153
154/// Cross-platform path classification helpers (POSIX-style root + Windows
155/// drive prefix detection that `Path::is_absolute()` misclassifies).
156#[allow(
157    dead_code,
158    unused_imports,
159    reason = "shared CLI library compiles bin-oriented support modules for reuse; `#[expect]` would be unfulfilled because the bin (not the lib) consumes these symbols"
160)]
161mod path_util;
162
163/// Shared Rayon pool configuration for all embedded analysis entry points.
164pub(crate) mod rayon_pool;
165
166/// Regression detection: baseline comparison and tolerance checking.
167pub mod regression;
168
169/// Process-wide signal handling and scoped child-process registry.
170/// See `signal/mod.rs` for the design rationale.
171pub mod signal;
172
173/// Report formatting utilities for analysis results.
174///
175/// Exposed for snapshot testing of output formats.
176pub mod report;
177
178#[allow(
179    dead_code,
180    unused_imports,
181    reason = "shared CLI library compiles bin-oriented support modules for reuse"
182)]
183pub mod impact;
184#[allow(
185    dead_code,
186    unused_imports,
187    reason = "shared CLI library compiles bin-oriented support modules for reuse"
188)]
189mod runtime_support;
190#[allow(
191    dead_code,
192    unused_imports,
193    reason = "shared CLI library compiles bin-oriented support modules for reuse"
194)]
195pub mod security;
196/// Agent-discoverability task-to-command matrix shared by `init --agents`,
197/// `hooks install --target agent`, the schema manifest, and root `--help`.
198#[allow(
199    dead_code,
200    unused_imports,
201    reason = "shared CLI library compiles bin-oriented support modules for reuse"
202)]
203mod task_matrix;
204#[allow(
205    dead_code,
206    unused_imports,
207    reason = "shared CLI library compiles bin-oriented support modules for reuse"
208)]
209mod validate;
210mod vital_signs;
211
212pub use runtime_support::{AnalysisKind, GroupBy};
213pub(crate) use runtime_support::{
214    ConfigLoadOptions, build_ownership_resolver, load_config_for_analysis,
215};