aws-samples / aws-iam-access-analyzer-samples
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 14 units with 179 lines of code in units (75.8% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (59 lines of code)
    • 6 small units (85 lines of code)
    • 6 very small units (35 lines of code)
0% | 0% | 32% | 47% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 23% | 54% | 22%
ts0% | 0% | 100% | 0% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
03-no-iac0% | 0% | 23% | 54% | 22%
04-cloudformation/02-cdk/lib0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 14 longest units
Unit# linesMcCabe index# params
def validate()
in 03-no-iac/analyze.py
36 8 0
constructor()
in 04-cloudformation/02-cdk/lib/demo-stack.ts
23 1 3
def get()
in 03-no-iac/access_preview.py
19 2 1
def get_access_preview_findings()
in 03-no-iac/analyze.py
15 5 2
def validate_policy()
in 03-no-iac/analyze.py
14 3 2
def _build_configuration()
in 03-no-iac/access_preview.py
13 1 2
def _build_configuration()
in 03-no-iac/access_preview.py
13 1 2
def _build_configuration()
in 03-no-iac/access_preview.py
11 1 2
def _build_configuration()
in 03-no-iac/access_preview.py
9 2 1
def create()
in 03-no-iac/access_preview.py
7 1 2
def list_findings()
in 03-no-iac/access_preview.py
7 1 1
def _get_resource_from_policy()
in 03-no-iac/access_preview.py
7 1 1
def get_count()
in 03-no-iac/analyze.py
3 4 2
def __init__()
in 03-no-iac/access_preview.py
2 1 1