golang / text
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 2,205 units with 33,072 lines of code in units (6.1% of code).
    • 2 very complex units (410 lines of code)
    • 43 complex units (3,974 lines of code)
    • 190 medium complex units (9,828 lines of code)
    • 236 simple units (6,179 lines of code)
    • 1,734 very simple units (12,681 lines of code)
1% | 12% | 29% | 18% | 38%
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
go1% | 12% | 29% | 18% | 38%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
date90% | 0% | 0% | 0% | 9%
message5% | 18% | 15% | 24% | 35%
internal0% | 12% | 32% | 16% | 39%
encoding0% | 32% | 40% | 9% | 18%
unicode0% | 7% | 28% | 23% | 40%
language0% | 15% | 18% | 16% | 50%
feature0% | 43% | 15% | 23% | 16%
currency0% | 20% | 16% | 13% | 48%
secure0% | 5% | 47% | 11% | 35%
collate0% | 2% | 18% | 21% | 56%
cases0% | 4% | 32% | 25% | 37%
search0% | 21% | 0% | 6% | 71%
width0% | 0% | 62% | 6% | 31%
transform0% | 0% | 57% | 8% | 33%
runes0% | 0% | 46% | 33% | 20%
ROOT0% | 0% | 16% | 64% | 18%
cmd0% | 0% | 0% | 39% | 60%
number0% | 0% | 0% | 41% | 58%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func buildCLDRTree()
in date/gen.go
250 72 2
func()
in message/print.go
160 52 1
func matchPlural()
in feature/plural/plural.go
60 44 5
func()
in encoding/japanese/iso2022jp.go
125 41 1
func printCharInfoTables()
in unicode/norm/maketables.go
125 39 1
func()
in internal/export/idna/idna10.0.0.go
79 39 1
func()
in secure/precis/profile.go
83 39 1
func genSymbols()
in internal/number/gen.go
168 38 2
func()
in internal/language/gen.go
148 38 1
68 37 1
func()
in internal/language/gen.go
80 36 1
func()
in language/match.go
83 36 1
func()
in internal/format/parser.go
128 35 1
func()
in encoding/simplifiedchinese/hzgb2312.go
99 35 1
func addTags()
in internal/language/match.go
100 34 1
func()
in internal/export/idna/idna9.0.0.go
69 33 1
func()
in encoding/traditionalchinese/big5.go
72 33 1
func()
in unicode/bidi/core.go
80 32 1
func()
in internal/language/gen.go
148 32 1
func main()
in encoding/internal/identifier/gen.go
93 32 0