microsoft / tsdoc
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
  • 8% duplication:
    • 18,249 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,542 duplicated lines
  • 174 duplicates
system8% (1,542 lines)
Duplication per Extension
yaml12% (1,220 lines)
ts3% (262 lines)
js11% (42 lines)
tsx2% (18 lines)
Duplication per Component (primary)
common/config10% (1,018 lines)
tsdoc/src4% (250 lines)
common/autoinstallers61% (202 lines)
common/scripts11% (42 lines)
playground/src1% (18 lines)
tsdoc-config/src3% (12 lines)
api-demo/assets0% (0 lines)
api-demo/src0% (0 lines)
eslint-plugin/src0% (0 lines)
playground/public0% (0 lines)
spec/code-snippets0% (0 lines)

Duplication Between Components (50+ lines)

G common/autoinstallers common/autoinstallers common/config common/config common/autoinstallers--common/config 404

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 174 duplicates...
Size#FoldersFilesLinesCode
21 x 2 common/scripts
common/scripts
install-run-rush.js
install-run.js
1:23 (35%)
1:23 (7%)
view
21 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
520:540 (<1%)
543:563 (<1%)
view
15 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
1239:1253 (<1%)
1259:1273 (<1%)
view
14 x 2 common/autoinstallers/rush-prettier
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
212:225 (4%)
6458:6471 (<1%)
view
13 x 2 tsdoc/src/parser
tsdoc/src/parser
NodeParser.ts
NodeParser.ts
2216:2228 (<1%)
2260:2272 (<1%)
view
13 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
5287:5299 (<1%)
5309:5321 (<1%)
view
12 x 2 tsdoc/src/parser
tsdoc/src/parser
NodeParser.ts
NodeParser.ts
2544:2559 (<1%)
2578:2594 (<1%)
view
12 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
778:789 (<1%)
792:803 (<1%)
view
11 x 2 tsdoc/src/parser
tsdoc/src/parser
NodeParser.ts
NodeParser.ts
2508:2523 (<1%)
2572:2587 (<1%)
view
11 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
2271:2281 (<1%)
2287:2297 (<1%)
view
10 x 2 common/autoinstallers/rush-prettier
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
71:80 (3%)
2619:2628 (<1%)
view
10 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
3728:3737 (<1%)
3741:3750 (<1%)
view
10 x 2 tsdoc/src/nodes
tsdoc/src/nodes
DocHtmlEndTag.ts
DocHtmlStartTag.ts
56:68 (17%)
73:84 (12%)
view
10 x 2 tsdoc/src/nodes
tsdoc/src/nodes
DocHtmlEndTag.ts
DocHtmlStartTag.ts
95:109 (17%)
147:161 (12%)
view
10 x 2 common/autoinstallers/rush-prettier
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
47:56 (3%)
2219:2228 (<1%)
view
10 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
1183:1192 (<1%)
1198:1207 (<1%)
view
10 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
2770:2779 (<1%)
2784:2793 (<1%)
view
9 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
6307:6315 (<1%)
6336:6344 (<1%)
view
9 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
679:687 (<1%)
690:698 (<1%)
view
9 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
690:698 (<1%)
701:709 (<1%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
14 x 2 playground/src
playground/src
FlexDivs.tsx
FlexDivs.tsx
7:23 
27:43 
view
7 x 2 tsdoc/src/nodes
tsdoc/src/nodes
DocHtmlAttribute.ts
DocHtmlStartTag.ts
132:139 
134:142 
view
6 x 2 tsdoc/src/nodes
tsdoc/src/nodes
DocErrorText.ts
DocPlainText.ts
63:69 
73:79 
view