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

Detect missing NO-ERROR on FIND ... IF AVAILABLE #1108

Open lievendf opened 9 months ago

lievendf commented 9 months ago

When writing

FIND Order WHERE ... NO-LOCK.
IF AVAILABLE Order
THEN ...

Sonar should warn for a missing NO-ERROR, as the IF AVAILABLE will not be executed in case the record isn't found.

gquerret commented 9 months ago

Did you enable this rule ? https://sonar.riverside-software.fr/coding_rules?languages=oe&q=error&open=rssw-oe-main%3Aeu.rssw.antlr.proparse.checks.FindNoError