aws-cloudformation / cloudformation-cli-python-plugin
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 98 units with 599 lines of code in units (40.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 6 simple units (107 lines of code)
    • 92 very simple units (492 lines of code)
0% | 0% | 0% | 17% | 82%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 0% | 0% | 17% | 82%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/cloudformation_cli_python_lib0% | 0% | 0% | 17% | 82%
python/rpdk/python0% | 0% | 0% | 20% | 79%
python/rpdk/python/templates0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _serialize()
in src/cloudformation_cli_python_lib/interface.py
13 8 1
def _field_to_type()
in src/cloudformation_cli_python_lib/recast.py
28 7 4
def translate_type()
in python/rpdk/python/resolver.py
16 7 1
def _recast_lists()
in src/cloudformation_cli_python_lib/recast.py
8 6 5
def _recast_primitive()
in src/cloudformation_cli_python_lib/recast.py
10 6 3
def _docker_build()
in python/rpdk/python/codegen.py
32 6 2
def cast_sequence_item()
in src/cloudformation_cli_python_lib/recast.py
11 5 5
def __init__()
in src/cloudformation_cli_python_lib/utils.py
5 4 2
def deserialize()
in src/cloudformation_cli_python_lib/utils.py
9 4 3
def serialize()
in src/cloudformation_cli_python_lib/utils.py
6 4 1
def __init__()
in src/cloudformation_cli_python_lib/utils.py
5 4 2
def serialize()
in src/cloudformation_cli_python_lib/utils.py
6 4 1
def get_partition()
in src/cloudformation_cli_python_lib/utils.py
8 4 1
def _recursive_relative_write()
in python/rpdk/python/codegen.py
5 4 3
def _serialize()
in src/cloudformation_cli_python_lib/interface.py
6 3 1
def _serialize_item()
in src/cloudformation_cli_python_lib/interface.py
6 3 2
def _get_existing_logger()
in src/cloudformation_cli_python_lib/log_delivery.py
5 3 1
def _put_log_event()
in src/cloudformation_cli_python_lib/log_delivery.py
20 3 2
def emit()
in src/cloudformation_cli_python_lib/log_delivery.py
8 3 2
def _recast_sets()
in src/cloudformation_cli_python_lib/recast.py
4 3 5