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#[allow(
28    dead_code,
29    unused_imports,
30    reason = "shared CLI library compiles bin-oriented support modules for reuse"
31)]
32mod base_worktree;
33#[allow(
34    dead_code,
35    unused_imports,
36    reason = "shared CLI library compiles bin-oriented support modules for reuse"
37)]
38mod baseline;
39#[allow(
40    dead_code,
41    unused_imports,
42    reason = "shared CLI library compiles bin-oriented support modules for reuse"
43)]
44mod cache_notice;
45#[allow(
46    dead_code,
47    unused_imports,
48    reason = "shared CLI library compiles bin-oriented support modules for reuse"
49)]
50mod check;
51/// CODEOWNERS file parser and ownership lookup.
52pub mod codeowners;
53#[allow(
54    dead_code,
55    unused_imports,
56    reason = "shared CLI library compiles bin-oriented support modules for reuse"
57)]
58mod combined;
59#[allow(
60    dead_code,
61    unused_imports,
62    reason = "shared CLI library compiles bin-oriented support modules for reuse"
63)]
64mod dupes;
65
66/// Structured error output for CLI and JSON formats.
67pub mod error;
68
69#[allow(
70    dead_code,
71    unused_imports,
72    reason = "shared CLI library compiles bin-oriented support modules for reuse"
73)]
74mod fix;
75#[allow(
76    dead_code,
77    unused_imports,
78    reason = "shared CLI library compiles bin-oriented support modules for reuse"
79)]
80mod init;
81
82/// Metric and rule definitions for explainable CLI output.
83pub mod explain;
84
85#[allow(
86    dead_code,
87    unused_imports,
88    reason = "shared CLI library compiles bin-oriented support modules for reuse"
89)]
90mod health;
91/// Health / complexity analysis report types.
92pub mod health_types;
93#[allow(
94    dead_code,
95    unused_imports,
96    reason = "shared CLI library compiles bin-oriented support modules for reuse"
97)]
98mod license;
99/// Typed wrapper envelopes for duplication findings emitted by
100/// `fallow dupes --format json`. Lives here (rather than in `fallow-types`)
101/// because the bare findings live in `fallow-core` and `crates/cli/src/report/dupes_grouping.rs`.
102pub mod output_dupes;
103#[allow(
104    dead_code,
105    unused_imports,
106    reason = "shared CLI library compiles bin-oriented support modules for reuse; the findings-present accumulator must be reachable from the lib-compiled analysis modules"
107)]
108mod telemetry;
109
110/// Typed envelope structs for the JSON output contract. Live here rather
111/// than in `fallow-types` because the body fields reach into `fallow-core`
112/// and into this crate's own `health_types`.
113pub mod output_envelope;
114
115/// Programmatic Rust API reused by the NAPI bindings.
116pub mod programmatic;
117
118/// Cross-platform path classification helpers (POSIX-style root + Windows
119/// drive prefix detection that `Path::is_absolute()` misclassifies).
120#[allow(
121    dead_code,
122    unused_imports,
123    reason = "shared CLI library compiles bin-oriented support modules for reuse; `#[expect]` would be unfulfilled because the bin (not the lib) consumes these symbols"
124)]
125mod path_util;
126
127/// Shared Rayon pool configuration for all embedded analysis entry points.
128pub(crate) mod rayon_pool;
129
130/// Regression detection: baseline comparison and tolerance checking.
131pub mod regression;
132
133/// Process-wide signal handling and scoped child-process registry.
134/// See `signal/mod.rs` for the design rationale.
135pub mod signal;
136
137/// Report formatting utilities for analysis results.
138///
139/// Exposed for snapshot testing of output formats.
140pub mod report;
141
142#[allow(
143    dead_code,
144    unused_imports,
145    reason = "shared CLI library compiles bin-oriented support modules for reuse"
146)]
147pub mod impact;
148#[allow(
149    dead_code,
150    unused_imports,
151    reason = "shared CLI library compiles bin-oriented support modules for reuse"
152)]
153mod runtime_support;
154#[allow(
155    dead_code,
156    unused_imports,
157    reason = "shared CLI library compiles bin-oriented support modules for reuse"
158)]
159pub mod security;
160#[allow(
161    dead_code,
162    unused_imports,
163    reason = "shared CLI library compiles bin-oriented support modules for reuse"
164)]
165mod validate;
166mod vital_signs;
167
168pub use runtime_support::{AnalysisKind, GroupBy};
169pub(crate) use runtime_support::{build_ownership_resolver, load_config_for_analysis};