microsoft / vscode-json-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 170 units with 3,676 lines of code in units (105.4% of code).
    • 1 very complex units (149 lines of code)
    • 8 complex units (679 lines of code)
    • 12 medium complex units (588 lines of code)
    • 18 simple units (365 lines of code)
    • 131 very simple units (1,895 lines of code)
4% | 18% | 15% | 9% | 51%
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
ts4% | 18% | 16% | 9% | 51%
js0% | 0% | 0% | 51% | 48%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/services4% | 18% | 16% | 7% | 52%
src/utils0% | 31% | 16% | 30% | 21%
build0% | 0% | 0% | 51% | 48%
src0% | 0% | 0% | 0% | 100%
src/example0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public doComplete()
in src/services/jsonCompletion.ts
149 51 3
export function createRegex()
in src/utils/glob.ts
91 45 4
export function getFoldingRanges()
in src/services/jsonFolding.ts
108 41 2
private getValueCompletions()
in src/services/jsonCompletion.ts
74 36 7
public doHover()
in src/services/jsonHover.ts
80 31 3
private getSchemaLessValueCompletions()
in src/services/jsonCompletion.ts
69 30 5
private getPropertyCompletions()
in src/services/jsonCompletion.ts
70 28 6
private getInsertTextForProperty()
in src/services/jsonCompletion.ts
75 28 4
public resolveSchemaContent()
in src/services/jsonSchemaService.ts
112 27 2
public doValidation()
in src/services/jsonValidation.ts
71 25 4
public findDocumentSymbols()
in src/services/jsonDocumentSymbols.ts
69 24 3
public findDocumentSymbols2()
in src/services/jsonDocumentSymbols.ts
82 24 3
export function equals()
in src/utils/objects.ts
49 18 2
function getSelectionRange()
in src/services/jsonSelectionRanges.ts
39 17 1
private addDefaultValueCompletions()
in src/services/jsonCompletion.ts
74 16 4
public findDocumentColors()
in src/services/jsonDocumentSymbols.ts
31 16 3
private getContributedValueCompletions()
in src/services/jsonCompletion.ts
27 15 6
private getSectionRecursive()
in src/services/jsonSchemaService.ts
28 15 2
private traverseNodes()
in src/services/jsonSchemaService.ts
49 15 2
private getSchemaLessPropertyCompletions()
in src/services/jsonCompletion.ts
40 12 4