Riverside-Software / sonar-openedge

CABL (Code Analyzer for ABL in SonarQube) - ABL ANTLR4 Parser
https://riverside-software.fr
GNU Lesser General Public License v3.0
63 stars 26 forks source link

StatementOrder - can't suppres issue #1120

Closed clement-brodu closed 6 months ago

clement-brodu commented 7 months ago

Hello,

Versions:

The suppress preprocess does not have effect for StatementOrder rules.

I tried to write the suppress statement everywhere but it does not work:

image

image

{&_proparse_ prolint-nowarn(stmt_order)}
RUN foo.p.

{&_proparse_ prolint-nowarn(stmt_order)}
PROCEDURE proc1: {&_proparse_ prolint-nowarn(stmt_order)}
  // Content
END PROCEDURE.

{&_proparse_ prolint-nowarn(stmt_order)}
RUN bar.p. // Non-compliant 

PROCEDURE proc2:
  // Content
END PROCEDURE.
gquerret commented 6 months ago

Documentation is wrong, the correct directive is {&_proparse_ prolint-nowarn(statement_order)}. This code sample doesn't raise any issue:

RUN foo.p.

{&_proparse_ prolint-nowarn(statement_order)}
PROCEDURE proc1:
  // Content
END PROCEDURE.

RUN bar.p. // Non-compliant 

PROCEDURE proc2:
  // Content
END PROCEDURE.

Documentation has been updated.