Sometimes we get old issues reported as being new issues. The lase example comes from last night.
IN the java project, the new issues are defined based on the previous version.
The classes that were reported as having this problem has not been changed lately.
The 2 rules that are involved in the issues reported as ‘new’ are java:S2057 and java:S3437
We have migrated recently our DB. I don’t know if this has an impact.
Update. Today 2 old issues are again reported as new. They are related to java:S1699 and java:S6212
All of these rules are dependent on accurate semantics being available to the analyzer. See the documentation on Java analysis and bytecode.
So it sounds like maybe something changed with your build/dependencies in between runs. If you compare the build logs (including SonarQube analysis) from before and after, do you see any significant changes in the build or in messages produced by the scanner?
We upgraded the minor version of our jdk image used to build the project.
But nothing else changed.
I just checked again the issues that were reported today and I see that they were not reported before. So they are new issues because they were not reported. But in fact the files has not been changed recently.
I don’t have some other logical details that might help for this case…
I just had the same problem today: we switched to a new version and changed some code.
The PR scanner reported no problems. Afterwards we merged into the development branch and the nightly build reported 28 new problems. All on some code that wasn’t touched for months.
Can somebody explain me why?