Deep nesting makes code hard to read and hard to reason about.
Currently Clayton only offers a rule to check for nested if, but there are other things which cause deep nesting such as for, while, try, inner classes.
The rule should not care about “if” only about the depth of the nesting.
Ideally, the rule should only allow blocks within methods to be two levels deep, but allow a third level for catching exceptions (though other subscribers of course might set other limits).
Also, it should be possible to limit the nesting not just of code blocks but also of expressions within parenthesis.