awslabs / aws-cfn-template-flip
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 43 units with 362 lines of code in units (72.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (93 lines of code)
    • 6 simple units (84 lines of code)
    • 34 very simple units (185 lines of code)
0% | 0% | 25% | 23% | 51%
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% | 25% | 23% | 51%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cfn_clean0% | 0% | 75% | 10% | 13%
cfn_flip0% | 0% | 18% | 31% | 50%
cfn_tools0% | 0% | 0% | 25% | 75%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def flip()
in cfn_flip/__init__.py
22 19 6
def convert_join()
in cfn_clean/__init__.py
52 18 1
def cfn_literal_parser()
in cfn_clean/__init__.py
19 14 1
def main()
in cfn_flip/main.py
28 9 2
def apply_configs()
in cfn_tools/_config.py
14 7 1
def string_representer()
in cfn_flip/yaml_dumper.py
8 7 2
def multi_constructor()
in cfn_tools/yaml_loader.py
17 6 3
def represent_scalar()
in cfn_tools/yaml_dumper.py
7 6 4
def clean()
in cfn_clean/__init__.py
10 6 1
def fn_representer()
in cfn_flip/yaml_dumper.py
9 5 3
def construct_getatt()
in cfn_tools/yaml_loader.py
7 4 1
def analyze_scalar()
in cfn_tools/yaml_dumper.py
7 4 2
def _apply_type()
in cfn_tools/_config.py
10 4 4
def _is_null()
in cfn_tools/_config.py
6 4 1
def has_intrinsic_functions()
in cfn_clean/__init__.py
9 4 1
def map_representer()
in cfn_flip/yaml_dumper.py
9 4 2
def get_dumper()
in cfn_flip/yaml_dumper.py
8 4 2
def _load_config()
in cfn_tools/_config.py
10 3 3
def reset()
in cfn_tools/_config.py
8 3 2
def load()
in cfn_flip/__init__.py
10 3 1