microsoft / vscode-htmlhint
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 12 units with 169 lines of code in units (77.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (93 lines of code)
    • 3 small units (42 lines of code)
    • 5 very small units (34 lines of code)
0% | 0% | 55% | 24% | 20%
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% | 55% | 24% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
htmlhint-server/src0% | 0% | 48% | 28% | 23%
htmlhint0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 12 longest units
Unit# linesMcCabe index# params
function getConfiguration()
in htmlhint-server/src/server.ts
24 13 1
function doValidate()
in htmlhint-server/src/server.ts
24 5 2
function getRange()
in htmlhint-server/src/server.ts
23 8 2
export function activate()
in htmlhint/extension.ts
22 1 1
function findConfigForHtmlFile()
in htmlhint-server/src/server.ts
20 7 1
function loadConfigurationFile()
in htmlhint-server/src/server.ts
11 3 1
function validateAllTextDocuments()
in htmlhint-server/src/server.ts
11 2 2
function getErrorMessage()
in htmlhint-server/src/server.ts
9 4 2
function makeDiagnostic()
in htmlhint-server/src/server.ts
8 1 2
range: getRange()
in htmlhint-server/src/server.ts
7 2 2
function validateTextDocument()
in htmlhint-server/src/server.ts
7 2 2
function trace()
in htmlhint-server/src/server.ts
3 1 2