awslabs / yesiscan
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 133 units with 1,711 lines of code in units (81.7% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (160 lines of code)
    • 9 medium complex units (608 lines of code)
    • 11 simple units (299 lines of code)
    • 112 very simple units (644 lines of code)
0% | 9% | 35% | 17% | 37%
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% | 9% | 35% | 17% | 37%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
iterator0% | 35% | 24% | 25% | 14%
lib0% | 0% | 81% | 6% | 11%
backend0% | 0% | 79% | 0% | 20%
cmd/yesiscan0% | 0% | 69% | 0% | 30%
interfaces0% | 0% | 58% | 39% | 1%
parser0% | 0% | 0% | 94% | 6%
util/licenses0% | 0% | 0% | 49% | 50%
util0% | 0% | 0% | 77% | 22%
util/safepath0% | 0% | 0% | 6% | 93%
util/errwrap0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in iterator/git.go
160 32 1
func()
in iterator/fs.go
84 25 1
func()
in lib/lib.go
109 22 1
func()
in lib/lib.go
84 19 1
func Main()
in cmd/yesiscan/main.go
102 17 5
func()
in iterator/git.go
29 13 1
func()
in backend/licenseclassifier.go
53 13 1
func SimpleResults()
in lib/results.go
59 11 2
func MergeResultSets()
in interfaces/interfaces.go
30 11 2
func()
in backend/spdxclassifier.go
58 11 1
func()
in iterator/fs.go
45 10 1
func SkipPath()
in iterator/iterator.go
28 10 2
func()
in iterator/git.go
17 9 1
func()
in lib/lib.go
20 8 1
func()
in interfaces/interfaces.go
20 8 1
func smartGithubURI()
in util/util.go
34 8 1
func ParseIntoPath()
in util/safepath/safepath.go
26 8 2
func decode()
in util/licenses/licenses.go
25 7 0
func getCommitFromRef()
in iterator/git.go
24 7 2
func()
in parser/parser.go
47 7 1