golang / mod
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:
    • 3,992 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 128 duplicated lines
  • 10 duplicates
system3% (128 lines)
Duplication per Extension
go3% (128 lines)
Duplication per Component (primary)
modfile6% (84 lines)
sumdb4% (22 lines)
module4% (22 lines)
gosumcheck0% (0 lines)
semver0% (0 lines)
zip0% (0 lines)
internal/lazyregexp0% (0 lines)
sumdb/dirhash0% (0 lines)
sumdb/storage0% (0 lines)
sumdb/tlog0% (0 lines)
sumdb/note0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 10 longest duplicates.
See data for all 10 duplicates...
Size#FoldersFilesLinesCode
19 x 2 modfile
modfile
rule.go
rule.go
327:350 (4%)
581:604 (4%)
view
16 x 2 module
sumdb
module.go
client.go
812:840 (4%)
212:240 (5%)
view
8 x 2 modfile
modfile
rule.go
work.go
267:276 (1%)
55:63 (6%)
view
8 x 2 modfile
modfile
rule.go
rule.go
421:431 (1%)
624:633 (1%)
view
7 x 2 modfile
modfile
rule.go
rule.go
266:273 (1%)
277:284 (1%)
view
6 x 2 module
sumdb
module.go
client.go
803:809 (1%)
204:210 (1%)
view
6 x 2 modfile
modfile
rule.go
work.go
278:284 (1%)
55:60 (4%)
view
6 x 2 modfile
modfile
rule.go
work.go
267:273 (1%)
64:69 (4%)
view
6 x 2 modfile
modfile
work.go
work.go
55:60 (4%)
64:69 (4%)
view
6 x 2 modfile
modfile
rule.go
work.go
278:284 (1%)
64:69 (4%)
view