pub type DuplicationOutput = DupesOutput<DupesReportPayload, DuplicationGroup>;Expand description
Concrete duplication output contract returned by typed programmatic runs.
Aliased Type§
pub struct DuplicationOutput {Show 17 fields
pub schema_version: SchemaVersion,
pub version: ToolVersion,
pub elapsed_ms: ElapsedMs,
pub report: DupesReportPayload,
pub clone_groups_shown: usize,
pub clone_groups_omitted: usize,
pub clone_families_shown: usize,
pub clone_families_omitted: usize,
pub grouped_by: Option<GroupByMode>,
pub total_issues: Option<usize>,
pub groups: Option<Vec<DuplicationGroup>>,
pub baseline_staleness: Option<BaselineStaleness>,
pub gate_outcomes: Option<GateOutcomes>,
pub request_outcomes: Option<RequestOutcomes>,
pub meta: Option<Meta>,
pub workspace_diagnostics: Vec<WorkspaceDiagnostic>,
pub next_steps: Vec<NextStep>,
}Fields§
§schema_version: SchemaVersionDuplication output schema version.
version: ToolVersionFallow CLI version that produced this output.
elapsed_ms: ElapsedMsWall-clock analysis duration in milliseconds.
report: DupesReportPayloadDuplication report body, flattened into the envelope root.
clone_groups_shown: usizeNumber of clone groups carried in clone_groups[].
clone_groups_omitted: usizeNumber of scoped-corpus clone groups withheld from clone_groups[] by
a presentation cap such as --top. 0 on an untruncated run, so
clone_groups_shown + clone_groups_omitted == stats.clone_groups
always holds and stats keeps describing the whole measured corpus.
clone_families_shown: usizeNumber of clone families carried in clone_families[].
clone_families_omitted: usizeNumber of scoped-corpus clone families withheld from clone_families[]
by a presentation cap such as --top, which rebuilds the families from
the groups that survived the cap. 0 on an untruncated run, so
clone_families_shown + clone_families_omitted == stats.clone_families
always holds and stats keeps describing the whole measured corpus.
grouped_by: Option<GroupByMode>Grouping mode when --group-by was passed.
total_issues: Option<usize>Total finding count across all groups; present only in grouped output.
groups: Option<Vec<DuplicationGroup>>Grouped findings; present only in grouped output.
baseline_staleness: Option<BaselineStaleness>This run’s view of the loaded baseline, present only in baseline runs.
Carries the staleness counts, the advisory verdict and gate_trips, the
same boolean --fail-on-stale-baseline exits on, so a CI integration
reads one field instead of restating the rule. Read change_scoped
before dividing matched_entries by baseline_entries: a narrowed run
can report matched_entries: 0 on a healthy baseline.
gate_outcomes: Option<GateOutcomes>The verdict of every gate this run armed, keyed by name, absent when
it armed none. dupes has no default exit rule: a run with no armed
gate always exits 0, so an absent object means that the run passed. A
gate fails the build when status is fail AND enforced is true.
See [crate::GateOutcomes].
request_outcomes: Option<RequestOutcomes>Every narrowing or shaping request this run RECEIVED, keyed by name,
absent when it was asked for nothing. An entry whose status is not
applied means the run could not do what it was asked and reported
something WIDER instead, so what follows is a valid report of a scope
nobody requested. Honoured requests are published too, with
status: "applied", so an absent object means “nothing was asked for”,
never “nothing failed”. See [crate::RequestOutcomes].
meta: Option<Meta>_meta block with metric / rule definitions, emitted when --explain
is passed (always present in MCP responses).
workspace_diagnostics: Vec<WorkspaceDiagnostic>Workspace-discovery and source-discovery diagnostics for the run
(issue #473). See CheckOutput::workspace_diagnostics for the full
contract; the same list is repeated on each top-level command’s
envelope so single-command consumers see it without having to look at
a separate top-level field. A standalone fallow dupes run has no
dead-code analyze pass, so the two analysis-stage kinds never appear
here.
next_steps: Vec<NextStep>Read-only follow-up commands computed from this run’s findings. See
CheckOutput::next_steps for the contract.