Skip to main content

Module high_complexity

Module high_complexity 

Source
Expand description

high-complexity native rule — flags functions exceeding a cyclomatic complexity threshold.

Uses tree-sitter tags queries to identify functions and complexity queries (or the compute_complexity fallback) to measure cyclomatic complexity.

§Configuration

The threshold is configurable via .normalize/config.toml:

[rules.rule."high-complexity"]
threshold = 10   # default: 20

Structs§

HighComplexityFinding
Serializable per-file finding for the high-complexity rule.
HighComplexityRule
Rule that flags functions exceeding a cyclomatic complexity threshold.

Functions§

build_high_complexity_report
Build a DiagnosticsReport for the high-complexity rule.