awslabs / aws-managed-services
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 11 units with 307 lines of code in units (67.8% of code).
    • 1 very long units (136 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (80 lines of code)
    • 4 small units (71 lines of code)
    • 3 very small units (20 lines of code)
44% | 0% | 26% | 23% | 6%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py44% | 0% | 26% | 23% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
rules44% | 0% | 26% | 23% | 6%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
def match()
in cfn-lint-custom-rules/rules/AMSResourceSupported.py
136 11 2
def match()
in cfn-lint-custom-rules/rules/AMSRequiredSecretManagerAttributes.py
33 6 2
def match()
in cfn-lint-custom-rules/rules/AMSRequiredAttributes.py
25 7 2
def match()
in cfn-lint-custom-rules/rules/AMSResourceUnsupportedAttributes.py
22 5 2
def match()
in cfn-lint-custom-rules/rules/AMSRequiredAttributeValues.py
20 5 2
def validate_security_groups()
in cfn-lint-custom-rules/rules/AMSSecurityGroupIngress.py
19 9 3
def match()
in cfn-lint-custom-rules/rules/AMSManualVerificationRequired.py
18 3 2
def match_allowed_values()
in cfn-lint-custom-rules/rules/AMSRequiredAttributeValues.py
14 7 4
def match()
in cfn-lint-custom-rules/rules/AMSSecurityGroupIngress.py
10 2 2
def match()
in cfn-lint-custom-rules/rules/AMSAllowedRootKeys.py
8 4 2
def validate_security_group_rule()
in cfn-lint-custom-rules/rules/AMSSecurityGroupIngress.py
2 1 0