bazelbuild / bazelisk
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 111 units with 1,478 lines of code in units (83.6% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (91 lines of code)
    • 2 medium complex units (99 lines of code)
    • 15 simple units (415 lines of code)
    • 93 very simple units (873 lines of code)
0% | 6% | 6% | 28% | 59%
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% | 7% | 8% | 30% | 53%
py0% | 0% | 0% | 19% | 80%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
core0% | 14% | 0% | 29% | 56%
httputil0% | 0% | 21% | 27% | 51%
versions0% | 0% | 71% | 0% | 28%
repositories0% | 0% | 0% | 55% | 44%
ROOT0% | 0% | 0% | 16% | 83%
platforms0% | 0% | 0% | 0% | 100%
runfiles0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func RunBazelisk()
in core/core.go
91 27 2
func Parse()
in versions/versions.go
48 15 2
func DownloadBinary()
in httputil/httputil.go
51 12 3
func()
in repositories/github.go
39 9 1
func GetEnvOrConfig()
in core/core.go
36 9 1
func migrate()
in core/core.go
58 9 3
func get()
in httputil/httputil.go
32 9 2
25 9 0
30 8 1
func()
in repositories/gcs.go
23 8 1
func()
in repositories/gcs.go
26 8 1
func getBazelVersion()
in core/core.go
31 8 0
func MaybeDownload()
in httputil/httputil.go
31 8 6
func()
in core/repositories.go
18 7 1
12 7 1
15 6 1
func CreateRepositories()
in core/repositories.go
29 6 6
10 6 0
func DetermineBazelFilename()
in platforms/platforms.go
23 5 2
func linkLocalBazel()
in core/core.go
19 5 2