microsoft / sarif-vscode-extension
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 86 units with 1,172 lines of code in units (40.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (226 lines of code)
    • 14 simple units (439 lines of code)
    • 69 very simple units (507 lines of code)
0% | 0% | 19% | 37% | 43%
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% | 0% | 24% | 33% | 41%
tsx0% | 0% | 0% | 52% | 47%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/extension0% | 0% | 34% | 26% | 38%
src/panel0% | 0% | 0% | 46% | 53%
src/shared0% | 0% | 0% | 62% | 37%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public async translateArtifactToLocal()
in src/extension/uriRebaser.ts
59 17 1
public async show()
in src/extension/panel.ts
113 15 0
export async function update()
in src/extension/update.ts
54 12 0
function getHttpsProxyAgent()
in src/extension/update.ts
20 10 0
render()
in src/panel/details.tsx
102 10 0
export function detectUpgrade()
in src/extension/loadLogs.ts
21 9 3
function hi()
in src/panel/widgets.tsx
15 8 1
render()
in src/panel/widgets.tsx
20 8 0
export function augmentLog()
in src/shared/index.ts
50 8 2
function activateDecorations()
in src/extension/index.ts
54 7 2
export function effectiveLevel()
in src/shared/index.ts
14 7 1
export async function loadLogs()
in src/extension/loadLogs.ts
32 6 2
export function tryFastUpgradeLog()
in src/extension/loadLogs.ts
18 6 1
export function regionToSelection()
in src/extension/regionToSelection.ts
32 6 2
constructor()
in src/panel/indexStore.ts
35 6 2
Array.prototype.sortBy = function()
in src/shared/extension.ts
11 6 2
export function mapDistinct()
in src/shared/index.ts
15 6 2
export async function activate()
in src/extension/index.ts
32 5 1
function activateVirtualDocuments()
in src/extension/index.ts
23 5 2
function activateSelectionSync()
in src/extension/index.ts
13 5 2