aws-ia / terraform-aws-control_tower_account_factory
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 164 units with 1,738 lines of code in units (15.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 6 simple units (221 lines of code)
    • 158 very simple units (1,517 lines of code)
0% | 0% | 0% | 12% | 87%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 0% | 0% | 12% | 87%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
modules/aft-account-request-framework0% | 0% | 0% | 49% | 50%
modules/aft-feature-options0% | 0% | 0% | 9% | 90%
modules/aft-customizations0% | 0% | 0% | 14% | 85%
sources/scripts0% | 0% | 0% | 4% | 95%
sources/aft-lambda-layer0% | 0% | 0% | 0% | 100%
modules/aft-account-provisioning-framework0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lambda_handler()
in modules/aft-account-request-framework/lambda/aft-account-request-processor/aft_account_request_processor.py
54 9 5
def lambda_handler()
in modules/aft-account-request-framework/lambda/aft-account-request-action-trigger/aft_account_request_action_trigger.py
51 8 5
def get_pipeline_for_account()
in modules/aft-customizations/lambda/aft-customizations-execute-pipeline/aft_customizations_execute_pipeline.py
27 7 2
def lambda_handler()
in modules/aft-account-request-framework/lambda/aft-account-request-audit-trigger/aft_account_request_audit_trigger.py
40 7 5
def __handle_errors()
in sources/scripts/terraform_client.py
16 6 1
def lambda_handler()
in modules/aft-feature-options/lambda/aft-enable-cloudtrail/aft_enable_cloudtrail.py
33 6 5
def get_org_ou_names()
in sources/aft-lambda-layer/aft_common/aft_utils.py
25 5 1
def lambda_handler()
in modules/aft-account-provisioning-framework/lambda/aft-account-provisioning-framework-tag-account/aft_account_provisioning_framework_tag_account.py
28 5 5
def lambda_handler()
in modules/aft-feature-options/lambda/aft-delete-default-vpc/aft_delete_default_vpc.py
69 5 5
def lambda_handler()
in modules/aft-account-request-framework/lambda/aft-invoke-aft-account-provisioning-framework/aft_invoke_aft_account_provisioning_framework.py
38 5 5
def get_account_id_from_email()
in sources/aft-lambda-layer/aft_common/aft_utils.py
9 4 2
def get_all_aft_account_ids()
in sources/aft-lambda-layer/aft_common/aft_utils.py
20 4 1
def get_org_ou_id()
in sources/aft-lambda-layer/aft_common/aft_utils.py
22 4 2
def set_aws_credentials()
in sources/scripts/workspace_manager.py
67 4 4
def set_terraform_variables()
in sources/scripts/workspace_manager.py
30 4 3
def list_pipelines()
in modules/aft-customizations/lambda/aft-customizations-get-pipeline-executions/aft_customizations_get_pipeline_executions.py
15 4 1
def get_running_pipeline_count()
in modules/aft-customizations/lambda/aft-customizations-get-pipeline-executions/aft_customizations_get_pipeline_executions.py
21 4 2
def lambda_handler()
in modules/aft-feature-options/lambda/aft-enroll-support/aft_enroll_support.py
23 4 4
def get_default_vpc()
in modules/aft-feature-options/lambda/aft-delete-default-vpc/aft_delete_default_vpc.py
26 4 1
def modify_ct_request_is_valid()
in modules/aft-account-request-framework/lambda/aft-account-request-processor/aft_account_request_processor.py
11 4 2