fallow_types/lib.rs
1//! Shared types for fallow codebase intelligence.
2//!
3//! This crate contains type definitions used across multiple fallow crates
4//! (core, CLI, LSP). It has no analysis logic, only data structures.
5
6#![warn(missing_docs)]
7
8/// File discovery types: discovered files, file IDs, and entry points.
9pub mod discover;
10/// JSON-output envelope and utility types: `SchemaVersion`, `ToolVersion`,
11/// `ElapsedMs`, `AuditIntroduced`, plus the shared `Meta`, `BaselineDeltas`,
12/// `BaselineMatch`, `RegressionResult`, `EntryPoints`, and `CheckSummary`
13/// shapes referenced by every per-command envelope. The structs are always
14/// compiled (the JSON emission layer constructs them at runtime); the
15/// `schemars::JsonSchema` derive is gated per-struct on the `schema` feature.
16pub mod envelope;
17/// Module extraction types: exports, imports, re-exports, and member info.
18pub mod extract;
19/// JSON-output augmentation types: `IssueAction` enum + variants.
20/// Schema-side counterpart of the augmentations the JSON layer adds to each
21/// dead-code finding. The structs are always compiled (typed dead-code
22/// wrappers in [`output_dead_code`] consume them at runtime); the
23/// `schemars::JsonSchema` derive is gated per-struct on the `schema`
24/// feature.
25pub mod output;
26/// Typed envelope wrappers for the simple 1:1 dead-code findings
27/// (`UnusedFile`, `PrivateTypeLeak`, `UnresolvedImport`, `CircularDependency`,
28/// `BoundaryViolation`). Each wrapper flattens the bare finding via
29/// `#[serde(flatten)]` and carries a typed `actions` array populated at
30/// construction time, replacing the per-finding post-pass injection that
31/// previously grafted `actions[]` and `introduced` onto the schema. The
32/// `introduced` field is set by the audit pass via JSON map insertion and
33/// is `None` when serialized directly from Rust. The `schemars::JsonSchema`
34/// derive is gated per-struct on the `schema` feature.
35pub mod output_dead_code;
36/// Per-action types attached to health findings, hotspots, refactoring
37/// targets, and coverage-gap entries. Separated from the generic
38/// `IssueAction` tree in the `output` module so the health-specific
39/// variants live in a dedicated module. The structs are always compiled
40/// (the JSON emission layer constructs them through typed wrappers such as
41/// [`output_health::UntestedFileAction`]); the `schemars::JsonSchema`
42/// derive is gated per-struct on the `schema` feature.
43pub mod output_health;
44/// Analysis result types: unused files, exports, dependencies, and members.
45pub mod results;
46/// Custom serde serializers for cross-platform path output.
47pub mod serde_path;
48/// Inline suppression comment types and issue kind definitions.
49pub mod suppress;