github / freno
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:
    • 5,406 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 145 duplicated lines
  • 11 duplicates
system2% (145 lines)
Duplication per Extension
go2% (145 lines)
Duplication per Component (primary)
internal3% (115 lines)
pkg1% (30 lines)
cmd0% (0 lines)
resources0% (0 lines)
Longest Duplicates
The list of 11 longest duplicates.
See data for all 11 duplicates...
Size#FoldersFilesLinesCode
11 x 2 internal/raft-boltdb
internal/raft
11:24 (64%)
153:166 (12%)
view
9 x 2 pkg/throttle
pkg/throttle
205:217 (2%)
234:246 (2%)
view
9 x 2 internal/raft
internal/raft
301:311 (<1%)
331:341 (<1%)
view
8 x 2 internal/raft
internal/raft
366:374 (<1%)
385:393 (<1%)
view
7 x 2 internal/raft/bench
internal/raft/bench
15:25 (8%)
49:59 (8%)
view
7 x 2 internal/raft/bench
internal/raft/bench
32:42 (8%)
49:59 (8%)
view
7 x 2 internal/raft/bench
internal/raft/bench
15:25 (8%)
32:42 (8%)
view
7 x 2 internal/raft
internal/raft
649:660 (<1%)
736:747 (<1%)
view
6 x 2 pkg/config
pkg/config
14:19 (7%)
50:55 (7%)
view
6 x 2 internal/raft
internal/raft
1461:1470 (<1%)
1536:1545 (<1%)
view
6 x 2 internal/raft
internal/raft
364:372 (2%)
399:407 (2%)
view