microsoft / vscode-cordova
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 343 units with 4,506 lines of code in units (74.8% of code).
    • 2 very long units (289 lines of code)
    • 12 long units (860 lines of code)
    • 37 medium size units (1,156 lines of code)
    • 75 small units (1,102 lines of code)
    • 217 very small units (1,099 lines of code)
6% | 19% | 25% | 24% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts6% | 17% | 25% | 24% | 24%
js0% | 59% | 19% | 10% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/debugger19% | 25% | 36% | 12% | 6%
src/utils0% | 18% | 14% | 34% | 33%
ROOT0% | 59% | 19% | 10% | 10%
src0% | 26% | 39% | 17% | 17%
src/utils/android0% | 20% | 31% | 26% | 20%
src/extension0% | 15% | 19% | 17% | 48%
src/debugger/cdp-proxy0% | 0% | 23% | 46% | 29%
src/common/node0% | 0% | 0% | 39% | 60%
src/utils/log0% | 0% | 0% | 0% | 100%
src/common0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private startIonicDevServer()
in src/debugger/cordovaDebugSession.ts
169 43 2
private attachAndroid()
in src/debugger/cordovaDebugSession.ts
120 23 1
protected launchRequest()
in src/debugger/cordovaDebugSession.ts
95 25 3
public static determineIonicMajorVersion()
in src/utils/cordovaProjectHelper.ts
93 28 1
84 9 4
private launchIos()
in src/debugger/cordovaDebugSession.ts
81 23 3
private attachIos()
in src/debugger/cordovaDebugSession.ts
79 13 1
protected attachRequest()
in src/debugger/cordovaDebugSession.ts
75 14 3
74 12 1
public static executeCordovaCommand()
in src/utils/cordovaCommandHelper.ts
60 8 3
public static nvmSupport()
in src/utils/nodeVersionHelper.ts
58 20 1
protected async launchSimulator()
in src/utils/android/androidTargetManager.ts
57 6 1
public getPackage()
in src/extension/simulate.ts
53 9 0
private async resolveAndroidTarget()
in src/debugger/cordovaDebugSession.ts
51 19 2
export function cordovaRunCommand()
in src/debugger/extension.ts
49 12 5
public launchServer()
in src/extension/simulate.ts
47 12 3
private async cleanUp()
in src/debugger/cordovaDebugSession.ts
46 7 1
private launchSimulate()
in src/debugger/cordovaDebugSession.ts
45 4 3
44 14 1
private establishDebugSession()
in src/debugger/cordovaDebugSession.ts
44 5 2