anthropics / anthropic-cli
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 248 units with 4,551 lines of code in units (80.2% of code).
    • 2 very complex units (429 lines of code)
    • 2 complex units (404 lines of code)
    • 21 medium complex units (1,022 lines of code)
    • 44 simple units (1,126 lines of code)
    • 179 very simple units (1,570 lines of code)
9% | 8% | 22% | 24% | 34%
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
go9% | 8% | 22% | 24% | 34%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pkg16% | 15% | 18% | 20% | 28%
internal0% | 0% | 27% | 30% | 42%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
248 91 2
181 54 5
247 49 2
157 47 3
69 23 2
60 20 3
59 20 1
80 19 3
51 19 2
69 18 2
42 17 1
50 16 1
29 15 2
54 15 1
48 14 2
33 14 1
47 14 2
48 14 1
42 13 1
30 13 2
47 13 1
48 13 1
36 12 2
36 11 4
44 11 2
37 10 2
24 10 1
28 10 3
26 10 1
33 10 1
25 9 1
31 9 3
55 9 4
25 9 1
33 9 2
34 9 2
17 8 2
27 8 1
32 8 2
39 8 4
42 8 8
21 8 2
21 8 1
31 8 1
36 8 1
22 8 1
28 8 1
18 8 1
9 8 1
27 8 1