microsoft / vscode-emmet-helper
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 36 units with 829 lines of code in units (91.9% of code).
    • 1 very long units (115 lines of code)
    • 5 long units (344 lines of code)
    • 5 medium size units (157 lines of code)
    • 6 small units (106 lines of code)
    • 19 very small units (107 lines of code)
13% | 41% | 18% | 12% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts13% | 41% | 18% | 12% | 12%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src13% | 41% | 18% | 12% | 12%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function doComplete()
in src/emmetHelper.ts
115 42 4
87 14 3
75 21 4
function getFormatters()
in src/emmetHelper.ts
71 22 2
function addFinalTabStop()
in src/emmetHelper.ts
60 25 1
function getProfile()
in src/emmetHelper.ts
51 21 2
function isExpandedTextNoise()
in src/emmetHelper.ts
37 18 4
35 8 7
function updateSnippets()
in src/emmetHelper.ts
34 12 1
30 16 2
function getFilters()
in src/emmetHelper.ts
21 8 2
function getCurrentLine()
in src/emmetHelper.ts
19 5 2
export function normalizePath()
in src/fileService.ts
19 11 1
18 4 2
17 5 2
export function getEmmetMode()
in src/emmetHelper.ts
17 8 2
16 3 3
export function parseSnippets()
in src/configCompat.ts
9 2 1
function getClosingStyle()
in src/emmetHelper.ts
9 5 1
function getCurrentWord()
in src/emmetHelper.ts
8 3 1