Expand description
Extract cyclomatic complexity per function, with source spans.
We use syn for two reasons beyond just getting a CC number: it gives
us the typed Rust AST with precise line spans for every function, and it
handles free functions, impl methods, and nested scopes uniformly via its
Visit trait. LCOV’s FN:line,name record only gives us the starting
line — the span has to come from the AST.
Structs§
- Function
Complexity - One function’s complexity, with enough location info to join against a coverage report later.
Functions§
- analyze_
file - Analyze a single Rust source file and return every function found.
- analyze_
tree - Walk a directory tree and analyze every
.rsfile, honoring.gitignore.