microsoft / vscode-textmate
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 260 units with 3,208 lines of code in units (81.3% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (529 lines of code)
    • 8 medium complex units (417 lines of code)
    • 28 simple units (684 lines of code)
    • 220 very simple units (1,578 lines of code)
0% | 16% | 12% | 21% | 49%
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
ts0% | 16% | 13% | 21% | 48%
js0% | 0% | 0% | 0% | 100%
go0% | 0% | 0% | 0% | 100%
cs0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 16% | 13% | 21% | 48%
benchmark0% | 0% | 0% | 0% | 100%
test-cases/themes/go/colorize-fixtures0% | 0% | 0% | 0% | 100%
test-cases/onigtests/fixtures0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
137 49 2
161 42 3
function scanNext()
in src/grammar.ts
115 27 0
function _parse()
in src/plist.ts
116 27 3
62 20 3
76 20 1
38 14 5
function handleCaptures()
in src/grammar.ts
52 14 6
45 12 6
44 12 2
54 12 3
constructor()
in src/rule.ts
46 11 3
18 10 2
43 9 0
private static _equals()
in src/grammar.ts
18 9 2
public compileAG()
in src/rule.ts
31 9 3
30 9 3
36 9 2
42 8 7
23 8 2