microsoft / vscode-generator-code
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 58 units with 987 lines of code in units (65.7% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (141 lines of code)
    • 13 medium size units (436 lines of code)
    • 19 small units (261 lines of code)
    • 24 very small units (149 lines of code)
0% | 14% | 44% | 26% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 14% | 46% | 25% | 12%
ts0% | 0% | 0% | 37% | 62%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
app0% | 15% | 46% | 26% | 12%
app/templates/ext-notebook-renderer/src/client0% | 0% | 0% | 66% | 33%
app/templates/ext-command-js0% | 0% | 0% | 0% | 100%
app/templates/ext-command-ts/src0% | 0% | 0% | 0% | 100%
app/templates/ext-command-web/src/web0% | 0% | 0% | 0% | 100%
app/templates/ext-notebook-renderer/src/extension0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
async end()
in generators/app/index.js
86 26 0
function processContent()
in generators/app/generate-language.js
55 18 3
function convertTheme()
in generators/app/generate-colortheme.js
48 13 4
function migrate()
in generators/app/generate-colortheme.js
48 13 3
function convertGrammar()
in generators/app/generate-language.js
40 9 2
async function askForThemeInfo()
in generators/app/generate-colortheme.js
36 4 2
function askForSnippetsInfo()
in generators/app/generate-snippets.js
36 8 2
prompting: async()
in generators/app/generate-colortheme.js
34 1 2
async prompting()
in generators/app/index.js
34 7 0
function askForExtensionPackInfo()
in generators/app/generate-extensionpack.js
32 4 2
function convert()
in generators/app/generate-snippets.js
30 8 1
function getLatestVSCodeVersion()
in generators/app/env.js
28 7 0
async function askForNotebookRendererInfo()
in generators/app/generate-notebook-renderer.js
24 2 2
function convertTextMate()
in generators/app/generate-snippets.js
23 4 1
constructor()
in generators/app/index.js
23 2 2
function processContent()
in generators/app/generate-colortheme.js
19 5 4
function askForLanguageName()
in generators/app/generate-localization.js
18 3 2
async initializing()
in generators/app/index.js
18 4 0
prompting: async()
in generators/app/generate-command-js.js
16 1 2
function askForSnippetLanguage()
in generators/app/generate-snippets.js
16 3 2