aws / amazon-ec2-instance-selector
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:
    • 2,286 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 89 duplicated lines
  • 7 duplicates
system3% (89 lines)
Duplication per Extension
go3% (89 lines)
Duplication per Component (primary)
pkg/ec2pricing19% (44 lines)
pkg/selector3% (31 lines)
pkg/selector/outputs5% (14 lines)
pkg/instancetypes0% (0 lines)
pkg/bytequantity0% (0 lines)
pkg/cli0% (0 lines)
cmd0% (0 lines)
Longest Duplicates
The list of 7 longest duplicates.
See data for all 7 duplicates...
Size#FoldersFilesLinesCode
10 x 2 pkg/ec2pricing
pkg/ec2pricing
ec2pricing.go
ec2pricing.go
172:182 (4%)
259:268 (4%)
view
7 x 2 pkg/selector/outputs
pkg/selector/outputs
outputs.go
outputs.go
172:180 (3%)
223:231 (3%)
view
6 x 2 pkg/selector
pkg/selector
emr.go
emr.go
86:93 (2%)
97:104 (2%)
view
6 x 2 pkg/selector
pkg/selector
comparators.go
comparators.go
70:75 (6%)
81:86 (6%)
view
6 x 2 pkg/ec2pricing
pkg/ec2pricing
ec2pricing.go
ec2pricing.go
83:89 (2%)
217:222 (2%)
view
6 x 2 pkg/ec2pricing
pkg/ec2pricing
ec2pricing.go
ec2pricing.go
106:112 (2%)
238:244 (2%)
view
6 x 2 pkg/selector
pkg/selector
emr.go
emr.go
68:76 (2%)
87:95 (2%)
view