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