microsoft / vscode-languageserver-node
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,402 units with 13,681 lines of code in units (67.7% of code).
    • 2 very complex units (570 lines of code)
    • 3 complex units (383 lines of code)
    • 39 medium complex units (1,703 lines of code)
    • 102 simple units (2,159 lines of code)
    • 1,256 very simple units (8,866 lines of code)
4% | 2% | 12% | 15% | 64%
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% | 2% | 12% | 15% | 64%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
jsonrpc/src14% | 0% | 8% | 21% | 54%
client/src2% | <1% | 12% | 14% | 69%
server/src0% | 15% | 19% | 8% | 56%
protocol/src0% | 0% | 25% | 5% | 68%
types/src0% | 0% | 4% | 25% | 70%
textDocument/src0% | 0% | 0% | 48% | 51%
testbed/server0% | 0% | 0% | 21% | 78%
testbed/client0% | 0% | 0% | 0% | 100%
build/npm0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
protected createMessageTransports()
in client/src/node/main.ts
225 81 1
export function createMessageConnection()
in jsonrpc/src/common/connection.ts
345 62 4
export function createConnection()
in server/src/common/server.ts
213 38 1
function asCompletionItem()
in client/src/common/codeConverter.ts
60 33 2
public listen()
in server/src/common/proposed.notebooks.ts
110 30 1
constructor()
in client/src/common/proposed.diagnostic.ts
74 23 3
function asCompletionItem()
in client/src/common/protocolConverter.ts
50 23 4
function handleRequest()
in jsonrpc/src/common/connection.ts
47 23 1
function handleNotification()
in jsonrpc/src/common/connection.ts
64 23 1
public start()
in client/src/common/client.ts
112 22 0
function equalsMetadata()
in protocol/src/common/proposed.notebooks.ts
48 20 2
function _createConnection()
in server/src/node/main.ts
71 19 4
triggerKind: asSignatureHelpTriggerKind()
in client/src/common/codeConverter.ts
67 17 1
private async pullAsync()
in client/src/common/proposed.diagnostic.ts
55 17 1
console: combine()
in server/src/common/server.ts
35 17 3
tracer: combine()
in server/src/common/server.ts
34 17 3
telemetry: combine()
in server/src/common/server.ts
33 17 3
client: combine()
in server/src/common/server.ts
32 17 3
window: combine()
in server/src/common/server.ts
31 17 3
workspace: combine()
in server/src/common/server.ts
30 17 3