golang / vscode-go
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
  • 5% duplication:
    • 14,736 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 793 duplicated lines
  • 55 duplicates
system5% (793 lines)
Duplication per Extension
ts4% (579 lines)
in81% (188 lines)
go2% (26 lines)
Duplication per Component (primary)
src4% (443 lines)
tools32% (214 lines)
src/debugAdapter6% (124 lines)
src/goTest<1% (12 lines)
media0% (0 lines)
build0% (0 lines)
build/nightly0% (0 lines)
tools/goplssetting0% (0 lines)
tools/installtools0% (0 lines)
tools/relnotes0% (0 lines)
src/utils0% (0 lines)

Duplication Between Components (50+ lines)

G src src tools tools src--tools 376

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 55 duplicates...
Size#FoldersFilesLinesCode
13 x 2 src
src
goDeveloperSurvey.ts
goSurvey.ts
158:175 (13%)
181:198 (7%)
view
11 x 2 src/debugAdapter
src/debugAdapter
goDebug.ts
goDebug.ts
1477:1487 (<1%)
2700:2710 (<1%)
view
10 x 2 src
tools
goToolsInformation.ts
allTools.ts.in
214:223 (4%)
212:221 (4%)
view
10 x 2 src/debugAdapter
src/debugAdapter
goDebug.ts
goDebug.ts
1573:1582 (<1%)
1635:1644 (<1%)
view
10 x 2 src
src
goBuild.ts
goBuild.ts
134:143 (8%)
166:175 (8%)
view
9 x 2 src
src
goDeclaration.ts
goDeclaration.ts
276:285 (3%)
331:341 (3%)
view
9 x 2 src
src
goDeclaration.ts
goTypeDefinition.ts
382:392 (3%)
95:105 (10%)
view
9 x 2 src/debugAdapter
src/debugAdapter
goDebug.ts
goDebug.ts
573:582 (<1%)
719:728 (<1%)
view
9 x 2 src
src
goSuggest.ts
goSuggest.ts
195:203 (1%)
225:233 (1%)
view
8 x 2 src/debugAdapter
src/debugAdapter
goDebug.ts
goDebug.ts
632:645 (<1%)
678:689 (<1%)
view
8 x 2 src
tools
goToolsInformation.ts
allTools.ts.in
168:175 (3%)
166:173 (3%)
view
8 x 2 src
tools
goToolsInformation.ts
allTools.ts.in
158:166 (3%)
156:164 (3%)
view
8 x 2 src
tools
goToolsInformation.ts
allTools.ts.in
11:18 (3%)
9:16 (3%)
view
8 x 2 src
tools
goToolsInformation.ts
allTools.ts.in
117:124 (3%)
115:122 (3%)
view
8 x 2 src
src
goReferences.ts
goTypeDefinition.ts
93:102 (12%)
120:129 (9%)
view
8 x 2 src
tools
goToolsInformation.ts
allTools.ts.in
20:27 (3%)
18:25 (3%)
view
8 x 2 src
src
goBuild.ts
goVet.ts
77:86 (6%)
66:75 (10%)
view
8 x 2 src
src
goLint.ts
goVet.ts
69:79 (8%)
67:77 (10%)
view
7 x 2 src
tools
goToolsInformation.ts
allTools.ts.in
101:107 (3%)
99:105 (3%)
view
7 x 2 src
tools
goToolsInformation.ts
allTools.ts.in
53:59 (3%)
51:57 (3%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
20 x 2 src/debugAdapter
src/debugAdapter
goDebug.ts
goDebug.ts
1759:1782 
1784:1807 
view