Expand description
Per-group attribution for fallow dupes --group-by.
For each CloneGroup, every instance is attributed to a group key (owner,
directory, package, or section) via the same OwnershipResolver used by
check and health. The group itself is then attributed to its
largest owner: the key with the most instances in that clone group.
Ties are broken alphabetically (lexicographic ascending).
This mirrors jscpd’s majority-owner attribution and avoids the
positional non-determinism that a “first-instance-wins” rule would
introduce, since DuplicationReport::sort() already orders instances
deterministically by file path then line.
Structs§
- Attributed
Clone Group - A clone group annotated with its largest owner and per-instance owners.
- Attributed
Instance - A clone instance plus its per-instance owner key (for inline JSON / SARIF rendering).
- Duplication
Group - A single grouped duplication bucket.
- Duplication
Grouping - Wrapper carrying the resolver mode label and grouped buckets.
Functions§
- build_
duplication_ grouping - Build the grouped duplication payload from a project-level report.
- largest_
owner - Pick the largest owner for a clone group: most instances wins, ties broken alphabetically (smallest key wins).