angular / vscode-ng-language-service
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 163 units with 2,176 lines of code in units (48.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 33 medium size units (989 lines of code)
    • 49 small units (764 lines of code)
    • 81 very small units (423 lines of code)
0% | 0% | 45% | 35% | 19%
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% | 45% | 34% | 19%
js0% | 0% | 0% | 100% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
server/src0% | 0% | 49% | 34% | 16%
client/src0% | 0% | 45% | 33% | 21%
common0% | 0% | 0% | 51% | 48%
syntaxes/src0% | 0% | 0% | 68% | 31%
ROOT0% | 0% | 0% | 100% | 0%
integration/lsp0% | 0% | 0% | 26% | 73%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private createProjectService()
in server/src/session.ts
46 2 1
function getServerOptions()
in client/src/client.ts
43 14 2
42 19 3
40 8 2
private onSignatureHelp()
in server/src/session.ts
40 6 1
37 4 1
function main()
in server/src/server.ts
37 5 0
private handleProjectServiceEvent()
in server/src/session.ts
36 9 1
private onDidOpenTextDocument()
in server/src/session.ts
36 11 1
private async runNgcc()
in server/src/session.ts
36 8 1
private onInitialize()
in server/src/session.ts
35 4 1
function constructArgs()
in client/src/client.ts
34 5 2
private onRenameRequest()
in server/src/session.ts
32 7 1
private onHover()
in server/src/session.ts
32 8 1
31 6 1
private onCompletion()
in server/src/session.ts
30 7 1
private onCompletionResolve()
in server/src/session.ts
29 7 1
28 6 2
private getLSAndScriptInfo()
in server/src/session.ts
28 8 1
26 15 1