aws / copilot-cli
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 3,907 units with 41,588 lines of code in units (68.7% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (445 lines of code)
    • 56 medium complex units (2,972 lines of code)
    • 295 simple units (8,677 lines of code)
    • 3,552 very simple units (29,494 lines of code)
0% | 1% | 7% | 20% | 70%
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% | 1% | 7% | 21% | 70%
js0% | 0% | 0% | 17% | 82%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
internal/pkg/cli0% | 2% | 6% | 23% | 67%
internal/pkg/term0% | 2% | 9% | 14% | 73%
internal/pkg/deploy0% | 0% | 14% | 21% | 63%
internal/pkg/manifest0% | 0% | 11% | 15% | 73%
internal/pkg/describe0% | 0% | 10% | 18% | 71%
internal/pkg/aws0% | 0% | 2% | 17% | 80%
internal/pkg/initialize0% | 0% | 23% | 7% | 69%
internal/pkg/stream0% | 0% | 17% | 27% | 54%
internal/pkg/ecs0% | 0% | 4% | 12% | 82%
internal/pkg/addon0% | 0% | 3% | 41% | 55%
cf-custom-resources/lib0% | 0% | 0% | 17% | 82%
internal/pkg/docker0% | 0% | 0% | 40% | 59%
internal/pkg/template0% | 0% | 0% | 19% | 80%
internal/pkg/workspace0% | 0% | 0% | 29% | 70%
internal/pkg/task0% | 0% | 0% | 34% | 65%
internal/pkg/logging0% | 0% | 0% | 40% | 59%
internal/pkg/config0% | 0% | 0% | 10% | 90%
internal/pkg/exec0% | 0% | 0% | 9% | 90%
internal/pkg/repository0% | 0% | 0% | 18% | 81%
internal/pkg/graph0% | 0% | 0% | 42% | 58%
internal/pkg/apprunner0% | 0% | 0% | 0% | 100%
cmd/copilot/template0% | 0% | 0% | 0% | 100%
cmd/copilot0% | 0% | 0% | 0% | 100%
internal/pkg/ini0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func newPackageSvcOpts()
in internal/pkg/cli/svc_package.go
174 33 1
func init()
in internal/pkg/term/prompt/prompt.go
83 29 0
func()
in internal/pkg/cli/task_run.go
69 27 1
func()
in internal/pkg/cli/svc_deploy.go
119 27 1
func()
in internal/pkg/manifest/validate.go
62 22 1
func()
in internal/pkg/term/selector/selector.go
89 22 1
func()
in internal/pkg/cli/deploy/deploy.go
96 21 1
func()
in internal/pkg/cli/job_logs.go
47 21 1
func()
in internal/pkg/deploy/cloudformation/stack/lb_web_svc.go
114 20 1
func()
in internal/pkg/cli/task_run.go
64 19 1
func()
in internal/pkg/cli/svc_logs.go
42 19 1
func()
in internal/pkg/manifest/validate.go
42 18 1
func()
in internal/pkg/manifest/validate.go
54 17 1
func()
in internal/pkg/cli/svc_init.go
40 17 1
func()
in internal/pkg/term/selector/selector.go
43 17 1
func()
in internal/pkg/deploy/cloudformation/stack/worker_svc.go
90 16 1
func()
in internal/pkg/manifest/validate.go
51 16 1
func()
in internal/pkg/cli/job_init.go
40 16 1
func()
in internal/pkg/cli/env_init.go
74 16 1
func()
in internal/pkg/cli/svc_package.go
74 16 1