microsoft / node-jsonc-parser
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 54 units with 1,290 lines of code in units (82.2% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (374 lines of code)
    • 8 medium complex units (372 lines of code)
    • 11 simple units (252 lines of code)
    • 32 very simple units (292 lines of code)
0% | 28% | 28% | 19% | 22%
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% | 29% | 29% | 18% | 21%
js0% | 0% | 0% | 51% | 48%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/impl0% | 30% | 28% | 19% | 21%
src0% | 0% | 62% | 0% | 37%
build0% | 0% | 0% | 51% | 48%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function format()
in src/impl/format.ts
128 47 3
function scanNext()
in src/impl/scanner.ts
133 45 0
113 40 4
export function getLocation()
in src/impl/parser.ts
104 22 2
function scanNumber()
in src/impl/scanner.ts
40 20 0
function scanString()
in src/impl/scanner.ts
75 19 0
20 17 1
function scanNext()
in src/impl/parser.ts
45 15 0
31 13 2
function parseArray()
in src/impl/parser.ts
40 12 0
17 11 1
function parseObject()
in src/impl/parser.ts
30 10 0
function scanHexDigits()
in src/impl/scanner.ts
25 10 2
function withFormatting()
in src/impl/edit.ts
26 9 3
export function getNodeValue()
in src/impl/parser.ts
22 9 1
export function visit()
in src/impl/parser.ts
31 7 3
export function stripComments()
in src/impl/parser.ts
25 7 2
export function getNodeType()
in src/impl/parser.ts
16 7 1
function deleteRefs()
in build/remove-sourcemap-refs.js
20 6 1
export function getNodePath()
in src/impl/parser.ts
16 6 1