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§
- AddTo
Config Action - Edit a fallow config file (
.fallowrc.json,fallow.toml, etc.) to add the offending value to anignore*rule. - FixAction
- A code-change fix.
typeis one of the kebab-case identifiers inFixActionType. - Ignore
Exports Rule - Single
ignoreExportsrule entry. The fallow config accepts an array of these under theignoreExportskey. - Suppress
File Action - File-wide suppression placed at the top of the source file.
- Suppress
Line Action - Inline-comment suppression for a single finding line.
Enums§
- AddTo
Config Kind - Singleton discriminant for
AddToConfigAction. - AddTo
Config Value - Value payload for
AddToConfigAction::value. The variants line up with the documented per-config_keyshapes; deserialization is untagged so downstream consumers can switch on the JSON value’s type. - FixAction
Type - Discriminant string for
FixAction. Kebab-case per the JSON output contract. - Issue
Action - A suggested action attached to a finding in the JSON output. Each finding
carries an
actionsarray; consumers (agents, IDE clients, CI bots) can dispatch on thetypediscriminant to choose the right remediation. - Suppress
File Kind - Singleton discriminant for
SuppressFileAction. - Suppress
Line Kind - Singleton discriminant for
SuppressLineAction. - Suppress
Line Scope - Scope marker for line suppressions that span multiple locations.