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§

audit_cache
Typed audit cache-key inputs. Typed audit cache-key inputs.
churn
Shared churn output contracts. Shared churn output contracts.
discover
File discovery types: discovered files, file IDs, and entry points. File discovery types: discovered files, file IDs, and entry points.
duplicates
Shared duplicate-code output contracts. Shared duplicate-code output contracts.
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.
guard
Guard output contracts for pre-edit architecture-rule lookup. Guard report contracts for pre-edit architecture guidance.
issue_meta
Shared issue-type contract metadata used by CLI, LSP, MCP, and suppression helpers. Shared issue-type contract metadata.
mcp_manifest
Machine-readable manifest of the fallow MCP server’s tools, shared by fallow schema and the telemetry tool-name allowlist; kept in sync with the live tool router by a drift test in crates/mcp. Machine-readable manifest of the tools exposed by the fallow MCP server.
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_format
Shared output-format selector used by CLI, config, output, and API layers.
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.
path_util
Cross-platform path classification helpers. Cross-platform path classification helpers.
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, Option<PathBuf>, and Vec<PathBuf> that always output forward slashes, regardless of platform. This ensures consistent JSON/SARIF output on Windows.
source_fingerprint
Shared source-file freshness metadata used by cache invalidation. Shared source-file fingerprint inputs for cache invalidation.
suppress
Inline suppression comment types and issue kind definitions. Inline suppression comment types and issue kind definitions.
trace
Trace output contracts shared by core, engine, CLI, API, and MCP. Shared trace output contracts for analysis and integration surfaces.
trace_chain
Symbol-level trace-chain output contracts. Symbol-level call-chain output contracts.
workspace
Workspace and source-discovery diagnostic data types (WorkspaceDiagnostic, WorkspaceDiagnosticKind). Re-exported by fallow-config for back-compat; embedded directly by fallow-output so workspace_diagnostics[] keeps its typed JSON schema. The schemars::JsonSchema derive is gated on the schema feature. Workspace and source-discovery diagnostic data types.