In my C++ project, “New Code” is defined as “90 days”.
In the last branch execution, on the main branch, I got many issues, and Sonar lies : it tells some code has been modified some minutes ago, when I did the last commit, but this commit modified only one C++ file. And the pointed line havn’t been modified for some years.
To get consistent results, I have to change to change the value of “New Code” (ie 90 to 89), and run the analysis again.
Note that beetween the execution, I don’t change the code. And I don’t get the famous error “cannot fint report-tasks.txt”.
Detection of new code relies on the SCM metadata available to analysis. If the detection was wrong, that means the data was lacking. These prerequisites are listed for PR analysis, but most of them apply generally too. Please make sure they’re in place.
I am sure the SCM data are OK.
We clean everything at each build.
And does the fact that changing the number of days resolves the problem show a problem/bug on the Sonar side ?
The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.