microsoft / sarif-web-component
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
  • 3% duplication:
    • 1,928 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 62 duplicated lines
  • 5 duplicates
system3% (62 lines)
Duplication per Extension
ts6% (34 lines)
tsx2% (28 lines)
Duplication per Component (primary)
resources17% (34 lines)
components1% (14 lines)
docs-components5% (7 lines)
ROOT2% (7 lines)
Longest Duplicates
The list of 5 longest duplicates.
See data for all 5 duplicates...
Size#FoldersFilesLinesCode
7 x 2 resources
resources
sample.ts
sample.ts
147:153 (3%)
160:166 (3%)
view
7 x 2 components
components
Snippet.tsx
Snippet.tsx
199:206 (2%)
248:255 (2%)
view
7 x 2 docs-components
ROOT
Index.tsx
index.tsx
32:39 (13%)
16:23 (15%)
view
6 x 2 resources
resources
sample.ts
sample.ts
183:190 (3%)
195:202 (3%)
view
6 x 2 resources
resources
sample.ts
sample.ts
170:179 (3%)
197:204 (3%)
view