aws-cloudformation / cloudformation-cli-go-plugin
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 139 units with 1,552 lines of code in units (72.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (63 lines of code)
    • 13 simple units (402 lines of code)
    • 125 very simple units (1,087 lines of code)
0% | 0% | 4% | 25% | 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% | 0% | 4% | 26% | 68%
py0% | 0% | 0% | 23% | 76%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cfn/encoding0% | 0% | 17% | 23% | 59%
cfn0% | 0% | 0% | 52% | 47%
cfn/scheduler0% | 0% | 0% | 41% | 58%
python/rpdk0% | 0% | 0% | 24% | 75%
cfn/callback0% | 0% | 0% | 19% | 80%
cfn/logging0% | 0% | 0% | 30% | 69%
cfn/cfnerr0% | 0% | 0% | 0% | 100%
cfn/metrics0% | 0% | 0% | 0% | 100%
cfn/handler0% | 0% | 0% | 0% | 100%
cfn/credentials0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func Stringify()
in cfn/encoding/stringify.go
63 20 1
func convertType()
in cfn/encoding/unstringify.go
25 9 2
func NewCloudWatchLogsProvider()
in cfn/logging/cloudwatchlogs.go
30 8 2
57 8 1
func()
in cfn/callback/callback.go
34 7 1
func()
in cfn/scheduler/scheduler_notag.go
44 7 1
func()
in cfn/scheduler/scheduler.go
44 7 1
def generate()
in python/rpdk/go/codegen.py
44 7 2
func newResponse()
in cfn/response.go
31 6 2
func convertInt()
in cfn/encoding/unstringify.go
21 6 2
func convertFloat64()
in cfn/encoding/unstringify.go
21 6 2
func Unstringify()
in cfn/encoding/unstringify.go
20 6 2
func router()
in cfn/cfn.go
16 6 2
def package()
in python/rpdk/go/codegen.py
15 6 3
func()
in cfn/callback/callback_notag.go
20 5 1
func TranslateOperationStatus()
in cfn/callback/callback_notag.go
14 5 1
func TranslateOperationStatus()
in cfn/callback/callback.go
14 5 1
func stringifyType()
in cfn/encoding/stringify.go
14 5 1
func convertSlice()
in cfn/encoding/unstringify.go
19 5 3
func convertMap()
in cfn/encoding/unstringify.go
19 5 3