microsoft / vscode-nls-dev
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 65 units with 1,147 lines of code in units (74.0% of code).
    • 1 very long units (190 lines of code)
    • 1 long units (99 lines of code)
    • 15 medium size units (494 lines of code)
    • 15 small units (217 lines of code)
    • 33 very small units (147 lines of code)
16% | 8% | 43% | 18% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts16% | 8% | 43% | 18% | 12%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src16% | 8% | 43% | 18% | 12%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function analyze()
in src/lib.ts
190 47 3
public apply()
in src/lib.ts
99 33 1
function()
in src/main.ts
46 9 2
44 11 2
static parse()
in src/main.ts
43 9 1
40 7 2
38 7 1
37 10 4
37 7 0
33 10 5
28 5 3
function()
in src/main.ts
28 5 2
27 6 0
26 6 2
constructor()
in src/lib.ts
25 6 2
public addFile()
in src/main.ts
21 6 3
module.exports = function()
in src/webpack-loader.ts
21 6 4
20 5 1
19 7 2
18 5 1