aws-ia / taskcat
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 360 units with 3,465 lines of code in units (53.2% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (217 lines of code)
    • 37 medium size units (1,004 lines of code)
    • 70 small units (1,002 lines of code)
    • 249 very small units (1,242 lines of code)
0% | 6% | 28% | 28% | 35%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 6% | 28% | 28% | 35%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
taskcat0% | 6% | 31% | 30% | 31%
taskcat/_cfn0% | 6% | 24% | 24% | 44%
taskcat/_cli_modules0% | 0% | 20% | 30% | 49%
taskcat/iam_policy0% | 0% | 37% | 42% | 19%
taskcat/testing0% | 0% | 0% | 0% | 100%
taskcat_plugin_testhook0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def write_logs()
in taskcat/_cfn/_log_stack_events.py
59 5 3
def _build_parser()
in taskcat/_cli_core.py
55 7 3
def transform_parameter()
in taskcat/_template_params.py
52 5 1
def parse_legacy_config()
in taskcat/_legacy_config.py
51 6 1
43 8 4
def _create_legacy_bucket_obj()
in taskcat/_config.py
36 6 4
def _recurse_submodules()
in taskcat/_cli_modules/deploy.py
35 10 3
def _policy_from_resource_types()
in taskcat/iam_policy/policy.py
34 5 2
def _find_children()
in taskcat/_cfn/template.py
34 12 1
def reduce_api_results()
in taskcat/_amiupdater.py
34 8 1
def get_tests()
in taskcat/_config.py
33 5 5
def _get_taskcat_stacks()
in taskcat/_cfn/threaded.py
30 8 3
def _s3_upload_file()
in taskcat/_s3_sync.py
30 11 5
def _dict_from_template()
in taskcat/_config.py
30 7 1
def create()
in taskcat/_dataclasses.py
30 8 1
def output_results()
in taskcat/_cfn_lint.py
29 12 1
def _import_stacks_per_client()
in taskcat/_cfn/threaded.py
28 14 4
def _get_params()
in taskcat/_cli_core.py
27 11 2
def evaluate_string()
in taskcat/_cfn/stack_url_helper.py
27 5 3
def s3_url_maker()
in taskcat/_common_utils.py
27 10 4