do1.StatementSkipList

A while ago we implented the StatementSkipList for rule do1.
I suggest we add BLOCK_LABEL to the default-list. Otherwise a DO without label is skipped, but one with label gives a warning.

run SetProlintProperty ("rules.do1.StatementSkipList", "CASE,DO,FOR,IF,REPEAT,BLOCK_LABEL").


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Also

I also noticed that the rule gives a warning on an empty block containing only a PROPARSEDIRECTIVE.
I came across this when the preprocessors "decide" there is nothing to put in the block. But rewriting the preprocessor directives was not usable. So we put a PROPARSEDIRECTIVE nowarn(emptyblock) in the block.
Now emptyblock no-longer gives the warning, but do1 does! It also gave it on the empty block. See below.

And furthermore, the rule gives a warning when "numchildren < 2" so also on empty blocks. Shouldn't this be changed to "= 1", the emptyblocks are the responsibility of the emptyblock-rule.