MEDIUM: checks: Use a non-comment rule iterator to get next rule

This kind of iteration is used several times with various degrees of
clarity. Make a proper function for this use.
1 file changed