bazelbuild / bazel-watcher
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 213 units with 2,170 lines of code in units (75.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (51 lines of code)
    • 26 simple units (747 lines of code)
    • 186 very simple units (1,372 lines of code)
0% | 0% | 2% | 34% | 63%
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% | 2% | 33% | 63%
js0% | 0% | 0% | 48% | 51%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ibazel0% | 0% | 9% | 38% | 52%
bazel0% | 0% | 0% | 41% | 58%
ibazel/output_runner0% | 0% | 0% | 63% | 36%
release/npm0% | 0% | 0% | 87% | 12%
example_client0% | 0% | 0% | 86% | 13%
ibazel/fswatcher0% | 0% | 0% | 42% | 57%
ibazel/profiler0% | 0% | 0% | 12% | 87%
ibazel/process_group0% | 0% | 0% | 25% | 74%
ibazel/command0% | 0% | 0% | 16% | 83%
ibazel/workspace0% | 0% | 0% | 44% | 55%
bazel/testing0% | 0% | 0% | 22% | 77%
ibazel/live_reload0% | 0% | 0% | 16% | 83%
ibazel/log0% | 0% | 0% | 0% | 100%
ibazel/lifecycle_hooks0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in ibazel/ibazel.go
51 20 1
func bazelNpmPath()
in bazel/bazel.go
20 10 1
func()
in ibazel/ibazel_unix.go
36 10 1
func bazeliskNpmPath()
in bazel/bazel.go
22 9 1
func newEvent()
in ibazel/fswatcher/fsevents/fsevents.go
25 9 2
func()
in ibazel/profiler/profiler.go
25 9 1
func()
in ibazel/ibazel.go
42 9 1
func()
in ibazel/process_group/process_group_windows.go
39 9 1
func main()
in example_client/example_client.go
70 8 0
func()
in bazel/bazel.go
30 8 1
func main()
in release/npm/generate_package.go
34 7 0
function getNativeBinary()
in release/npm/index.js
44 7 0
func()
in ibazel/fswatcher/fsnotify/fsnotify.go
28 7 1
func()
in ibazel/workspace/workspace.go
22 7 1
func()
in ibazel/ibazel.go
34 7 1
func()
in ibazel/ibazel.go
21 7 1
func()
in ibazel/output_runner/output_runner.go
25 7 1
func()
in bazel/testing/mock.go
20 6 1
func findBazel()
in bazel/bazel.go
18 6 0
func()
in ibazel/command/notify_command.go
31 6 1