aws-samples / aws-codecommit-devops-model
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 7 units with 602 lines of code in units (68.0% of code).
    • 2 very long units (552 lines of code)
    • 0 long units (0 lines of code)
    • 0 medium size units (0 lines of code)
    • 3 small units (39 lines of code)
    • 2 very small units (11 lines of code)
91% | 0% | 0% | 6% | 1%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts91% | 0% | 0% | 6% | 1%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib97% | 0% | 0% | 2% | 0%
assets/approval-rule-template0% | 0% | 0% | 84% | 15%
assets/pr-build-events0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 7 longest units
Unit# linesMcCabe index# params
constructor()
in lib/codecommit-devops-model-stack.ts
421 2 3
constructor()
in lib/codecommit-policy.ts
131 1 3
function buildTemplateContent()
in assets/approval-rule-template/codecommit.ts
16 3 1
private toTagCondition()
in lib/codecommit-policy.ts
12 1 1
approvalRuleTemplateContent: buildTemplateContent()
in assets/approval-rule-template/codecommit.ts
11 3 1
function findEnvironmentByName()
in assets/pr-build-events/handler.ts
6 2 2
newRuleContent: buildTemplateContent()
in assets/approval-rule-template/codecommit.ts
5 2 1