cdklabs / cdk-pipelines-github
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 17 units with 364 lines of code in units (58.1% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (56 lines of code)
    • 6 medium size units (212 lines of code)
    • 5 small units (64 lines of code)
    • 5 very small units (32 lines of code)
0% | 15% | 58% | 17% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 15% | 58% | 17% | 8%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 15% | 58% | 17% | 8%
Alternative Visuals
Longest Units
Top 17 longest units
Unit# linesMcCabe index# params
private jobForScriptStep()
in src/pipeline.ts
56 5 2
protected doBuildPipeline()
in src/pipeline.ts
43 9 0
private jobForDeploy()
in src/pipeline.ts
43 7 3
private jobForBuildStep()
in src/pipeline.ts
43 6 2
35 2 3
constructor()
in src/pipeline.ts
24 4 3
private jobForNode()
in src/pipeline.ts
24 11 2
function snakeCaseKeys()
in src/pipeline.ts
16 8 2
13 2 1
13 2 1
private insertJobOutputs()
in src/pipeline.ts
11 2 1
11 3 1
private findStackOfOutput()
in src/pipeline.ts
8 4 2
private renderJobOutputs()
in src/pipeline.ts
7 2 1
private addJobOutput()
in src/pipeline.ts
7 2 2
private stepsToCheckout()
in src/pipeline.ts
6 1 0
on: snakeCaseKeys()
in src/pipeline.ts
4 1 2