microsoft / vscode-references-view
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 89 units with 769 lines of code in units (60.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (166 lines of code)
    • 18 small units (251 lines of code)
    • 66 very small units (352 lines of code)
0% | 0% | 21% | 32% | 45%
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% | 21% | 32% | 45%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 32% | 20% | 47%
src/references0% | 0% | 28% | 43% | 28%
src/calls0% | 0% | 0% | 34% | 65%
src/types0% | 0% | 0% | 34% | 65%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
async setInput()
in src/tree.ts
49 11 1
constructor()
in src/tree.ts
41 5 1
async getTreeItem()
in src/references/model.ts
30 2 1
private _move()
in src/references/model.ts
24 7 2
async resolve()
in src/references/model.ts
22 3 0
private static _compareLocations()
in src/references/model.ts
18 9 2
private _show()
in src/highlights.ts
17 6 0
export function register()
in src/references/index.ts
16 1 2
get message()
in src/references/model.ts
16 6 0
async resolve()
in src/calls/model.ts
14 3 0
function updateShowReferences()
in src/references/index.ts
14 4 1
remove()
in src/references/model.ts
14 3 1
async getDocument()
in src/references/model.ts
14 6 1
update()
in src/tree.ts
14 3 1
async resolve()
in src/types/model.ts
14 3 0
function setCallsDirection()
in src/calls/index.ts
13 4 2
private _anchor()
in src/navigation.ts
13 4 0
async function copyCommand()
in src/references/index.ts
13 5 1
constructor()
in src/references/model.ts
13 5 1
13 4 2