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
92/// Typed envelope structs for the JSON output contract. Live here rather
93/// than in `fallow-types` because the body fields reach into `fallow-core`
94/// and into this crate's own `health_types`.
95pub mod output_envelope;
96
97/// Programmatic Rust API reused by the NAPI bindings.
98pub mod programmatic;
99
100/// Cross-platform path classification helpers (POSIX-style root + Windows
101/// drive prefix detection that `Path::is_absolute()` misclassifies).
102#[allow(
103    dead_code,
104    unused_imports,
105    reason = "shared CLI library compiles bin-oriented support modules for reuse; `#[expect]` would be unfulfilled because the bin (not the lib) consumes these symbols"
106)]
107mod path_util;
108
109/// Shared Rayon pool configuration for all embedded analysis entry points.
110pub(crate) mod rayon_pool;
111
112/// Regression detection: baseline comparison and tolerance checking.
113pub mod regression;
114
115/// Process-wide signal handling and scoped child-process registry.
116/// See `signal/mod.rs` for the design rationale.
117pub mod signal;
118
119/// Report formatting utilities for analysis results.
120///
121/// Exposed for snapshot testing of output formats.
122pub mod report;
123
124#[allow(
125    dead_code,
126    unused_imports,
127    reason = "shared CLI library compiles bin-oriented support modules for reuse"
128)]
129pub mod impact;
130#[allow(
131    dead_code,
132    unused_imports,
133    reason = "shared CLI library compiles bin-oriented support modules for reuse"
134)]
135mod runtime_support;
136#[allow(
137    dead_code,
138    unused_imports,
139    reason = "shared CLI library compiles bin-oriented support modules for reuse"
140)]
141pub mod security;
142#[allow(
143    dead_code,
144    unused_imports,
145    reason = "shared CLI library compiles bin-oriented support modules for reuse"
146)]
147mod validate;
148mod vital_signs;
149
150pub use runtime_support::{AnalysisKind, GroupBy};
151pub(crate) use runtime_support::{build_ownership_resolver, load_config_for_analysis};