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

Sonar scan failing on non-existing include file #1149

Closed pvanbuijtene closed 1 hour ago

pvanbuijtene commented 3 hours ago

I'm currently busy with implementing SonarQube for our code base and running into the following issue:

16:13:48.421 ERROR Unable to parse file.p - Can't find include file 'get' from 'file.p'

I'm unable to link to our code base, but I found similar code here and it seems to be caused by:

  CASE (p_attr-name):    
    WHEN 'Type':U                THEN DO:
       {get ObjectType cType}.
       RETURN cType.
    END.

Tried to find the documentation about this get statement but not very lucky so far.

Looking at the lexer code I think there's something missing here: https://github.com/Riverside-Software/sonar-openedge/blob/develop/proparse/src/main/java/org/prorefactor/proparse/Lexer.java#L1589

Can also look into creating a PR if that would be the fastest way of fixing this.

kenherring commented 3 hours ago

The get and set files (and a few others) are usually in ${DLC}/tty/ or ${DLC}/src/ (or at least they are in my copy of 12.8.1 which I just looked at to confirm). Try adding one of those to your propath.

gquerret commented 2 hours ago

You can specify sonar.oe.dlc and sonar.oe.dlc.propath properties

pvanbuijtene commented 1 hour ago

I guess this shows I'm new to ABL 😅 thanks for the help.