Skip to main content

Module output

Module output 

Source
Expand description

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.

Today the JSON serialization layer (crates/cli/src/report/json.rs) builds its output via serde_json::json! macros. The types defined here are the schema-side counterpart of that output: they document, with Rust’s type system, the augmentations the JSON layer adds to each per-finding struct (the actions array on every finding, the optional introduced flag in audit-mode sub-results).

The schema-emit binary derives JsonSchema for these types (gated by the schema cargo feature) so the public docs/output-schema.json stays in sync with the Rust source of truth. A future refactor will route the JSON emission path through these types directly, eliminating the drift class between the augmentation list here and the serde_json::json! builders.

Structs§

AddToConfigAction
Edit a fallow config file (.fallowrc.json, fallow.toml, etc.) to add the offending value to an ignore* rule.
FixAction
A code-change fix. type is one of the kebab-case identifiers in FixActionType.
IgnoreExportsRule
Single ignoreExports rule entry. The fallow config accepts an array of these under the ignoreExports key.
SuppressFileAction
File-wide suppression placed at the top of the source file.
SuppressLineAction
Inline-comment suppression for a single finding line.

Enums§

AddToConfigKind
Singleton discriminant for AddToConfigAction.
AddToConfigValue
Value payload for AddToConfigAction::value. The variants line up with the documented per-config_key shapes; deserialization is untagged so downstream consumers can switch on the JSON value’s type.
FixActionType
Discriminant string for FixAction. Kebab-case per the JSON output contract.
IssueAction
A suggested action attached to a finding in the JSON output. Each finding carries an actions array; consumers (agents, IDE clients, CI bots) can dispatch on the type discriminant to choose the right remediation.
SuppressFileKind
Singleton discriminant for SuppressFileAction.
SuppressLineKind
Singleton discriminant for SuppressLineAction.
SuppressLineScope
Scope marker for line suppressions that span multiple locations.