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