microsoft / bonsai-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 212 units with 1,608 lines of code in units (20.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (43 lines of code)
    • 14 simple units (260 lines of code)
    • 197 very simple units (1,305 lines of code)
0% | 0% | 2% | 16% | 81%
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% | 2% | 16% | 81%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
bonsaicli2/bonsai_cli0% | 0% | 3% | 21% | 74%
bonsaicli2/bonsai_cli/commands0% | 0% | 0% | 4% | 95%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _parse_args()
in bonsaicli2/bonsai_cli/config.py
43 14 2
def _parse_config()
in bonsaicli2/bonsai_cli/config.py
24 9 2
def check_cli_version()
in bonsaicli2/bonsai_cli/utils.py
50 9 3
def _dict()
in bonsaicli2/bonsai_cli/api.py
20 8 2
def update()
in bonsaicli2/bonsai_cli/config.py
16 8 2
def __init__()
in bonsaicli2/bonsai_cli/aad.py
26 7 2
def _read_config()
in bonsaicli2/bonsai_cli/config.py
13 7 1
def get_access_token()
in bonsaicli2/bonsai_cli/aad.py
16 6 1
def get_assessment_status()
in bonsaicli2/bonsai_cli/commands/assessment.py
13 6 1
def _set_color()
in bonsaicli2/bonsai_cli/commands/bonsai.py
9 6 2
def _set_profile()
in bonsaicli2/bonsai_cli/config.py
8 6 2
def _parse_config()
in bonsaicli2/bonsai_cli/cookies.py
16 6 1
def _get_version_result()
in bonsaicli2/bonsai_cli/utils.py
18 6 2
def list_profiles()
in bonsaicli2/bonsai_cli/utils.py
17 6 1
def raise_as_click_exception()
in bonsaicli2/bonsai_cli/utils.py
14 6 1
def verify_required_configuration()
in bonsaicli2/bonsai_cli/utils.py
13 5 1
def _get_service_cloud()
in bonsaicli2/bonsai_cli/application_insights.py
9 4 2
def parse_duration()
in bonsaicli2/bonsai_cli/commands/assessment.py
13 4 1
def _sysinfo()
in bonsaicli2/bonsai_cli/commands/bonsai.py
12 4 2
def __init__()
in bonsaicli2/bonsai_cli/cookies.py
17 4 2