awslabs / tecli
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 215 units with 3,115 lines of code in units (43.6% of code).
    • 1 very complex units (185 lines of code)
    • 1 complex units (180 lines of code)
    • 16 medium complex units (853 lines of code)
    • 12 simple units (349 lines of code)
    • 185 very simple units (1,548 lines of code)
5% | 5% | 27% | 11% | 49%
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
go5% | 5% | 27% | 11% | 49%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cobra/controller12% | 11% | 27% | 14% | 33%
cobra/aid0% | 0% | 42% | 5% | 51%
box0% | 0% | 0% | 56% | 43%
helper0% | 0% | 0% | 7% | 92%
cobra/dao0% | 0% | 0% | 0% | 100%
cobra/view0% | 0% | 0% | 0% | 100%
cobra/cmd0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func workspaceRun()
in cobra/controller/workspace.go
185 53 2
func runRun()
in cobra/controller/run.go
180 50 2
func variableRun()
in cobra/controller/variable.go
87 24 2
func GetWorkspaceCreateOptions()
in cobra/aid/workspace.go
84 22 1
func GetOAuthClientCreateOptions()
in cobra/aid/oAuthClient.go
70 21 1
func GetWorkspaceUpdateOptions()
in cobra/aid/workspace.go
75 19 1
func sshKeyRun()
in cobra/controller/sshKey.go
63 17 2
func GetVariableCreateOptions()
in cobra/aid/variable.go
53 16 1
func configurationVersionRun()
in cobra/controller/configurationVersion.go
57 15 2
func sshKeyPreRun()
in cobra/controller/sshKey.go
34 13 2
func oAuthTokenRun()
in cobra/controller/oAuthToken.go
50 13 2
func GetVariableUpdateOptions()
in cobra/aid/variable.go
46 13 1
func GetCredentialProfileFlags()
in cobra/aid/configure.go
46 13 1
func UpdateCredentialProfile()
in cobra/aid/configure.go
22 13 2
func configureRun()
in cobra/controller/configure.go
42 12 2
func oAuthClientRun()
in cobra/controller/oAuthClient.go
47 12 2
func SetWorkspaceFlags()
in cobra/aid/workspace.go
41 12 1
func configureCreateCredentials()
in cobra/controller/configure.go
36 11 2
func main()
in box/gen.go
50 10 0
func configurationVersionPreRun()
in cobra/controller/configurationVersion.go
24 9 2