File Complexity Overall
  • There are 18 files with units, with 7,882 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 0 complex files (McCabe index sum 126-250; 0 lines of code)
    • 4 medium complex files (McCabe index sum 51-125; 3,744 lines of code)
    • 5 slightly complex files (McCabe index sum 26-50; 2,628 lines of code)
    • 9 simple files (McCabe index sum 1-25; 1,510 lines of code)
  • 11 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 47% | 33% | 19%
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
rs0% | 0% | 48% | 33% | 18%
cc0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
rust0% | 0% | 51% | 38% | 10%
builder0% | 0% | 40% | 25% | 33%
cpp0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 18)

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
configure.rs
in builder/src/build_rust_crate
1068 26 108 10 35
registry.rs
in rust/src
871 36 77 9 8
manifest.rs
in rust/src/lockfile_resolve
1013 22 61 6 11
resolve.rs
in rust/src
792 25 59 7 12
mod.rs
in rust/src/lockfile_resolve
1117 15 41 4 8
build.rs
in builder/src/build_rust_crate
440 6 39 9 9
533 17 31 6 14
cargo_config.rs
in rust/src
314 18 29 9 8
install.rs
in builder/src/build_rust_crate
224 8 28 13 7
cfg_eval.rs
in rust/src
188 21 21 11 1
plugin.cc
in cpp
92 5 17 18 10
doctest.rs
in builder/src/build_rust_crate
178 7 15 8 5
ffi.rs
in rust/src
220 5 9 4 5
rustc.rs
in builder/src/build_rust_crate
232 2 8 3 7
lockfile.rs
in rust/src
119 5 5 4 1
config.rs
in builder/src/build_rust_crate
296 4 4 1 1
main.rs
in builder/src
39 1 3 8 3
nextest.rs
in builder/src/build_rust_crate
146 1 1 1 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...