cdklabs / jsii-release
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 24 units with 265 lines of code in units (84.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (82 lines of code)
    • 6 small units (94 lines of code)
    • 15 very small units (89 lines of code)
0% | 0% | 30% | 35% | 33%
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% | 30% | 35% | 33%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/targets0% | 0% | 37% | 42% | 19%
src/help0% | 0% | 21% | 24% | 54%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private doRelease()
in src/targets/go.ts
32 6 2
private parseModule()
in src/targets/go.ts
28 8 1
export function run()
in src/help/shell.ts
22 4 2
constructor()
in src/targets/go.ts
20 4 1
public release()
in src/targets/go.ts
19 2 0
private syncRepo()
in src/targets/go.ts
16 4 1
private extractVersion()
in src/targets/go.ts
14 8 1
export function checkout()
in src/help/git.ts
14 5 2
export function tag()
in src/help/git.ts
11 3 1
private collectModules()
in src/targets/go.ts
10 3 1
private extractRepoURL()
in src/targets/go.ts
10 3 1
private buildReleaseMessage()
in src/targets/go.ts
9 3 1
export function diffIndex()
in src/help/git.ts
8 2 0
export function username()
in src/help/git.ts
8 2 0
export function email()
in src/help/git.ts
8 2 0
export function which()
in src/help/shell.ts
7 2 1
export function clone()
in src/help/git.ts
7 2 2
export function identify()
in src/help/git.ts
4 1 2
private buildTagName()
in src/targets/go.ts
3 2 1
3 1 0