microsoft / vscode-html-languageservice
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 720 units with 8,488 lines of code in units (74.1% of code).
    • 3 very complex units (717 lines of code)
    • 9 complex units (479 lines of code)
    • 27 medium complex units (1,120 lines of code)
    • 85 simple units (1,461 lines of code)
    • 596 very simple units (4,711 lines of code)
8% | 5% | 13% | 17% | 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
js8% | 5% | 10% | 16% | 59%
ts8% | 6% | 21% | 17% | 45%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/beautify/esm8% | 5% | 10% | 15% | 59%
src/beautify8% | 5% | 10% | 16% | 59%
src/parser42% | 0% | 19% | 5% | 32%
src/services0% | 9% | 25% | 21% | 44%
src/utils0% | 0% | 9% | 18% | 72%
build0% | 0% | 0% | 60% | 39%
src/languageFacts0% | 0% | 0% | 36% | 63%
src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
Beautifier.prototype.beautify = function()
in src/beautify/beautify-css.js
252 89 0
Beautifier.prototype.beautify = function()
in src/beautify/esm/beautify-css.js
252 89 0
function internalScan()
in src/parser/htmlScanner.ts
213 63 0
45 44 1
45 44 1
72 40 5
Beautifier.prototype._set_tag_position = function()
in src/beautify/esm/beautify-html.js
72 40 5
documentation: localize()
in src/services/htmlCompletion.ts
66 31 2
47 29 0
47 29 0
(function()()
in src/beautify/esm/beautify-html.js
4 27 1
export function getFoldingRanges()
in src/services/htmlFolding.ts
81 26 2
58 24 4
Beautifier.prototype._handle_inside_tag = function()
in src/beautify/esm/beautify-html.js
58 24 4
export function parse()
in src/parser/htmlParser.ts
96 24 1
57 23 3
64 23 3
function limitRanges()
in src/services/htmlFolding.ts
65 20 2
private _doComplete()
in src/services/htmlCompletion.ts
36 19 4
export function findDocumentLinks()
in src/services/htmlLinks.ts
57 19 2