microsoft / roosterjs-react
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
  • 1% duplication:
    • 8,709 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 122 duplicated lines
  • 9 duplicates
system1% (122 lines)
Duplication per Extension
tsx2% (60 lines)
ts<1% (34 lines)
scss5% (28 lines)
Duplication per Component (primary)
packages/roosterjs-react-command-bar5% (66 lines)
packages/roosterjs-react-common6% (28 lines)
packages/roosterjs-react-pickers3% (14 lines)
packages/roosterjs-react-ribbon2% (14 lines)
packages/roosterjs-react-editor0% (0 lines)
packages/roosterjs-react-emoji-resources0% (0 lines)
packages/roosterjs-react-emoji0% (0 lines)
packages/roosterjs-react0% (0 lines)
sample0% (0 lines)
sample/fabric0% (0 lines)
sample/script0% (0 lines)
tools0% (0 lines)
Longest Duplicates
The list of 9 longest duplicates.
See data for all 9 duplicates...
Size#FoldersFilesLinesCode
8 x 2 packages/roosterjs-react-common/lib/plugins
packages/roosterjs-react-common/lib/plugins
IgnorePasteImagePlugin.ts
PasteImagePlugin.ts
29:40 (32%)
39:50 (19%)
view
7 x 2 packages/roosterjs-react...mand-bar/lib/components
packages/roosterjs-react...mand-bar/lib/components
RoosterCommandBar.scss
RoosterCommandBar.scss
97:105 (3%)
132:140 (3%)
view
7 x 2 packages/roosterjs-react-pickers/lib/components
packages/roosterjs-react-pickers/lib/components
ColorPicker.tsx
ColorPicker.tsx
43:49 (6%)
64:70 (6%)
view
7 x 2 packages/roosterjs-react-ribbon/lib/components
packages/roosterjs-react-ribbon/lib/components
Ribbon.scss
Ribbon.scss
33:40 (11%)
45:51 (11%)
view
7 x 2 packages/roosterjs-react-command-bar/lib/utils
packages/roosterjs-react-command-bar/lib/utils
OutOfBoxCommandBarButtons.ColorInfo.tsx
OutOfBoxCommandBarButtons.ColorInfo.tsx
33:39 (11%)
54:60 (11%)
view
7 x 2 packages/roosterjs-react-command-bar/lib/utils
packages/roosterjs-react-command-bar/lib/utils
OutOfBoxCommandBarButtons.tsx
OutOfBoxCommandBarButtons.tsx
125:131 (2%)
148:154 (2%)
view
6 x 2 packages/roosterjs-react-command-bar/lib/utils
packages/roosterjs-react-command-bar/lib/utils
OutOfBoxCommandBarButtons.tsx
OutOfBoxCommandBarButtons.tsx
209:214 (2%)
220:225 (2%)
view
6 x 2 packages/roosterjs-react...mand-bar/lib/components
packages/roosterjs-react-command-bar/lib/plugins
LinkDialog.tsx
RoosterCommandBarPlugin.ts
13:18 (5%)
11:16 (5%)
view
6 x 2 packages/roosterjs-react-common/lib/plugins
packages/roosterjs-react-common/lib/plugins
IgnorePasteImagePlugin.ts
PasteImagePlugin.ts
18:28 (24%)
17:27 (14%)
view