microsoft / azure-pipelines-language-server
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 204 units with 3,121 lines of code in units (81.7% of code).
    • 1 very complex units (304 lines of code)
    • 4 complex units (416 lines of code)
    • 13 medium complex units (682 lines of code)
    • 27 simple units (560 lines of code)
    • 159 very simple units (1,159 lines of code)
9% | 13% | 21% | 17% | 37%
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
ts9% | 13% | 21% | 17% | 37%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
language-service/src/parser24% | 10% | 23% | 13% | 28%
language-service/src/services0% | 22% | 20% | 16% | 40%
language-service/src/utils0% | 0% | 22% | 31% | 46%
language-server/src0% | 0% | 27% | 30% | 41%
language-service/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public validate()
in language-service/src/parser/jsonParser.ts
304 66 3
public validate()
in language-service/src/parser/jsonParser.ts
128 39 3
public doComplete()
in language-service/src/services/yamlCompletion.ts
126 37 3
public doHover()
in language-service/src/services/yamlHover.ts
97 34 3
private getValueCompletions()
in language-service/src/services/yamlCompletion.ts
65 31 7
public resolveSchemaContent()
in language-service/src/services/jsonSchemaService.ts
99 23 2
public validate()
in language-service/src/parser/jsonParser.ts
61 20 3
private getInsertTextForProperty()
in language-service/src/services/yamlCompletion.ts
53 20 4
export function equals()
in language-service/src/utils/objects.ts
49 18 2
public validate()
in language-service/src/parser/jsonParser.ts
69 17 3
function recursivelyBuildAst()
in language-service/src/parser/yamlParser.ts
77 16 2
private getPropertyCompletions()
in language-service/src/services/yamlCompletion.ts
49 15 6
function updateConfiguration()
in language-server/src/server.ts
39 14 0
private getSectionRecursive()
in language-service/src/services/jsonSchemaService.ts
34 13 2
private static _asFormatted()
in language-service/src/utils/uri.ts
45 13 2
private getContributedValueCompletions()
in language-service/src/services/yamlCompletion.ts
27 12 6
protected getFirstPropertyMatches()
in language-service/src/parser/jsonParser.ts
45 11 1
function addItemsToArrayNode()
in language-service/src/parser/yamlParser.ts
35 11 2
protected validateStringValue()
in language-service/src/parser/jsonParser.ts
27 10 3
public getNodePropertyValues()
in language-service/src/services/yamlTraversal.ts
29 10 4