Skip to main content

inline_complexity

Function inline_complexity 

Source
pub fn inline_complexity(
    config: &ResolvedConfig,
    modules: &[ModuleInfo],
    files: &[DiscoveredFile],
) -> Vec<InlineComplexity>
Expand description

The functions of the parsed modules that are above a complexity threshold.

This applies the rules of the fallow health findings: health.ignore, the complexity suppression comments, the module-scope unit that never becomes a finding, and the effective thresholds of health.thresholdOverrides per file and function. It also applies the complexity-cyclomatic and complexity-cognitive rules with overrides[].rules for the file: a function whose cyclomatic and cognitive kinds are all off is dropped.

A lens covers only the cyclomatic and cognitive kinds. It has no CRAP score, so complexity-crap has no effect here. A function that the health report flags only through CRAP, or whose cyclomatic and cognitive rules are off while its CRAP rule is on, has a health finding but no lens.