Skip to main content

Module output_dupes

Module output_dupes 

Source
Expand description

Typed wrapper envelopes for duplication findings emitted by fallow dupes --format json. Lives here (rather than in fallow-types) because the bare findings live in fallow-core and crates/cli/src/report/dupes_grouping.rs. Typed envelope wrappers for the duplication findings emitted by fallow dupes --format json (and the dupes block inside fallow and fallow audit).

Each wrapper flattens the bare finding via #[serde(flatten)] so the wire shape matches the previous actions-grafted output byte-for-byte. actions is populated at construction time via each wrapper’s with_actions constructor and replaces the legacy inject_dupes_actions post-pass in crates/cli/src/report/json.rs. introduced on CloneGroupFinding carries the optional audit breadcrumb that crates/cli/src/audit.rs::annotate_dupes_json inserts into the JSON object via map.insert; the wrapper-level field stays None when serialized directly from Rust and is set by the audit pass only when the clone group was introduced relative to the merge-base.

Lives in fallow-cli rather than fallow-types because CloneFamily, CloneGroup, and MirroredDirectory are defined in fallow-core (crates/core/src/duplicates/types.rs) and AttributedCloneGroup is defined in the CLI itself (crates/cli/src/report/dupes_grouping.rs); fallow-types is the lower-level crate that neither of those reach.

Structs§

AttributedCloneGroupFinding
Wire-shape envelope for an AttributedCloneGroup finding (per-bucket duplication attribution emitted under fallow dupes --group-by). Flattens the attributed group and carries the same typed CloneGroupAction array as CloneGroupFinding; no introduced field because fallow audit does not run on grouped output.
CloneFamilyAction
Per-action wire shape attached to each CloneFamilyFinding. Mirrors the action types previously emitted by build_clone_family_actions: extract-shared, one apply-suggestion per RefactoringSuggestion on the family, and a trailing suppress-line.
CloneFamilyFinding
Wire-shape envelope for a CloneFamily finding.
CloneGroupAction
Per-action wire shape attached to each CloneGroupFinding and AttributedCloneGroupFinding. Mirrors the action types previously emitted by inject_dupes_actions::build_clone_group_actions in crates/cli/src/report/json.rs: extract-shared plus suppress-line.
CloneGroupFinding
Wire-shape envelope for a CloneGroup finding. Flattens the bare group via #[serde(flatten)] and carries a typed actions array plus the optional audit-mode introduced flag. Replaces the legacy post-pass injection in crates/cli/src/report/json.rs::inject_dupes_actions.
DupesReportPayload
Wire-shape payload for fallow dupes --format json (the body that flattens into crate::output_envelope::DupesOutput and is also emitted under the dupes / duplication key inside the combined and audit envelopes).

Enums§

CloneFamilyActionType
Discriminant for CloneFamilyAction::kind.
CloneGroupActionType
Discriminant for CloneGroupAction::kind. Mirrors the action types emitted by the legacy build_clone_group_actions walker.