cognitive_complexity
Updatedcomplexitywarn
A function whose branches score past [flux] cognitive_complexity.
Every if, elseif, else, loop, match, ternary, and, and or adds one, and a branch inside another adds its depth on top. A score past the limit means the function is hard to follow; split it where the deepest branches begin. The limit is cognitive_complexity in [flux], twenty-five by default.
Set its level in the [lint] table of alloy.toml, or for one file with --@alloy-lint.
