aws-cloudformation / cloudformation-cli-python-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
  • 7% duplication:
    • 1,400 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 105 duplicated lines
  • 8 duplicates
system7% (105 lines)
Duplication per Extension
py7% (105 lines)
Duplication per Component (primary)
src/cloudformation_cli_python_lib6% (56 lines)
python/rpdk/python/templates17% (25 lines)
src38% (12 lines)
ROOT13% (12 lines)
python/rpdk/python0% (0 lines)
python/rpdk/python/data0% (0 lines)
Longest Duplicates
The list of 8 longest duplicates.
See data for all 8 duplicates...
Size#FoldersFilesLinesCode
12 x 2 ROOT
src
setup.py
setup.py
56:67 (23%)
20:31 (44%)
view
10 x 2 src/cloudformation_cli_python_lib
src/cloudformation_cli_python_lib
metrics.py
metrics.py
73:82 (8%)
120:129 (8%)
view
9 x 2 python/rpdk/python/templates
python/rpdk/python/templates
handlers.py
handlers.py
27:35 (10%)
68:76 (10%)
view
7 x 2 python/rpdk/python/templates
python/rpdk/python/templates
handlers.py
handlers.py
27:33 (8%)
83:89 (8%)
view
7 x 2 python/rpdk/python/templates
python/rpdk/python/templates
handlers.py
handlers.py
68:74 (8%)
83:89 (8%)
view
6 x 2 src/cloudformation_cli_python_lib
src/cloudformation_cli_python_lib
utils.py
utils.py
64:70 (3%)
104:110 (3%)
view
6 x 2 src/cloudformation_cli_python_lib
src/cloudformation_cli_python_lib
__init__.py
resource.py
5:10 (85%)
11:16 (3%)
view
6 x 2 src/cloudformation_cli_python_lib
src/cloudformation_cli_python_lib
metrics.py
metrics.py
86:91 (4%)
101:107 (4%)
view