microsoft / typescript-styled-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 53 units with 616 lines of code in units (89.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (153 lines of code)
    • 22 small units (311 lines of code)
    • 26 very small units (152 lines of code)
0% | 0% | 24% | 50% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 0% | 24% | 50% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 24% | 50% | 24%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function translateCompletionItemKind()
in src/_language-service.ts
41 19 2
private getCompletionItems()
in src/_language-service.ts
31 7 2
private translateHover()
in src/_language-service.ts
29 5 3
private translateDiagnostic()
in src/_language-service.ts
26 5 5
26 3 2
private translateCodeActions()
in src/_language-service.ts
19 5 2
public getCompletionEntryDetails()
in src/_language-service.ts
18 2 3
private translateOutliningSpan()
in src/_language-service.ts
18 3 2
17 1 2
16 1 4
public create()
in src/_plugin.ts
16 2 1
16 5 3
public getOutliningSpans()
in src/_language-service.ts
15 2 1
function translateSeverity()
in src/_language-service.ts
15 5 2
displayParts: toDisplayParts()
in src/_language-service.ts
14 1 1
public getCodeFixesAtPosition()
in src/_language-service.ts
14 1 3
category: translateSeverity()
in src/_language-service.ts
14 1 2
public getCached()
in src/_language-service.ts
13 6 2
13 2 2
kindModifiers: getKindModifiers()
in src/_language-service.ts
13 1 1