aws-cloudformation / cloudformation-cli-go-plugin
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
  • 18% duplication:
    • 1,614 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 302 duplicated lines
  • 6 duplicates
system18% (302 lines)
Duplication per Extension
go24% (302 lines)
Duplication per Component (primary)
cfn/scheduler85% (178 lines)
cfn/callback75% (118 lines)
cfn/handler8% (6 lines)
ROOT0% (0 lines)
cfn0% (0 lines)
cfn/cfnerr0% (0 lines)
cfn/credentials0% (0 lines)
cfn/encoding0% (0 lines)
cfn/logging0% (0 lines)
cfn/metrics0% (0 lines)
python/rpdk0% (0 lines)
Longest Duplicates
The list of 6 longest duplicates.
See data for all 6 duplicates...
Size#FoldersFilesLinesCode
75 x 2 cfn/scheduler
cfn/scheduler
scheduler.go
scheduler_notag.go
73:195 (78%)
73:195 (78%)
view
32 x 2 cfn/callback
cfn/callback
callback.go
callback_notag.go
113:156 (39%)
81:122 (48%)
view
17 x 2 cfn/callback
cfn/callback
callback.go
callback_notag.go
37:67 (20%)
22:52 (25%)
view
14 x 2 cfn/scheduler
cfn/scheduler
scheduler.go
scheduler_notag.go
25:56 (14%)
25:56 (14%)
view
7 x 2 cfn/callback
cfn/callback
callback.go
callback_notag.go
73:83 (8%)
58:68 (10%)
view
6 x 2 cfn/callback
cfn/handler
status.go
status.go
4:21 (75%)
4:21 (85%)
view
Duplicated Units
The list of top 6 duplicated units.
See data for all 6 unit duplicates...
Size#FoldersFilesLinesCode
43 x 2 cfn/scheduler
cfn/scheduler
scheduler_notag.go
scheduler.go
73:130 
73:130 
view
29 x 2 cfn/scheduler
cfn/scheduler
scheduler_notag.go
scheduler.go
134:166 
134:166 
view
20 x 2 cfn/callback
cfn/callback
callback_notag.go
callback.go
85:106 
117:140 
view
13 x 2 cfn/callback
cfn/callback
callback_notag.go
callback.go
109:125 
143:159 
view
11 x 2 cfn/scheduler
cfn/scheduler
scheduler_notag.go
scheduler.go
182:196 
182:196 
view
6 x 2 cfn/callback
cfn/callback
callback_notag.go
callback.go
22:28 
37:43 
view