ovecc dupes
Detects duplicated code — clone families over a normalized token stream — with
exact path:start-end ranges, so you catch duplicated logic before it propagates.
Usage: ovecc dupes [OPTIONS]
Example
$ ovecc dupes
Duplication: 1 clone family (scanned 11 files, >= 50 tokens / 5 lines)
1. 89 tokens / 12 lines, 2 copies:
src/services/reports.ts:3-14
src/services/reports.ts:16-27
The scan line always states coverage and thresholds, so "no duplication" is a verified claim, not a silent skip:
Duplication: 0 clone families (scanned 9 files, >= 50 tokens / 5 lines)
(no duplication above the threshold)
Options
| Option | Default | Effect |
|---|---|---|
--min-tokens <N> | 50 | Minimum shared run, in tokens, to report as a clone |
--min-lines <N> | 5 | Minimum line span for a clone region |
--cross-file-only | off | Only report clones spanning at least two files |
Plus the global options.
Notes
- Same-file duplication is reported by default — copy-paste within one file is
still duplication (the example above is exactly that). Pass
--cross-file-onlywhen you only care about cross-file families. - Matching runs over a normalized token stream, so trivially-renamed copies still cluster into one family.
reviewincludes a change-scoped duplication section: the clone families your change added, including clones against pre-existing code.
Related
review— new duplication per change- Audit a codebase