microsoft / knack
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 282 units with 2,743 lines of code in units (84.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 13 medium complex units (561 lines of code)
    • 34 simple units (574 lines of code)
    • 235 very simple units (1,608 lines of code)
0% | 0% | 20% | 20% | 58%
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% | 20% | 20% | 58%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
knack0% | 0% | 22% | 20% | 56%
knack/testsdk0% | 0% | 6% | 20% | 73%
scripts0% | 0% | 0% | 86% | 13%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _print_arguments()
in knack/help.py
101 25 2
def execute()
in knack/invocation.py
83 25 2
def __init__()
in knack/help.py
58 20 3
def _print_groups()
in knack/help.py
60 19 2
def todict()
in knack/util.py
20 15 2
def _handle_deprecations()
in knack/arguments.py
40 14 3
def invoke()
in knack/cli.py
50 13 4
def _get_subparser()
in knack/parser.py
24 13 3
def extract_args_from_signature()
in knack/introspection.py
35 12 2
def __init__()
in knack/config.py
34 11 5
def items()
in knack/config.py
19 11 2
def _prompt_bool()
in knack/prompting.py
17 11 5
def _process_response_recording()
in knack/testsdk/base.py
20 11 2
17 10 3
def _auto_table_item()
in knack/output.py
16 10 2
def _dump_row()
in knack/output.py
23 10 2
def __getattr__()
in knack/arguments.py
12 9 2
def positional()
in knack/arguments.py
23 9 4
13 9 1
def __init__()
in knack/help.py
22 9 4