File Complexity Overall
  • There are 97 files with units, with 18,523 lines of code.
    • 2 very complex files (McCabe index sum 251+; 1,891 lines of code)
    • 8 complex files (McCabe index sum 126-250; 5,053 lines of code)
    • 23 medium complex files (McCabe index sum 51-125; 7,774 lines of code)
    • 10 slightly complex files (McCabe index sum 26-50; 1,447 lines of code)
    • 54 simple files (McCabe index sum 1-25; 2,358 lines of code)
  • 12 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system10% | 27% | 41% | 7% | 12%
Legend:
251+
126-250
51-125
26-50
1-25


explore: grouped by folders | grouped by complexity
File Complexity per Extension
251+
126-250
51-125
26-50
1-25
go11% | 29% | 37% | 8% | 12%
py0% | 0% | 95% | 0% | 4%
cjs0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
internal25% | 24% | 28% | 6% | 14%
ROOT0% | 55% | 29% | 3% | 11%
auth0% | 34% | 39% | 20% | 5%
bedrock0% | 93% | 0% | 0% | 6%
scripts0% | 0% | 90% | 0% | 9%
packages0% | 0% | 60% | 16% | 22%
responses0% | 0% | 77% | 20% | 1%
azure0% | 0% | 100% | 0% | 0%
option0% | 0% | 82% | 0% | 17%
webhooks0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 50)

The McCabe index of a file grows with its size: per 100 lines tells a large but plain file from a dense one, and most complex unit whether the complexity sits in one unit or is spread over many.

File# lines# unitsMcCabe index
(sum)
per 100
lines
most complex
unit
decode.go
in internal/encoding/json
959 30 276 29 51
encode.go
in internal/encoding/json
932 49 260 28 47
788 34 243 31 50
805 40 216 27 22
requestconfig.go
in internal/requestconfig
764 45 202 26 57
589 35 177 30 33
auth.go
in bedrock
531 23 166 31 31
552 31 162 29 32
decoder.go
in internal/apijson
587 20 161 27 53
scanner.go
in internal/encoding/json
437 43 146 33 12
345 11 124 36 80
azure.go
in azure
534 30 117 22 12
encoder.go
in internal/apiform
487 23 112 23 24
connection.go
in packages/websocket
433 25 112 26 17
305 8 106 35 75
pagination.go
in packages/pagination
433 45 103 24 7
313 10 94 30 42
stream.go
in internal/encoding/json
336 21 89 26 24
custom_code_report.py
in scripts/castiron
949 25 88 9 18
encoder.go
in internal/apiquery
359 11 86 24 20
178 6 84 47 31
229 14 83 36 30
273 11 79 29 15
encoder.go
in internal/apijson
313 14 70 22 21
303 11 69 23 25
websocket.go
in internal/requestconfig
195 5 68 35 36
270 11 67 25 19
217 18 63 29 14
option_layers.go
in internal/requestconfig
240 24 63 26 12
286 24 58 20 15
custom_code_budget.py
in scripts/castiron
376 11 56 15 10
209 12 55 26 13
union.go
in internal/apijson
191 5 51 27 27
ssestream.go
in packages/ssestream
234 18 49 21 14
indent.go
in internal/encoding/json
141 7 47 33 19
origin.go
in internal/requestconfig
126 16 45 36 6
245 10 42 17 11
107 3 37 35 26
enum.go
in internal/apijson
115 5 36 31 15
149 6 34 23 19
106 6 33 31 9
polling.go
in root
127 6 32 25 7
port.go
in internal/apijson
97 1 29 30 29
68 2 25 37 22
provider_headers.go
in internal/requestconfig
98 4 24 24 13
111 4 24 22 15
option.go
in packages/param
85 11 23 27 4
60 2 23 38 16
retry_scope.go
in internal/requestconfig
114 12 22 19 4
encoder.go
in packages/param
87 5 22 25 9
About This Analysis
  • File complexity is the sum of the McCabe indexes (conditional complexity) of the units (methods, functions...) in a file.
  • Files are classified in five categories based on that sum: 1-25 (simple files), 26-50 (slightly complex files), 51-125 (medium complex files), 126-250 (complex files), 251+ (very complex files). The default bands are five times the unit complexity bands, as a file is a group of units.
  • Only main code files with units are classified. Files without units (languages without unit analysis, or files without functions) have no complexity to measure and are left out rather than counted as simple.
  • A very complex file holds many decisions, which often means it has too many responsibilities: a candidate to split, and a place where changes need more testing.
Learn more...