File Complexity Overall
  • There are 22 files with units, with 2,332 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 1 complex files (McCabe index sum 126-250; 700 lines of code)
    • 1 medium complex files (McCabe index sum 51-125; 381 lines of code)
    • 2 slightly complex files (McCabe index sum 26-50; 374 lines of code)
    • 18 simple files (McCabe index sum 1-25; 877 lines of code)
  • 8 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 30% | 16% | 16% | 37%
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
go0% | 30% | 16% | 16% | 37%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
pkg0% | 83% | 0% | 0% | 16%
internal0% | 0% | 26% | 25% | 47%
cmd0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 22)

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
agent.pb.go
in pkg/v1
700 92 146 21 3
exec.go
in internal/rpc
381 9 85 22 54
vdagent.go
in internal/spice/vdagent
208 4 39 19 30
root.go
in internal/command
166 4 33 20 24
141 13 21 15 3
listener.go
in internal/vsock
102 6 19 19 6
diskresizer.go
in internal/diskresizer
114 3 18 16 7
execuser.go
in internal/execuser
50 1 12 24 12
exec_wrapper.go
in internal/rpc
45 2 10 22 8
conn.go
in internal/vsock
35 8 8 23 1
agentmessage.go
in internal/spice/vd
41 3 7 17 3
clipboard.go
in internal/spice/vd
44 3 7 16 3
vdi.go
in internal/spice/vdi
49 3 7 14 4
main.go
in cmd
40 2 6 15 4
resolveip.go
in internal/rpc
29 1 6 21 6
tart.go
in internal/tart
28 1 6 21 6
clipboardrequest.go
in internal/spice/vd
30 3 5 17 2
clipboardgrab.go
in internal/spice/vd
30 3 5 17 2
capability.go
in internal/spice/vd
28 3 5 18 2
version.go
in internal/version
23 1 4 17 4
rpc.go
in internal/rpc
37 2 3 8 2
addr.go
in internal/vsock
11 2 2 18 1
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...