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