Skip to main content

Module metrics

Module metrics 

Source
Expand description

Per-metric implementations.

Each sub-module owns one metric — its Stats accumulator, the per-language trait implementations, and any small helpers used only by tests. Most callers will not need these directly; reach through CodeMetrics on a FuncSpace instead. Per-metric implementations.

Each submodule defines one maintainability metric, its per-language traits, and its Stats accumulator. See the crate-level docs for an overview of the metric suite.

Modules§

abc
Assignment / Branch / Condition counts.
cognitive
Cognitive complexity.
cyclomatic
Cyclomatic complexity.
exit
Exit-point counting.
halstead
Halstead suite (operators, operands, volume, difficulty, effort).
loc
Lines-of-code variants (SLOC, PLOC, LLOC, CLOC, blank).
mi
Maintainability Index.
nargs
Number of arguments per function.
nom
Number of methods (functions + closures).
npa
Number of public attributes.
npm
Number of public methods.
tokens
Token count.
wmc
Weighted Methods per Class.