microsoft / vscode-jshint
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 37 units with 534 lines of code in units (83.4% of code).
    • 1 very long units (115 lines of code)
    • 0 long units (0 lines of code)
    • 7 medium size units (222 lines of code)
    • 4 small units (59 lines of code)
    • 25 very small units (138 lines of code)
21% | 0% | 41% | 11% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts21% | 0% | 41% | 11% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
jshint100% | 0% | 0% | 0% | 0%
jshint-server/src0% | 0% | 52% | 14% | 32%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export async function activate()
in jshint/extension.ts
115 25 1
constructor()
in jshint-server/src/server.ts
46 6 0
async getLib()
in jshint-server/src/server.ts
42 8 0
private readOptions()
in jshint-server/src/server.ts
34 12 1
function readJSHintFile()
in jshint-server/src/server.ts
33 9 2
private getEmbeddedJavascript()
in jshint-server/src/server.ts
23 5 1
private async validate()
in jshint-server/src/server.ts
23 8 1
public excludes()
in jshint-server/src/server.ts
21 6 2
function stripComments()
in jshint-server/src/server.ts
18 6 1
private makeDiagnostic()
in jshint-server/src/server.ts
18 4 1
function locateFile()
in jshint-server/src/server.ts
12 3 2
private validateAll()
in jshint-server/src/server.ts
11 2 0
function readJsonFile()
in jshint-server/src/server.ts
10 4 2
private relativeTo()
in jshint-server/src/server.ts
10 5 2
private getMessage()
in jshint-server/src/server.ts
9 4 2
public getOptions()
in jshint-server/src/server.ts
8 2 1
private getGlobalPackageManagerPath()
in jshint-server/src/server.ts
7 3 1
private validateSingle()
in jshint-server/src/server.ts
7 2 1
constructor()
in jshint-server/src/server.ts
6 1 1
private match()
in jshint-server/src/server.ts
6 1 3