rules.yml, we define two rules: for-loop and no-while-loop. within these rules we define a few things:
...) is used to capture anything
$LST(list) capture the two parts of the for-loop declaration (the naming of these metavariables is irrelevant and could have been anything else).
Truefor the for-loop rule, we specify that we are expecting a match in order to pass that test.
…in the pattern) here, so that any code can be in the condition and inside the blocks of the if-statements. As an if-statement itself can also be part of this, we automatically catch code that has more than three nested if-statements with this pattern too.