microsoft / typescript-lit-html-plugin
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 55 units with 797 lines of code in units (90.0% of code).
    • 1 very long units (102 lines of code)
    • 0 long units (0 lines of code)
    • 8 medium size units (266 lines of code)
    • 20 small units (275 lines of code)
    • 26 very small units (154 lines of code)
12% | 0% | 33% | 34% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts12% | 0% | 33% | 34% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src12% | 0% | 33% | 34% | 19%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function getDocumentRegions()
in src/embeddedSupport.ts
102 15 2
function getEmbeddedDocument()
in src/embeddedSupport.ts
44 5 4
public getFormattingEditsForRange()
in src/html-template-language-service.ts
41 6 4
function translateionCompletionItemKind()
in src/html-template-language-service.ts
41 19 2
private getCompletionItems()
in src/html-template-language-service.ts
37 5 2
private translateHover()
in src/html-template-language-service.ts
30 5 3
public create()
in src/index.ts
28 2 1
function substituteWithWhitespace()
in src/embeddedSupport.ts
23 4 6
public getCompletionEntryDetails?()
in src/html-template-language-service.ts
22 3 3
public createVirtualDocument()
in src/virtual-document-provider.ts
19 2 2
private translateOutliningSpan()
in src/html-template-language-service.ts
18 3 2
function getLanguageAtPosition()
in src/embeddedSupport.ts
17 4 3
public getQuickInfoAtPosition()
in src/html-template-language-service.ts
17 4 2
function translateCompetionEntry()
in src/html-template-language-service.ts
17 3 3
export function getSubstitutions()
in src/substitutions.ts
16 1 5
public toOffset()
in src/substitutions.ts
15 5 1
public getJsxClosingTagAtPosition()
in src/html-template-language-service.ts
14 2 2
public getCached()
in src/html-template-language-service.ts
13 6 2
function translateCompletionItemsToCompletionEntryDetails()
in src/html-template-language-service.ts
13 2 2
public toPosition()
in src/substitutions.ts
13 3 1