SonarLint : Unable to analyze Cobol with IDMS


I use SonarLint for Cobol within an Eclipse. It works fine except that it does not analyze the source code when :

  • There is a cobol syntax error like for example “MOV” instead of “MOVE”
  • There are IDMS declarations like “COPY IDMS SOMETHING.”. I assume that the reason why it does not work with IDMS is that IDMS declaration are considered like cobol syntax error.

Is there something that can be done in order to make the analysis of source code containing IDMS possible ?


We (SonarSource) didn’t know about IDMS.
It seems to extend IBM Enterprise COBOL with a lot of specific statements thanks to a precompiler.
Making SonarLint/Qube/Cloud analyze code containing such syntax would require us to update our parser accordingly.
We don’t plan such effort, at least not in the short term.

Thanks for the reply.

I am surprised that syntax error in the code make the analyze impossible for Cobol source code since in Java, a syntax error does not impact the analysis.

I’m not sure what you mean.
I believe that the behavior is the same for Java and COBOL. When you save the file in Eclipse and your file is not syntactically valid (no parsing error), SonarLint does not report any change in the issues: no issue is created or removed. In other words, I think that SonarLint never reports any issue on a file which was never syntactically valid.

Here is an example with SonarLint for Java:

In your screenshot, your Java file is syntactically correct.
vod refers to an unknown type, but that’s not a syntax error and SonarLint is able to report issues.


Indeed it’s not a syntax error and a syntax error impact the analysis as well.

Thank you for your time.