aws-cloudformation / cloudformation-cli
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 325 units with 3,462 lines of code in units (72.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (296 lines of code)
    • 22 simple units (476 lines of code)
    • 298 very simple units (2,690 lines of code)
0% | 0% | 8% | 13% | 77%
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% | 8% | 13% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/rpdk/core0% | 0% | 13% | 9% | 76%
src/rpdk/core/jsonutils0% | 0% | 18% | 21% | 59%
src/rpdk/core/contract0% | 0% | 0% | 19% | 80%
src/rpdk/core/resource0% | 0% | 0% | 30% | 70%
src/rpdk/core/fragment0% | 0% | 0% | 6% | 93%
src/rpdk/core/utils0% | 0% | 0% | 0% | 100%
src/rpdk/core/module0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def schema_merge()
in src/rpdk/core/jsonutils/utils.py
44 20 3
def load_resource_spec()
in src/rpdk/core/data_loaders.py
106 19 1
def __set_property_type()
in src/rpdk/core/project.py
74 16 2
def _flatten_object_type()
in src/rpdk/core/jsonutils/flattener.py
35 12 3
def generate()
in src/rpdk/core/project.py
37 12 1
def generate_primitive_strategy()
in src/rpdk/core/contract/resource_generator.py
20 9 2
def _walk()
in src/rpdk/core/jsonutils/inliner.py
25 9 3
def get_inputs()
in src/rpdk/core/test.py
26 9 5
def generate_string_strategy()
in src/rpdk/core/contract/resource_generator.py
30 8 1
def _walk()
in src/rpdk/core/jsonutils/flattener.py
18 8 3
def call()
in src/rpdk/core/contract/resource_client.py
31 7 5
def _flatten_combiners()
in src/rpdk/core/jsonutils/flattener.py
19 7 3
def _resolve_ref()
in src/rpdk/core/jsonutils/utils.py
10 7 3
def _create_or_update_stack()
in src/rpdk/core/upload.py
49 7 3
def get_overrides()
in src/rpdk/core/test.py
27 7 4
def _setup_jinja_env()
in src/rpdk/core/plugin_base.py
15 7 2
def _rebind()
in src/rpdk/core/contract/suite/contract_asserts.py
16 6 4
def prune_properties()
in src/rpdk/core/contract/resource_client.py
13 6 2
def compare()
in src/rpdk/core/contract/resource_client.py
27 6 4
def validate_model_contain_tags()
in src/rpdk/core/contract/resource_client.py
18 6 2