aws-cloudformation / aws-cloudformation-macros
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
  • 16% duplication:
    • 1,297 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 212 duplicated lines
  • 13 duplicates
system16% (212 lines)
Duplication per Extension
yaml25% (130 lines)
py10% (82 lines)
Duplication per Component (primary)
StringFunctions34% (53 lines)
PyPlate42% (39 lines)
Public-and-Private-Subnet-per-AZ16% (38 lines)
ExecutionRoleBuilder14% (36 lines)
StackMetrics24% (22 lines)
ShortHand6% (6 lines)
Explode5% (6 lines)
Boto37% (6 lines)
S3Objects4% (6 lines)
Count0% (0 lines)

Duplication Between Components (50+ lines)

G PyPlate PyPlate StringFunctions StringFunctions PyPlate--StringFunctions 78 Public-and-Private-Subnet-per-AZ Public-and-Private-Subnet-per-AZ Public-and-Private-Subnet-per-AZ--PyPlate 52 Public-and-Private-Subnet-per-AZ--StringFunctions 52

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 13 longest duplicates.
See data for all 13 duplicates...
Size#FoldersFilesLinesCode
27 x 2 PyPlate
StringFunctions
python.yaml
string.yaml
1:27 (35%)
1:27 (33%)
view
20 x 2 Public-and-Private-Subnet-per-AZ
PyPlate
Create-Macro.yaml
python.yaml
3:22 (22%)
2:21 (26%)
view
20 x 2 Public-and-Private-Subnet-per-AZ
StringFunctions
Create-Macro.yaml
string.yaml
3:22 (22%)
2:21 (25%)
view
15 x 2 ExecutionRoleBuilder/lambda
ExecutionRoleBuilder/lambda
policytemplates.py
policytemplates.py
46:60 (7%)
74:88 (7%)
view
12 x 2 PyPlate
StringFunctions
python.yaml
string.yaml
69:80 (15%)
69:80 (15%)
view
8 x 2 StackMetrics/lambda
StackMetrics/lambda
resource.py
resource.py
23:30 (18%)
41:48 (18%)
view
7 x 2 StringFunctions
StringFunctions
string_example.yaml
string_example.yaml
58:64 (9%)
67:73 (9%)
view
6 x 2 Boto3/lambda
Explode/lambda
macro.py
explode.py
46:52 (20%)
85:91 (7%)
view
6 x 2 Public-and-Private-Subnet-per-AZ
Public-and-Private-Subnet-per-AZ
Create-Stack.yaml
Create-Stack.yaml
62:67 (4%)
73:78 (4%)
view
6 x 2 S3Objects/lambda
StackMetrics/lambda
macro.py
index.py
82:88 (10%)
28:34 (31%)
view
6 x 2 Public-and-Private-Subnet-per-AZ
PyPlate
Create-Macro.yaml
python.yaml
26:31 (6%)
72:77 (7%)
view
6 x 2 ExecutionRoleBuilder/lambda
ShortHand/lambda
index.py
index.py
23:28 (10%)
16:21 (100%)
view
6 x 2 Public-and-Private-Subnet-per-AZ
StringFunctions
Create-Macro.yaml
string.yaml
26:31 (6%)
72:77 (7%)
view