File Complexity Overall
  • There are 384 files with units, with 48,844 lines of code.
    • 5 very complex files (McCabe index sum 251+; 7,146 lines of code)
    • 12 complex files (McCabe index sum 126-250; 8,196 lines of code)
    • 31 medium complex files (McCabe index sum 51-125; 9,488 lines of code)
    • 51 slightly complex files (McCabe index sum 26-50; 8,066 lines of code)
    • 285 simple files (McCabe index sum 1-25; 15,948 lines of code)
  • 11 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system14% | 16% | 19% | 16% | 32%
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
go14% | 17% | 19% | 16% | 32%
ts0% | 0% | 35% | 24% | 40%
py0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
internal14% | 17% | 18% | 16% | 32%
evals0% | 0% | 31% | 21% | 47%
cmd0% | 0% | 88% | 0% | 11%
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
metadata.go
in internal/flagutil
2085 92 689 33 37
output.go
in internal/output
1237 74 393 32 36
agent.go
in internal/sdk
1524 9 342 22 58
webhooks.go
in internal/sdk
1175 8 267 23 56
triggers.go
in internal/sdk
1125 7 253 22 56
interactive.go
in internal/interactive
845 32 235 28 34
files.go
in internal/sdk
1013 6 233 23 58
tui.go
in internal/explorer
806 31 219 27 35
json.go
in internal/sdk/sdkinternal/utils
640 11 200 31 65
flags.go
in internal/flagutil
576 46 194 34 27
credentials.go
in internal/sdk
836 6 192 23 47
diagnostics.go
in internal/client
621 31 183 29 28
classify.go
in internal/output
622 32 162 26 24
environments.go
in internal/sdk
696 5 158 23 47
interaction.go
in internal/sdk/models/interactions
592 61 132 22 12
root.go
in internal/cli
531 16 131 25 25
artifact.go
in internal/output
418 15 128 31 26
requestbody.go
in internal/sdk/sdkinternal/utils
439 9 119 27 31
stepdeltadata.go
in internal/sdk/models/interactions
582 31 113 19 56
media.go
in internal/cli/custom
464 18 110 24 18
models.go
in internal/sdk
481 3 107 22 58
async.go
in internal/output
379 15 104 27 32
porcelain.go
in internal/cli/custom
339 30 98 29 15
dispatch.go
in internal/flagutil
335 15 97 29 41
createagentinteraction.go
in internal/sdk/models/interactions
441 41 96 22 11
step.go
in internal/sdk/models/interactions
482 26 93 19 46
utils.go
in internal/sdk/sdkinternal/utils
315 25 89 28 10
transcribe.go
in internal/cli/custom
365 10 87 24 26
union.go
in internal/sdk/sdkinternal/utils
221 7 81 37 47
security.go
in internal/sdk/sdkinternal/utils
278 9 78 28 14
queryparams.go
in internal/sdk/sdkinternal/utils
270 12 75 28 22
files_upload.go
in internal/cli/custom
323 7 73 23 28
async.go
in internal/flagutil
193 9 73 38 19
retries.go
in internal/sdk/sdkinternal/utils
293 11 72 25 19
run.ts
in evals/harness-comparison/src
249 13 71 29 22
paginated.go
in internal/output
233 5 71 30 26
config.go
in internal/config
265 14 70 26 13
createmodelinteraction.go
in internal/sdk/models/interactions
298 29 67 22 8
rawhttp.go
in internal/cli/custom
254 12 65 26 19
intents.go
in internal/cli
266 12 64 24 23
preset.go
in internal/flagutil
210 8 64 30 28
tts.go
in internal/cli/custom
251 5 59 24 26
generationconfig.go
in internal/sdk/models/interactions
283 28 59 21 7
streaming.go
in internal/output
171 8 58 34 31
main.go
in cmd/gendocs
184 9 57 31 13
pretty.go
in internal/output
208 11 55 26 11
register.go
in internal/cli/custom
199 10 53 27 12
intent_video.go
in internal/cli/agent
217 3 52 24 39
environmentsfiles.go
in internal/sdk
232 2 50 22 49
stream.go
in internal/sdk/types/stream
259 9 50 19 32
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...