golang / playground
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
  • 4% duplication:
    • 3,046 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 144 duplicated lines
  • 8 duplicates
system4% (144 lines)
Duplication per Extension
css31% (78 lines)
yaml28% (42 lines)
go1% (24 lines)
Duplication per Component (primary)
static26% (78 lines)
ROOT3% (66 lines)
cmd/redirect0% (0 lines)
cmd/latestgo0% (0 lines)
sandbox0% (0 lines)
sandbox/sandboxtypes0% (0 lines)
internal0% (0 lines)
internal/metrics0% (0 lines)
internal/gcpdial0% (0 lines)
deploy0% (0 lines)
Longest Duplicates
The list of 8 longest duplicates.
See data for all 8 duplicates...
Size#FoldersFilesLinesCode
16 x 2 static
static
godoc.css
style.css
28:44 (22%)
48:65 (8%)
view
14 x 2 ROOT
ROOT
app.goprev.yaml
app.gotip.yaml
2:20 (93%)
2:20 (87%)
view
14 x 2 ROOT
ROOT
app.goprev.yaml
app.yaml
2:20 (93%)
2:20 (93%)
view
14 x 2 ROOT
ROOT
app.gotip.yaml
app.yaml
2:20 (87%)
2:20 (93%)
view
13 x 2 static
static
godoc.css
style.css
1:13 (18%)
1:13 (7%)
view
10 x 2 static
static
godoc.css
style.css
65:74 (14%)
152:161 (5%)
view
6 x 2 ROOT
ROOT
tests.go
tests.go
394:400 (1%)
414:420 (1%)
view
6 x 2 ROOT
ROOT
sandbox.go
sandbox.go
408:416 (1%)
529:537 (1%)
view