aws-cloudformation / rain
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 260 units with 3,887 lines of code in units (4.2% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (120 lines of code)
    • 15 medium complex units (756 lines of code)
    • 32 simple units (912 lines of code)
    • 212 very simple units (2,099 lines of code)
0% | 3% | 19% | 23% | 54%
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% | 3% | 19% | 23% | 54%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
internal/ui0% | 38% | 19% | 29% | 13%
internal/cmd0% | 0% | 25% | 20% | 53%
cft/build0% | 0% | 67% | 23% | 9%
cft/graph0% | 0% | 50% | 0% | 49%
internal/s11n0% | 0% | 48% | 34% | 16%
cft0% | 0% | 87% | 0% | 12%
cft/format0% | 0% | 24% | 53% | 22%
cft/spec0% | 0% | 14% | 7% | 77%
cft/parse0% | 0% | 37% | 0% | 62%
cft/pkg0% | 0% | 0% | 44% | 55%
internal/aws0% | 0% | 0% | 22% | 77%
cft/diff0% | 0% | 0% | 28% | 71%
internal/console0% | 0% | 0% | 7% | 92%
internal/node0% | 0% | 0% | 0% | 100%
cmd/aws-console0% | 0% | 0% | 0% | 100%
internal/config0% | 0% | 0% | 0% | 100%
cmd/cfn-format0% | 0% | 0% | 0% | 100%
cmd/rain0% | 0% | 0% | 0% | 100%
cmd/cfn-skeleton0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func stackResourceStatuses()
in internal/ui/stack.go
120 31 1
func matchPath()
in internal/s11n/match.go
58 22 3
func printGraph()
in internal/cmd/tree/util.go
50 21 2
func getParameters()
in internal/cmd/deploy/util.go
65 17 4
func checkIntegrity()
in cft/spec/internal/main.go
44 17 1
func GetStackSummary()
in internal/ui/stack.go
60 16 2
func()
in cft/build/build.go
51 16 1
func findRefs()
in cft/graph/util.go
54 16 1
func getLogs()
in internal/cmd/logs/util.go
48 15 2
func formatNode()
in cft/format/transform.go
53 15 1
func()
in cft/comments.go
56 14 1
func New()
in cft/graph/graph.go
43 14 1
func()
in cft/build/build.go
49 13 1
func filter()
in internal/s11n/match.go
32 12 2
func TransformNode()
in cft/parse/transform.go
40 12 1
func()
in cft/build/cfn.go
53 11 1
func CreateChangeSet()
in internal/aws/cfn/cfn.go
54 10 4
func handleS3()
in cft/pkg/rain.go
32 10 2
func zipPath()
in cft/pkg/util.go
48 10 1
func upload()
in cft/pkg/util.go
41 10 3