microsoft / vscode-cmake-tools
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 1,102 units with 13,008 lines of code in units (75.8% of code).
    • 0 very complex units (0 lines of code)
    • 8 complex units (780 lines of code)
    • 49 medium complex units (2,700 lines of code)
    • 92 simple units (2,366 lines of code)
    • 953 very simple units (7,162 lines of code)
0% | 5% | 20% | 18% | 55%
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% | 6% | 20% | 18% | 55%
js0% | 0% | 0% | 42% | 57%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 5% | 20% | 18% | 54%
src/drivers0% | 8% | 18% | 14% | 58%
src/diagnostics0% | 0% | 48% | 5% | 46%
src/installs0% | 0% | 0% | 100% | 0%
src/drivers/cmakefileapi0% | 0% | 0% | 11% | 88%
src/cmake0% | 0% | 0% | 100% | 0%
ROOT0% | 0% | 0% | 42% | 57%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
61 47 1
async configure()
in src/drivers/driver.ts
172 41 5
121 41 5
82 40 3
66 37 3
120 30 4
63 27 5
95 26 3
async runBuild()
in src/cmake-tools.ts
81 25 2
99 25 2
87 24 6
43 24 1
private async _init()
in src/cmake-tools.ts
67 22 0
async addConfigurePreset()
in src/presetsController.ts
102 22 0
updateConfigurationData()
in src/cpptools.ts
62 21 1
82 21 7
function parseCppStandard()
in src/cpptools.ts
18 20 2
45 20 4
async build()
in src/drivers/driver.ts
68 20 2
private _updateCodeModel()
in src/extension.ts
77 20 1