aws-cloudformation / cloudformation-template-schema
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 59 units with 737 lines of code in units (68.0% of code).
    • 1 very long units (103 lines of code)
    • 2 long units (121 lines of code)
    • 7 medium size units (193 lines of code)
    • 12 small units (169 lines of code)
    • 37 very small units (151 lines of code)
13% | 16% | 26% | 22% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java13% | 16% | 26% | 22% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
java/aws/cfn/codegen/json17% | 20% | 23% | 18% | 19%
java/aws/cfn/codegen0% | 0% | 35% | 40% | 24%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void handleType()
in src/main/java/aws/cfn/codegen/json/Codegen.java
103 20 6
private void generatePerGroup()
in src/main/java/aws/cfn/codegen/json/Codegen.java
63 6 4
private void generate()
in src/main/java/aws/cfn/codegen/json/Codegen.java
58 6 3
private void validateGroups()
in src/main/java/aws/cfn/codegen/json/Config.java
36 3 0
public void generate()
in src/main/java/aws/cfn/codegen/json/Codegen.java
32 3 0
private void execute()
in src/main/java/aws/cfn/codegen/json/Main.java
28 10 0
public CfnSpecification loadSpecification()
in src/main/java/aws/cfn/codegen/SpecificationLoader.java
27 4 1
public SingleCfnSpecification loadSingleResourceSpecification()
in src/main/java/aws/cfn/codegen/SpecificationLoader.java
25 4 1
private void addPrimitiveType()
in src/main/java/aws/cfn/codegen/json/Codegen.java
24 5 2
private Map loadGroupsOutputLocation()
in src/main/java/aws/cfn/codegen/json/Codegen.java
21 8 1
private CfnSpecification loadSpecification()
in src/main/java/aws/cfn/codegen/json/Codegen.java
20 2 1
public Set findDiff()
in src/main/java/aws/cfn/codegen/CfnSpecification.java
17 2 1
public void validate()
in src/main/java/aws/cfn/codegen/CfnSpecification.java
16 3 0
public Builder mergeOverride()
in src/main/java/aws/cfn/codegen/json/Config.java
15 7 1
public SpecificationLoader()
in src/main/java/aws/cfn/codegen/SpecificationLoader.java
14 1 0
private String intrinsics()
in src/main/java/aws/cfn/codegen/json/Codegen.java
14 3 0
public boolean isIncluded()
in src/main/java/aws/cfn/codegen/json/GroupSpec.java
13 6 1
public Config build()
in src/main/java/aws/cfn/codegen/json/Config.java
13 1 0
private void addToPerGroupRoots()
in src/main/java/aws/cfn/codegen/json/Codegen.java
12 2 3
public void compile()
in src/main/java/aws/cfn/codegen/json/GroupSpec.java
12 5 0