microsoft / vscode-azurearmtools
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 1,221 units with 12,490 lines of code in units (78.8% of code).
    • 0 very complex units (0 lines of code)
    • 7 complex units (821 lines of code)
    • 40 medium complex units (1,921 lines of code)
    • 90 simple units (2,427 lines of code)
    • 1,084 very simple units (7,321 lines of code)
0% | 6% | 15% | 19% | 58%
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% | 6% | 15% | 19% | 58%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/language0% | 12% | 17% | 15% | 54%
src0% | 17% | 10% | 17% | 54%
src/documents0% | 3% | 15% | 21% | 59%
src/vscodeIntegration0% | 0% | 30% | 11% | 58%
src/languageclient0% | 0% | 22% | 41% | 36%
src/visitors0% | 0% | 12% | 13% | 73%
src/acquisition0% | 0% | 100% | 0% | 0%
src/util0% | 0% | 5% | 16% | 78%
src/snippets0% | 0% | 0% | 30% | 69%
ROOT0% | 0% | 0% | 24% | 75%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public moveNext()
in src/language/json/JSON.ts
123 36 0
constructor()
in src/AzureRMTools.ts
213 32 1
public getReferenceSiteInfo()
in src/documents/positionContexts/TemplatePositionContext.ts
101 30 1
private updateOpenedDocument()
in src/AzureRMTools.ts
108 29 1
public moveNext()
in src/language/json/Tokenizer.ts
111 28 0
private getFunctionCallCompletions()
in src/documents/positionContexts/TemplatePositionContext.ts
70 27 4
private static parseFunctionCall()
in src/language/expressions/TLE.ts
95 26 2
private getExtractVarParamCodeActions()
in src/documents/templates/DeploymentTemplateDoc.ts
53 23 1
public readToken()
in src/language/expressions/TLE.ts
74 23 0
private static parseExpression()
in src/language/expressions/TLE.ts
72 20 2
public static create()
in src/documents/templates/ChildTemplateCodeLens.ts
68 19 5
86 18 0
public formatCore()
in src/language/expressions/TLE.ts
45 18 2
public static getHighlightCharacterIndexes()
in src/language/expressions/TLE.ts
40 18 1
export async function selectParameterFile()
in src/documents/parameters/parameterFiles.ts
69 17 3
private getIconPath()
in src/vscodeIntegration/Treeview.ts
37 17 1
private getPropertyAccessCompletions()
in src/documents/positionContexts/TemplatePositionContext.ts
52 16 3
function splitExpressionIntoSegments()
in src/documents/templates/getResourcesInfo.ts
43 16 1
export function readNumber()
in src/language/json/JSON.ts
43 16 1
public getChildren()
in src/vscodeIntegration/Treeview.ts
37 16 1