microsoft / sarif-web-component
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 36 units with 572 lines of code in units (25.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (204 lines of code)
    • 2 simple units (100 lines of code)
    • 30 very simple units (268 lines of code)
0% | 0% | 35% | 17% | 46%
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% | 82% | 0% | 17%
tsx0% | 0% | 15% | 25% | 59%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
components0% | 0% | 39% | 19% | 41%
docs-components0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private filterHelper()
in components/RunStore.ts
54 18 1
constructor()
in components/RunStore.ts
59 17 6
render()
in components/Viewer.tsx
61 14 0
export function getRepoUri()
in components/getRepoUri.ts
30 12 3
render()
in components/RunCard.tsx
66 8 0
render()
in components/FilterBar.tsx
34 6 0
private processSortEvent()
in components/RunCard.TreeColumnSorting.ts
14 5 1
function renderMessageWithEmbeddedLinks()
in components/RunCard.renderCell.tsx
19 5 2
constructor()
in components/FilterBar.tsx
8 4 2
className: css()
in components/RunCard.renderCell.tsx
8 3 2
function getHostname()
in components/getRepoUri.ts
8 3 1
8 3 0
function isValidURL()
in components/RunCard.renderPathCell.tsx
7 2 1
constructor()
in components/RunCard.tsx
38 2 1
getState()
in components/FilterBar.tsx
4 1 0
yield clone()
in components/PathCellDemo.tsx
6 1 1
yield clone()
in components/PathCellDemo.tsx
6 1 1
yield clone()
in components/PathCellDemo.tsx
8 1 1
yield clone()
in components/PathCellDemo.tsx
3 1 1
yield clone()
in components/PathCellDemo.tsx
8 1 1