Skip to main content

Crate fallow_types

Crate fallow_types 

Source
Expand description

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.

Modules§

discover
File discovery types: discovered files, file IDs, and entry points. File discovery types: discovered files, file IDs, and entry points.
envelope
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. Typed envelope and utility-shape structs for the JSON output contract.
extract
Module extraction types: exports, imports, re-exports, and member info. Module extraction types: exports, imports, re-exports, members, and parse results.
output
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. Types that describe fallow’s JSON output contract.
output_dead_code
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. Typed envelope wrappers for the simple 1:1 dead-code findings whose actions are entirely determined by the wrapper type (no per-instance discriminants beyond what the bare finding already exposes).
output_health
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. Per-action types attached to each health finding by the JSON output layer.
results
Analysis result types: unused files, exports, dependencies, and members. Analysis result types for all issue categories.
serde_path
Custom serde serializers for cross-platform path output. Custom serde serializers for PathBuf and Vec<PathBuf> that always output forward slashes, regardless of platform. This ensures consistent JSON/SARIF output on Windows.
suppress
Inline suppression comment types and issue kind definitions. Inline suppression comment types and issue kind definitions.