microsoft / vscode-jshint
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 37 units with 534 lines of code in units (83.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (149 lines of code)
    • 6 simple units (183 lines of code)
    • 29 very simple units (202 lines of code)
0% | 0% | 27% | 34% | 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
ts0% | 0% | 27% | 34% | 37%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
jshint0% | 0% | 100% | 0% | 0%
jshint-server/src0% | 0% | 8% | 43% | 48%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export async function activate()
in jshint/extension.ts
115 25 1
private readOptions()
in jshint-server/src/server.ts
34 12 1
function readJSHintFile()
in jshint-server/src/server.ts
33 9 2
async getLib()
in jshint-server/src/server.ts
42 8 0
private async validate()
in jshint-server/src/server.ts
23 8 1
function stripComments()
in jshint-server/src/server.ts
18 6 1
public excludes()
in jshint-server/src/server.ts
21 6 2
constructor()
in jshint-server/src/server.ts
46 6 0
private relativeTo()
in jshint-server/src/server.ts
10 5 2
private getEmbeddedJavascript()
in jshint-server/src/server.ts
23 5 1
function readJsonFile()
in jshint-server/src/server.ts
10 4 2
private makeDiagnostic()
in jshint-server/src/server.ts
18 4 1
private getSeverity()
in jshint-server/src/server.ts
6 4 1
private getMessage()
in jshint-server/src/server.ts
9 4 2
function locateFile()
in jshint-server/src/server.ts
12 3 2
private getGlobalPackageManagerPath()
in jshint-server/src/server.ts
7 3 1
private onInitialize()
in jshint-server/src/server.ts
6 3 1
private async lintContent()
in jshint-server/src/server.ts
6 3 2
public getOptions()
in jshint-server/src/server.ts
8 2 1
function getUserHome()
in jshint-server/src/server.ts
3 2 0