awslabs / goformation
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 7,778 units with 82,351 lines of code in units (15.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 11 medium complex units (506 lines of code)
    • 903 simple units (33,130 lines of code)
    • 6,864 very simple units (48,715 lines of code)
0% | 0% | <1% | 40% | 59%
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
go0% | 0% | <1% | 40% | 59%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
generate0% | 0% | 40% | 21% | 37%
intrinsics0% | 0% | 39% | 20% | 39%
cloudformation/serverless0% | 0% | 3% | 33% | 63%
cloudformation/ec20% | 0% | 0% | 56% | 43%
cloudformation/sagemaker0% | 0% | 0% | 48% | 51%
cloudformation/iot0% | 0% | 0% | 53% | 46%
cloudformation/pinpoint0% | 0% | 0% | 55% | 44%
cloudformation/apigateway0% | 0% | 0% | 58% | 41%
cloudformation/glue0% | 0% | 0% | 52% | 47%
cloudformation/greengrass0% | 0% | 0% | 53% | 46%
cloudformation/servicecatalog0% | 0% | 0% | 60% | 39%
cloudformation/cloudformation0% | 0% | 0% | 59% | 40%
cloudformation/apigatewayv20% | 0% | 0% | 57% | 42%
cloudformation/rds0% | 0% | 0% | 59% | 40%
cloudformation/iam0% | 0% | 0% | 60% | 39%
cloudformation/cognito0% | 0% | 0% | 53% | 46%
cloudformation/appstream0% | 0% | 0% | 58% | 41%
cloudformation/wafregional0% | 0% | 0% | 57% | 42%
cloudformation/cloudfront0% | 0% | 0% | 47% | 52%
cloudformation/config0% | 0% | 0% | 56% | 43%
cloudformation/route53resolver0% | 0% | 0% | 60% | 39%
cloudformation/lambda0% | 0% | 0% | 55% | 44%
cloudformation/appsync0% | 0% | 0% | 54% | 45%
cloudformation/iotwireless0% | 0% | 0% | 55% | 44%
cloudformation/elasticache0% | 0% | 0% | 56% | 43%
cloudformation/datasync0% | 0% | 0% | 58% | 41%
cloudformation/redshift0% | 0% | 0% | 59% | 40%
cloudformation/ssm0% | 0% | 0% | 53% | 46%
cloudformation/gamelift0% | 0% | 0% | 54% | 45%
cloudformation/lightsail0% | 0% | 0% | 57% | 42%
cloudformation/appmesh0% | 0% | 0% | 32% | 67%
cloudformation/ecs0% | 0% | 0% | 44% | 55%
cloudformation/emr0% | 0% | 0% | 45% | 54%
cloudformation/iotsitewise0% | 0% | 0% | 52% | 47%
cloudformation/imagebuilder0% | 0% | 0% | 54% | 45%
cloudformation/opsworks0% | 0% | 0% | 54% | 45%
cloudformation/ses0% | 0% | 0% | 54% | 45%
cloudformation/waf0% | 0% | 0% | 56% | 43%
cloudformation/networkmanager0% | 0% | 0% | 60% | 39%
cloudformation/logs0% | 0% | 0% | 61% | 38%
cloudformation/autoscaling0% | 0% | 0% | 48% | 51%
cloudformation/wafv20% | 0% | 0% | 28% | 71%
cloudformation/quicksight0% | 0% | 0% | 32% | 67%
cloudformation/s30% | 0% | 0% | 38% | 61%
cloudformation/databrew0% | 0% | 0% | 43% | 56%
cloudformation/events0% | 0% | 0% | 52% | 47%
cloudformation/dms0% | 0% | 0% | 54% | 45%
cloudformation/cloudwatch0% | 0% | 0% | 54% | 45%
cloudformation/route530% | 0% | 0% | 56% | 43%
cloudformation/frauddetector0% | 0% | 0% | 56% | 43%
cloudformation/connect0% | 0% | 0% | 57% | 42%
cloudformation/appconfig0% | 0% | 0% | 58% | 41%
cloudformation/robomaker0% | 0% | 0% | 58% | 41%
cloudformation/guardduty0% | 0% | 0% | 59% | 40%
cloudformation/location0% | 0% | 0% | 60% | 39%
cloudformation/mediapackage0% | 0% | 0% | 46% | 53%
cloudformation/elasticloadbalancingv20% | 0% | 0% | 47% | 52%
cloudformation/backup0% | 0% | 0% | 55% | 44%
cloudformation/servicediscovery0% | 0% | 0% | 56% | 43%
cloudformation/mediaconnect0% | 0% | 0% | 57% | 42%
cloudformation/memorydb0% | 0% | 0% | 61% | 38%
cloudformation/neptune0% | 0% | 0% | 61% | 38%
cloudformation/lex0% | 0% | 0% | 36% | 63%
cloudformation/networkfirewall0% | 0% | 0% | 37% | 62%
cloudformation/iotanalytics0% | 0% | 0% | 37% | 62%
cloudformation/kinesisanalyticsv20% | 0% | 0% | 38% | 61%
cloudformation/acmpca0% | 0% | 0% | 45% | 54%
cloudformation/batch0% | 0% | 0% | 46% | 53%
cloudformation/pinpointemail0% | 0% | 0% | 52% | 47%
cloudformation/eks0% | 0% | 0% | 52% | 47%
cloudformation/nimblestudio0% | 0% | 0% | 53% | 46%
cloudformation/evidently0% | 0% | 0% | 53% | 46%
cloudformation/elasticbeanstalk0% | 0% | 0% | 55% | 44%
cloudformation/athena0% | 0% | 0% | 56% | 43%
cloudformation/ecr0% | 0% | 0% | 56% | 43%
cloudformation/s3outposts0% | 0% | 0% | 58% | 41%
cloudformation/route53recoveryreadiness0% | 0% | 0% | 58% | 41%
cloudformation/secretsmanager0% | 0% | 0% | 58% | 41%
cloudformation/route53recoverycontrol0% | 0% | 0% | 58% | 41%
cloudformation/refactorspaces0% | 0% | 0% | 58% | 41%
cloudformation/eventschemas0% | 0% | 0% | 59% | 40%
cloudformation/ivs0% | 0% | 0% | 60% | 39%
cloudformation/servicecatalogappregistry0% | 0% | 0% | 60% | 39%
cloudformation/docdb0% | 0% | 0% | 61% | 38%
cloudformation0% | 0% | 0% | <1% | 99%
cloudformation/medialive0% | 0% | 0% | 17% | 82%
cloudformation/kendra0% | 0% | 0% | 27% | 72%
cloudformation/codedeploy0% | 0% | 0% | 42% | 57%
cloudformation/kinesisanalytics0% | 0% | 0% | 43% | 56%
cloudformation/codebuild0% | 0% | 0% | 45% | 54%
cloudformation/groundstation0% | 0% | 0% | 46% | 53%
cloudformation/customerprofiles0% | 0% | 0% | 46% | 53%
cloudformation/codepipeline0% | 0% | 0% | 49% | 50%
cloudformation/amazonmq0% | 0% | 0% | 51% | 48%
cloudformation/transfer0% | 0% | 0% | 52% | 47%
cloudformation/timestream0% | 0% | 0% | 52% | 47%
cloudformation/lakeformation0% | 0% | 0% | 52% | 47%
cloudformation/efs0% | 0% | 0% | 55% | 44%
cloudformation/amplify0% | 0% | 0% | 55% | 44%
cloudformation/wisdom0% | 0% | 0% | 56% | 43%
cloudformation/globalaccelerator0% | 0% | 0% | 58% | 41%
cloudformation/macie0% | 0% | 0% | 58% | 41%
cloudformation/sso0% | 0% | 0% | 58% | 41%
cloudformation/iot1click0% | 0% | 0% | 59% | 40%
cloudformation/mediaconvert0% | 0% | 0% | 59% | 40%
cloudformation/panorama0% | 0% | 0% | 59% | 40%
cloudformation/sns0% | 0% | 0% | 60% | 39%
cloudformation/ce0% | 0% | 0% | 60% | 39%
cloudformation/dax0% | 0% | 0% | 60% | 39%
cloudformation/kms0% | 0% | 0% | 61% | 38%
cloudformation/inspector0% | 0% | 0% | 61% | 38%
cloudformation/appflow0% | 0% | 0% | 21% | 78%
cloudformation/dynamodb0% | 0% | 0% | 35% | 64%
cloudformation/iotevents0% | 0% | 0% | 36% | 63%
cloudformation/licensemanager0% | 0% | 0% | 39% | 60%
cloudformation/lookoutmetrics0% | 0% | 0% | 41% | 58%
cloudformation/amplifyuibuilder0% | 0% | 0% | 43% | 56%
cloudformation/budgets0% | 0% | 0% | 46% | 53%
cloudformation/stepfunctions0% | 0% | 0% | 50% | 49%
cloudformation/managedblockchain0% | 0% | 0% | 50% | 49%
cloudformation/applicationautoscaling0% | 0% | 0% | 50% | 49%
cloudformation/ssmincidents0% | 0% | 0% | 51% | 48%
cloudformation/cassandra0% | 0% | 0% | 54% | 45%
cloudformation/xray0% | 0% | 0% | 56% | 43%
cloudformation/devopsguru0% | 0% | 0% | 56% | 43%
cloudformation/ssmcontacts0% | 0% | 0% | 56% | 43%
cloudformation/fms0% | 0% | 0% | 57% | 42%
cloudformation/resiliencehub0% | 0% | 0% | 57% | 42%
cloudformation/workspaces0% | 0% | 0% | 58% | 41%
cloudformation/kinesis0% | 0% | 0% | 58% | 41%
cloudformation/s3objectlambda0% | 0% | 0% | 58% | 41%
cloudformation/directoryservice0% | 0% | 0% | 58% | 41%
cloudformation/certificatemanager0% | 0% | 0% | 58% | 41%
cloudformation/qldb0% | 0% | 0% | 60% | 39%
cloudformation/signer0% | 0% | 0% | 60% | 39%
cloudformation/kinesisvideo0% | 0% | 0% | 61% | 38%
cloudformation/sqs0% | 0% | 0% | 61% | 38%
cloudformation/forecast0% | 0% | 0% | 61% | 38%
cloudformation/aps0% | 0% | 0% | 61% | 38%
cloudformation/codeartifact0% | 0% | 0% | 61% | 38%
cloudformation/detective0% | 0% | 0% | 61% | 38%
cloudformation/kinesisfirehose0% | 0% | 0% | 20% | 79%
cloudformation/msk0% | 0% | 0% | 28% | 71%
cloudformation/dlm0% | 0% | 0% | 34% | 65%
cloudformation/elasticsearch0% | 0% | 0% | 37% | 62%
cloudformation/applicationinsights0% | 0% | 0% | 37% | 62%
cloudformation/opensearchservice0% | 0% | 0% | 38% | 61%
cloudformation/apprunner0% | 0% | 0% | 38% | 61%
cloudformation/auditmanager0% | 0% | 0% | 39% | 60%
cloudformation/fsx0% | 0% | 0% | 39% | 60%
cloudformation/fis0% | 0% | 0% | 39% | 60%
cloudformation/autoscalingplans0% | 0% | 0% | 42% | 57%
cloudformation/greengrassv20% | 0% | 0% | 42% | 57%
cloudformation/mwaa0% | 0% | 0% | 42% | 57%
cloudformation/synthetics0% | 0% | 0% | 44% | 55%
cloudformation/elasticloadbalancing0% | 0% | 0% | 44% | 55%
cloudformation/inspectorv20% | 0% | 0% | 45% | 54%
cloudformation/datapipeline0% | 0% | 0% | 47% | 52%
cloudformation/resourcegroups0% | 0% | 0% | 49% | 50%
cloudformation/healthlake0% | 0% | 0% | 53% | 46%
cloudformation/emrcontainers0% | 0% | 0% | 53% | 46%
cloudformation/codecommit0% | 0% | 0% | 53% | 46%
cloudformation/mediastore0% | 0% | 0% | 53% | 46%
cloudformation/cloudtrail0% | 0% | 0% | 53% | 46%
cloudformation/appintegrations0% | 0% | 0% | 53% | 46%
cloudformation/ask0% | 0% | 0% | 53% | 46%
cloudformation/accessanalyzer0% | 0% | 0% | 56% | 43%
cloudformation/finspace0% | 0% | 0% | 56% | 43%
cloudformation/codestar0% | 0% | 0% | 56% | 43%
cloudformation/codestarnotifications0% | 0% | 0% | 58% | 41%
cloudformation/codeguruprofiler0% | 0% | 0% | 58% | 41%
cloudformation/rum0% | 0% | 0% | 58% | 41%
cloudformation/cloud90% | 0% | 0% | 58% | 41%
cloudformation/opsworkscm0% | 0% | 0% | 58% | 41%
cloudformation/iotthingsgraph0% | 0% | 0% | 58% | 41%
cloudformation/lookoutvision0% | 0% | 0% | 61% | 38%
cloudformation/codestarconnections0% | 0% | 0% | 61% | 38%
cloudformation/sdb0% | 0% | 0% | 61% | 38%
cloudformation/cdk0% | 0% | 0% | 61% | 38%
cloudformation/rekognition0% | 0% | 0% | 61% | 38%
cloudformation/iotfleethub0% | 0% | 0% | 61% | 38%
cloudformation/securityhub0% | 0% | 0% | 61% | 38%
cloudformation/chatbot0% | 0% | 0% | 61% | 38%
cloudformation/iotcoredeviceadvisor0% | 0% | 0% | 61% | 38%
cloudformation/lookoutequipment0% | 0% | 0% | 61% | 38%
cloudformation/ram0% | 0% | 0% | 61% | 38%
cloudformation/codegurureviewer0% | 0% | 0% | 61% | 38%
cloudformation/cur0% | 0% | 0% | 61% | 38%
ROOT0% | 0% | 0% | 0% | 100%
cloudformation/utils0% | 0% | 0% | 0% | 100%
example/go-to-yaml0% | 0% | 0% | 0% | 100%
cloudformation/tags0% | 0% | 0% | 0% | 100%
example/yaml-to-go0% | 0% | 0% | 0% | 100%
cloudformation/global0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func search()
in intrinsics/intrinsics.go
53 19 3
func()
in generate/generate.go
90 16 1
func Ref()
in intrinsics/ref.go
33 14 3
func()
in cloudformation/serverless/function_properties.go
44 14 1
func()
in generate/generate.go
53 13 1
func FnFindInMap()
in intrinsics/fnfindinmap.go
28 13 3
func FnJoin()
in intrinsics/fnjoin.go
35 12 3
func()
in generate/property.go
28 11 1
func()
in generate/generate.go
38 11 1
func()
in generate/generate.go
69 11 1
func FnSub()
in intrinsics/fnsub.go
35 11 3
func()
in cloudformation/autoscaling/aws-autoscaling-autoscalinggroup.go
45 10 1
func overrideParameters()
in intrinsics/intrinsics.go
18 9 2
func()
in cloudformation/cloudformation/aws-cloudformation-waitcondition.go
41 9 1
func()
in cloudformation/lambda/aws-lambda-alias.go
41 9 1
func()
in cloudformation/ec2/aws-ec2-instance.go
41 9 1
func()
in generate/property.go
11 8 1
func()
in cloudformation/synthetics/aws-synthetics-canary.go
37 8 1
func()
in cloudformation/codebuild/aws-codebuild-sourcecredential.go
37 8 1
func()
in cloudformation/codebuild/aws-codebuild-reportgroup.go
37 8 1