microsoft / vscode-eslint
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 280 units with 3,686 lines of code in units (71.6% of code).
    • 4 very long units (804 lines of code)
    • 4 long units (282 lines of code)
    • 32 medium size units (881 lines of code)
    • 53 small units (755 lines of code)
    • 187 very small units (964 lines of code)
21% | 7% | 23% | 20% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts22% | 7% | 24% | 20% | 24%
tsx0% | 0% | 0% | 100% | 0%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
client/src35% | 0% | 19% | 22% | 22%
server/src14% | 12% | 27% | 19% | 25%
playgrounds/ts0% | 0% | 0% | 60% | 40%
playgrounds/7.00% | 0% | 0% | 0% | 100%
playgrounds/8.00% | 0% | 0% | 0% | 100%
playgrounds/7.0/build0% | 0% | 0% | 0% | 100%
playgrounds/7.0/subDir0% | 0% | 0% | 0% | 100%
playgrounds/8.0/build0% | 0% | 0% | 0% | 100%
playgrounds/8.0/subDir0% | 0% | 0% | 0% | 100%
playgrounds/noLib0% | 0% | 0% | 0% | 100%
playgrounds/noWD/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function realActivate()
in client/src/extension.ts
319 58 1
function resolveSettings()
in server/src/eslintServer.ts
171 65 1
configuration: async()
in client/src/extension.ts
162 53 3
private ComputeRecursionPoint()
in server/src/diff.ts
152 39 7
private WALKTRACE()
in server/src/diff.ts
95 18 18
async function computeAllFixes()
in server/src/eslintServer.ts
73 28 2
private PrettifyChanges()
in server/src/diff.ts
62 24 1
private ComputeDiffRecursive()
in server/src/diff.ts
52 14 5
private touch()
in server/src/linkedMap.ts
46 11 2
async function getSaveRuleConfig()
in server/src/eslintServer.ts
41 15 2
private processQueue()
in server/src/eslintServer.ts
41 13 0
const singleErrorHandlers:()
in server/src/eslintServer.ts
36 9 3
private doRunNext()
in client/src/utils.ts
32 6 0
function isUNC()
in server/src/eslintServer.ts
32 11 1
private removeItem()
in server/src/linkedMap.ts
32 9 1
public async update()
in client/src/extension.ts
31 4 0
function computeValidate()
in client/src/extension.ts
30 12 1
function validateSingle()
in server/src/eslintServer.ts
30 9 2
await withESLintClass()
in server/src/eslintServer.ts
30 16 1
public set()
in server/src/linkedMap.ts
28 6 3