angular / material-tools
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 78 units with 818 lines of code in units (59.1% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (52 lines of code)
    • 9 medium size units (262 lines of code)
    • 12 small units (180 lines of code)
    • 56 very small units (324 lines of code)
0% | 6% | 32% | 22% | 39%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 25% | 22% | 9% | 42%
ts0% | 0% | 35% | 26% | 38%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
scripts0% | 29% | 13% | 11% | 45%
lib/resolvers0% | 0% | 59% | 11% | 28%
lib/cli0% | 0% | 57% | 28% | 14%
lib/common0% | 0% | 30% | 0% | 69%
lib/virtual_context0% | 0% | 46% | 0% | 53%
lib/builders0% | 0% | 0% | 49% | 50%
lib0% | 0% | 0% | 90% | 9%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function init()
in scripts/release.js
52 10 0
45 1 1
static resolve()
in lib/resolvers/PackageResolver.ts
33 3 2
static resolve()
in lib/resolvers/DependencyResolver.ts
32 9 3
27 5 1
private static _downloadFile()
in lib/common/VersionDownloader.ts
27 2 2
static resolve()
in lib/resolvers/LocalResolver.ts
27 1 2
function SandboxRequire()
in lib/virtual_context/SandboxRequire.ts
25 5 1
function incrementVersion()
in scripts/release.js
23 5 1
function AngularModuleMock()
in lib/resolvers/isolated_angular.js
23 2 0
function runVersion()
in scripts/test-versions.js
20 3 1
function registerThemeArgs()
in lib/cli/commands.ts
18 1 1
constructor()
in lib/MaterialTools.ts
17 5 1
17 1 1
private _getLicense()
in lib/builders/MaterialBuilder.ts
17 1 1
static build()
in lib/builders/CSSBuilder.ts
17 2 1
static build()
in lib/builders/JSBuilder.ts
16 1 2
private _writeFile()
in lib/MaterialTools.ts
12 2 3
constructor()
in lib/builders/ThemeBuilder.ts
12 2 3
private _registerTheme()
in lib/builders/ThemeBuilder.ts
12 3 1