microsoft / pxt-chibitronics
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
  • 2% duplication:
    • 2,868 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 66 duplicated lines
  • 6 duplicates
system2% (66 lines)
Duplication per Extension
ts3% (66 lines)
Duplication per Component (primary)
editor15% (48 lines)
sim/visuals2% (18 lines)
cmds0% (0 lines)
libs/blocksprj0% (0 lines)
libs/core0% (0 lines)
libs/scope0% (0 lines)
sim0% (0 lines)
sim/public0% (0 lines)
sim/state0% (0 lines)
theme0% (0 lines)
windowsapp0% (0 lines)
Longest Duplicates
The list of 6 longest duplicates.
See data for all 6 duplicates...
Size#FoldersFilesLinesCode
10 x 2 editor
editor
extension.ts
extension.ts
109:118 (3%)
151:160 (3%)
view
7 x 2 editor
editor
extension.ts
extension.ts
26:32 (2%)
39:45 (2%)
view
7 x 2 editor
editor
extension.ts
extension.ts
131:138 (2%)
167:175 (2%)
view
6 x 2 sim/visuals
sim/visuals
neopixel.ts
neopixel.ts
28:33 (3%)
46:51 (3%)
view
6 x 2 sim/visuals
sim/visuals
neopixel.ts
neopixel.ts
28:33 (3%)
39:44 (3%)
view
6 x 2 sim/visuals
sim/visuals
neopixel.ts
neopixel.ts
39:44 (3%)
46:51 (3%)
view