aws-samples / ssp-eks-patterns
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
  • 10% duplication:
    • 374 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 40 duplicated lines
  • 2 duplicates
system10% (40 lines)
Duplication per Extension
ts10% (40 lines)
Duplication per Component (primary)
lib/bottlerocket-construct56% (13 lines)
lib/custom-cluster-construct61% (13 lines)
lib/starter-construct50% (7 lines)
lib/multi-team-construct25% (7 lines)
lib/pipeline-stack0% (0 lines)
lib/teams0% (0 lines)
lib/fargate-construct0% (0 lines)
lib/kubecost-construct0% (0 lines)
lib/nginx-ingress-construct0% (0 lines)
lib/scratchpad0% (0 lines)
lib/multi-region-construct0% (0 lines)
lib/keptn-construct0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 2 longest duplicates.
See data for all 2 duplicates...
Size#FoldersFilesLinesCode
13 x 2 lib/bottlerocket-construct
lib/custom-cluster-construct
index.ts
index.ts
13:29 (56%)
13:30 (61%)
view
7 x 2 lib/multi-team-construct
lib/starter-construct
index.ts
index.ts
37:44 (25%)
19:26 (50%)
view