kubernetes / publishing-bot
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 99 units with 2,139 lines of code in units (79.0% of code).
    • 1 very complex units (235 lines of code)
    • 1 complex units (137 lines of code)
    • 11 medium complex units (649 lines of code)
    • 11 simple units (279 lines of code)
    • 75 very simple units (839 lines of code)
10% | 6% | 30% | 13% | 39%
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
go10% | 6% | 30% | 13% | 39%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cmd/sync-tags37% | 0% | 26% | 3% | 32%
cmd/publishing-bot0% | 14% | 27% | 10% | 47%
cmd/init-repo0% | 0% | 60% | 0% | 39%
cmd/collapsed-kube-commit-mapper0% | 0% | 61% | 0% | 38%
pkg/git0% | 0% | 40% | 29% | 30%
pkg/golang0% | 0% | 57% | 42% | 0%
cmd/validate-rules0% | 0% | 0% | 100% | 0%
cmd/gomod-zip0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func main()
in cmd/sync-tags/main.go
235 63 0
func main()
in cmd/publishing-bot/main.go
137 39 0
func main()
in cmd/init-repo/main.go
77 22 0
func()
in cmd/publishing-bot/publisher.go
98 20 1
func()
in cmd/publishing-bot/publisher.go
73 19 1
func main()
in cmd/collapsed-kube-commit-mapper/main.go
58 14 0
69 14 3
func cleanCacheForTag()
in cmd/sync-tags/main.go
49 14 1
func ReportOnIssue()
in cmd/publishing-bot/github.go
49 12 6
func packageDepToGoModCache()
in cmd/sync-tags/gomod.go
52 12 5
func InstallGoVersions()
in pkg/golang/install.go
38 12 1
func MergePoints()
in pkg/git/mainline.go
50 12 2
func()
in cmd/publishing-bot/publisher.go
36 11 1
func SourceCommitToDstCommits()
in pkg/git/mapping.go
37 10 4
func fetchKubernetesStagingDirectoryFiles()
in cmd/validate-rules/staging/github_utils.go
38 9 1
func installGoVersion()
in pkg/golang/install.go
28 8 2
func()
in cmd/publishing-bot/publisher.go
31 7 1
func validateRepoOrder()
in cmd/publishing-bot/config/rules.go
19 7 1
func main()
in cmd/validate-rules/main.go
24 7 0
func()
in cmd/publishing-bot/publisher.go
23 6 1