# SonarLint : Unable to analyze Cobol with IDMS

**URL:** <https://community.sonarsource.com/t/sonarlint-unable-to-analyze-cobol-with-idms/10023>\
**Category:** Eclipse\
**Tags:** cobol, eclipse, sonarqube-ide\
**Created:** [May 22, 2019, 1:20pm UTC](https://community.sonarsource.com/t/sonarlint-unable-to-analyze-cobol-with-idms/10023 "2019-05-22T13:20:18Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![xaviereraso](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/xaviereraso/32/14936_2.png) [@xaviereraso](https://community.sonarsource.com/u/xaviereraso)\
**Post date:** [May 22, 2019, 1:20pm UTC](https://community.sonarsource.com/t/sonarlint-unable-to-analyze-cobol-with-idms/10023/1 "2019-05-22T13:20:18Z")

</div>

Hi,

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 ?

---

<div class="post-metadata">

**Author:** ![pynicolas](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/pynicolas/32/675_2.png) [@pynicolas](https://community.sonarsource.com/u/pynicolas)\
**Post date:** [May 23, 2019, 12:44pm UTC](https://community.sonarsource.com/t/sonarlint-unable-to-analyze-cobol-with-idms/10023/2 "2019-05-23T12:44:24Z")

</div>

Hi,

We (SonarSource) didn’t know about IDMS.  
It seems to extend IBM Enterprise COBOL with a lot of [specific statements](https://docops.ca.com/ca-idms-ref/19/en/dml-reference-for-cobol/cobol-data-manipulation-language-dml-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.

---

<div class="post-metadata">

**Author:** ![xaviereraso](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/xaviereraso/32/14936_2.png) [@xaviereraso](https://community.sonarsource.com/u/xaviereraso)\
**Post date:** [May 23, 2019, 1:54pm UTC](https://community.sonarsource.com/t/sonarlint-unable-to-analyze-cobol-with-idms/10023/3 "2019-05-23T13:54:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pynicolas](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/pynicolas/32/675_2.png) [@pynicolas](https://community.sonarsource.com/u/pynicolas)\
**Post date:** [May 23, 2019, 2:36pm UTC](https://community.sonarsource.com/t/sonarlint-unable-to-analyze-cobol-with-idms/10023/4 "2019-05-23T14:36:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![xaviereraso](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/xaviereraso/32/14936_2.png) [@xaviereraso](https://community.sonarsource.com/u/xaviereraso)\
**Post date:** [May 23, 2019, 3:19pm UTC](https://community.sonarsource.com/t/sonarlint-unable-to-analyze-cobol-with-idms/10023/5 "2019-05-23T15:19:47Z")

</div>

Here is an example with SonarLint for Java:

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/5/5084938e3e9776ffc030dccac03a0301f44a998c.png)

---

<div class="post-metadata">

**Author:** ![pynicolas](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/pynicolas/32/675_2.png) [@pynicolas](https://community.sonarsource.com/u/pynicolas)\
**Post date:** [May 23, 2019, 3:42pm UTC](https://community.sonarsource.com/t/sonarlint-unable-to-analyze-cobol-with-idms/10023/6 "2019-05-23T15:42:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![xaviereraso](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/xaviereraso/32/14936_2.png) [@xaviereraso](https://community.sonarsource.com/u/xaviereraso)\
**Post date:** [May 23, 2019, 3:48pm UTC](https://community.sonarsource.com/t/sonarlint-unable-to-analyze-cobol-with-idms/10023/7 "2019-05-23T15:48:52Z")

</div>

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

Thank you for your time.

---

<div class="post-metadata">

**Author:** ![Tamilarasan](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@Tamilarasan](https://community.sonarsource.com/u/Tamilarasan)\
**Post date:** [March 17, 2021, 5:23am UTC](https://community.sonarsource.com/t/sonarlint-unable-to-analyze-cobol-with-idms/10023/8 "2021-03-17T05:23:38Z")

</div>

Hi,

Is there a way to skip a module from Sonar Scan? We want to skip COBOL+IDMS module from Sonar Scan any possibilities?

---

<div class="post-metadata">

**Author:** ![Julien\_HENRY](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/julien_henry/32/61_2.png) [@Julien\_HENRY](https://community.sonarsource.com/u/Julien_HENRY)\
**Post date:** [March 17, 2021, 11:01am UTC](https://community.sonarsource.com/t/sonarlint-unable-to-analyze-cobol-with-idms/10023/9 "2021-03-17T11:01:06Z")

</div>

Hi @Tamilarasan

As mentioned in our [FAQ](https://community.sonarsource.com/faq) it is better to start a new post than to reply on a 2 years old one.

Thanks

---

<div class="post-metadata">

**Author:** ![Julien\_HENRY](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/julien_henry/32/61_2.png) [@Julien\_HENRY](https://community.sonarsource.com/u/Julien_HENRY)\
**Post date:** [March 18, 2021, 7:00am UTC](https://community.sonarsource.com/t/sonarlint-unable-to-analyze-cobol-with-idms/10023/10 "2021-03-18T07:00:15Z")

</div>

This topic was automatically closed after 19 hours. New replies are no longer allowed.
