In a recent sonarqube scan for .cbl file change, we noticed several incorrect findings under new code.
The scan reported few new issues under the new code and assigned to someone indicating the code was changed as expected. However we are not sure why it reported new issues on old code, usually if an issue is created and it is not assigned to anyone – is an indication that Sonarqube could not find blame information i.e. nobody really changed that code.
It looks like Sonarqube new code logic seems to have failed.
In the screen image below, it shows the new code issues which are assigned to the developer indicating the code was changed and old issues re appearing
If you click the history drop-down (label says “16 hours ago” in your screenshot) what does it reveal about how SonarQube sees the history of this particular issue?
If you click on that individual issue in order to see it in the context of the code, the margin of the code will show you the blame information it think it’s using. I wonder if actually your recent changes in this file registered as changes on the related line(s) and that explains the issue date.
[quote=“Girish_V, post:4, topic:26332”]
Hello Jeff
We use develop branch (created from master)for development ,
Screen image shows the issue was created on April 2 2020 on the master branch which is correct
On June 10th new code was added to the same file in develop branch and Sonarqube scanner shows the same file for old code with a created date as June10th this is incorrect, it should have copied that blame info from master to develop and retain that instead, it created old issues for new code
You need to scroll up in this case to see the annotation of who authored this block of code and when. It will be displayed between the line number and the code, in the gray section. You can then mouse over it & click to see details.