anthropics / anthropic-cli
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 3% duplication:
    • 4,330 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 170 duplicated lines
  • 9 duplicates
system3% (170 lines)
dependency graphs: 2D graph | 2D graph (with duplicates)... | 3D graph | 3D graph (with duplicates)...
Duplication per Extension
go4% (170 lines)
Duplication per Component (primary)
internal6% (138 lines)
pkg1% (32 lines)
Longest Duplicates
The list of 9 longest duplicates.
See data for all 9 duplicates...
Size#FoldersFilesLinesCode
37 x 2 internal/requestflag
internal/requestflag
147:192 (22%)
457:504 (6%)
view
9 x 2 pkg/cmd
pkg/cmd
655:664 (2%)
704:713 (2%)
view
9 x 2 internal/requestflag
internal/requestflag
169:183 (1%)
203:215 (1%)
view
8 x 2 internal/jsonview
internal/jsonview
586:595 (1%)
623:632 (1%)
view
7 x 2 pkg/cmd
pkg/cmd
1097:1104 (<1%)
1213:1220 (<1%)
view
6 x 2 internal/requestflag
internal/requestflag
15:20 (3%)
44:49 (1%)
view
6 x 2 internal/jsonview
internal/jsonview
590:595 (1%)
660:665 (1%)
view
6 x 2 internal/jsonview
internal/jsonview
303:310 (1%)
351:357 (1%)
view
6 x 2 internal/jsonview
internal/jsonview
627:632 (1%)
660:665 (1%)
view
Most Frequent Duplicates
The list of 1 most frequently found duplicates.
Size#FoldersFilesLinesCode
6 x 3 internal/jsonview
internal/jsonview
internal/jsonview
590:595 (1%)
627:632 (1%)
660:665 (1%)
view