Rule "do1" gives this warning when it finds a DO: ... END block that contains only one statement.
The statement will work without the DO/END block around it.
Actually, the rule only looks at DO/END blocks in the THEN or ELSE branches of an IF statement:
IF condition THEN DO: /* this block is inspected */ END. ELSE DO: /* this block is also inspected */ END. DO: /* this block is not inspected because it is not in a THEN or ELSE branch. */ END.
Furthermore, the rule does NOT raise a warning when the DO...END block contains an IF statement. That is because an IF statement inside an IF statement is usually hard to read but adding a DO...END block improves readability. So, you get a bonus for improving readability :-)
IF condition THEN DO: /* only 1 statement in the DO..END block but no warning, because it's an IF statement */ IF a=b THEN a = a + 8. ELSE a = b * b. END.
Likewise, the rule does not warn if the only statement is a CASE, FOR, DO or REPEAT statement. This list is set in prolint.properties.p (see property "rules.do1.StatementSkipList") so you can customize it.
the risc:
The DO/END-block wastes about 60 bytes in R-code and affects run-time performance.
how to solve this:
Just remove the DO: and END.