microsoft / vscode-nls
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 31 units with 447 lines of code in units (69.0% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (119 lines of code)
    • 6 medium size units (172 lines of code)
    • 4 small units (70 lines of code)
    • 19 very small units (86 lines of code)
0% | 26% | 38% | 15% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 26% | 38% | 15% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/node0% | 31% | 39% | 18% | 11%
src/common0% | 0% | 43% | 0% | 56%
src/browser0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
67 22 1
52 15 0
40 10 2
function resolveLanguage()
in src/node/main.ts
31 9 1
function createNLSBundle()
in src/node/main.ts
29 7 2
function loadNlsBundle()
in src/node/main.ts
25 7 2
export function format()
in src/common/common.ts
24 8 2
23 6 1
18 4 1
18 4 1
function mkdir()
in src/node/main.ts
17 5 1
export function config()
in src/node/main.ts
17 6 1
9 2 1
9 2 1
8 2 1
function RAL()
in src/common/ral.ts
6 2 0
export function install()
in src/common/ral.ts
6 2 1
function touch()
in src/node/main.ts
5 1 1
export function config()
in src/browser/main.ts
4 1 1
export function is()
in src/common/common.ts
4 3 1