New code previous definition


  • Enterprise Edition
  • Version 8.9.9

I have set master branch newcode definition as previsous version,

in my understanding, previsou version means, compared with the last commit on this branch, what’s the new code in this commit, but as you can see in the screenshot

the new code will be calculated since July 15(which is my first time creating this project), and the coverage is also based on the time from the first commitment to now. this is not what I want, I just want new code in new commit. How should I solve the problem?

Thank you

“Previous Version” does not mean since the last commit, it means since the last time the " sonar.projectVersion=xxx" string was changed. If you don’t provide a version number as part of your SonarQube scan, then the “previous version” setting always see all code as “new” code.

There is no “since previous commit” feature, since a commit with a single whitespace change would then move all the previously “new” code out of the “new code” area. Not very useful.

appreicate that, very useful