Skip to main content

Module long_function

Module long_function 

Source
Expand description

long-function native rule — flags functions exceeding a line count threshold.

Uses tree-sitter tags queries to identify function boundaries and measures line span (end_line - start_line + 1).

§Configuration

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

[rules.rule."long-function"]
threshold = 50   # default: 100

Structs§

LongFunctionFinding
Serializable per-file finding for the long-function rule.
LongFunctionRule
Rule that flags functions exceeding a line count threshold.

Functions§

build_long_function_report
Build a DiagnosticsReport for the long-function rule.