Scenario - There is a COBOL file with several issues identified by SonarQube. At a later date some code changes are made, which leads to a parse error during sonar scanner execution. Now, because of parse error ALL open issues in the COBOL file gets closed automatically. I am not sure if this is how it should work. I would expect SonarQube to just exclude the file from analysis when it finds a parse error (assuming the file did not change).
Problem with current implementation is that when parse error gets fixed in code, SonarQube treats all “existing” issues as “New” and this fails the existing debt logic.
Can this be handled within SonarQube such that parse errors do not close the existing issues ?
That’s not the behavior I see. It all happened within 7 days. On Aug 21, parse error was detected in cobol file which closed all existing issues. On Aug 26th, the parse error was fixed in code, which led to NEW issues being created for the same file.
In earlier versions of SonarQube v7.9 LTS there were some issues with issue tracking on COBOL in some situations. These tickets describe some of the cases that got fixed in later versions of SonarQube v7.9 LTS.
I have viewed both tickets, I don’t think any of them would fix the problem that I am facing (i.e. parse error closed all existing issues). This is not a random issue, parse error “always” closes all existing issues in that file.