Skip to main content

Module report

Module report 

Source
Expand description

Result types and language-agnostic aggregation (summary statistics and cross-file rankings). Output rendering lives in the CLI, not here.

Structs§

FileReport
Aggregated metrics for a single source file.
FunctionReport
Complexity metrics for a single function-like unit (function, method, arrow, accessor).
MetricSummary
Distribution of one metric over the population of all functions.
Report
Top-level output: per-file reports plus a whole-project summary.
Summary
Project-wide rollup across every function in every file.
TopEntry
One function in a flat cross-file ranking. Carries path/line so each row is locatable on its own (the per-file nesting is flattened away).
TopReport
Top-level output for --top-*: a flat ranking plus the whole-project summary.

Enums§

Metric
The complexity metric a ranking is ordered by.

Functions§

build_top_report
Assemble a TopReport from the per-file reports and a precomputed summary.
compute_summary
Build the whole-project summary. The population is every function at every nesting depth across all files (module-level totals are excluded). Call this before any display-only filtering so the distribution reflects all code.
compute_top
Build a flat ranking of the n most complex functions across all files, ordered by metric descending. Ties break by path then line for stable, reproducible output. Counts every function at every nesting depth.
for_each_function
Visit every function in a report tree (parents before children, all depths).