Control statements are nested deeper than the configured maximum

tx0/sql:nesting-depthstrictwarningmaintainability/complexitydepth fastmaintainability

What it finds

Control statements nested deeply are hard to follow. IF, loops, CASE statements and TRY blocks count; a routine starts again at zero. The maximum is the parameter max, 5 by default, and the statement that goes past it is reported.

From the rule's source, nesting_depth.rs.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/sql:nesting-depth" = "warning"

To keep one finding, suppress it with a reason: tx0 suppress ID --reason "..." writes the comment for it.

tx0 explain tx0/sql:nesting-depth shows the same in the terminal. Found a false positive? Report it.