microsoft / TypeScript-Sublime-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 337 units with 2,875 lines of code in units (66.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 9 medium complex units (357 lines of code)
    • 30 simple units (649 lines of code)
    • 298 very simple units (1,869 lines of code)
0% | 0% | 12% | 22% | 65%
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% | 12% | 21% | 65%
js0% | 0% | 0% | 72% | 27%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
typescript/libs0% | 0% | 12% | 12% | 75%
typescript/listeners0% | 0% | 22% | 29% | 48%
typescript/commands0% | 0% | 5% | 29% | 64%
ROOT0% | 0% | 0% | 84% | 15%
tsserver0% | 0% | 0% | 72% | 27%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_info()
in typescript/libs/view_helpers.py
35 18 2
def queue_request()
in typescript/libs/work_scheduler.py
66 18 3
def on_modified_with_info()
in typescript/listeners/format.py
31 17 3
def show_errors()
in typescript/listeners/idle.py
49 15 3
def read_msg()
in typescript/libs/node_client.py
41 14 5
def handle_completion_info()
in typescript/listeners/completion.py
28 13 2
def on_modified_with_info()
in typescript/listeners/listeners.py
30 12 3
def show_tooltip_popup()
in typescript/commands/quick_info.py
41 11 7
def get_current_signature_parts()
in typescript/libs/popup_manager.py
36 11 1
def handle_quick_info()
in typescript/commands/quick_info.py
26 10 3
def __init__()
in typescript/libs/node_client.py
48 10 2
def signature_to_html()
in typescript/libs/popup_manager.py
33 10 2
def run()
in typescript/commands/references.py
54 9 3
def on_results()
in typescript/commands/signature.py
26 9 2
def on_query_completions()
in typescript/listeners/completion.py
26 9 4
def on_close()
in typescript/listeners/listeners.py
15 9 2
function createCancellationToken()
in tsserver/cancellationToken.js
34 8 1
def run()
in typescript/commands/get_code_fixes.py
33 8 2
def is_typescript()
in typescript/libs/view_helpers.py
7 8 1
def on_post_text_command_with_info()
in typescript/listeners/completion.py
17 8 5