Hi, i have quick question.
When i build gradle and scan new branch, everythin is pushed to sonar properly. New Code smells are shown on New Code section and gate is failed as expected. Problem occurs when I am trying to run scan again without any changes to this files. After second scan there is nothing in New Code section and quality gate is passed. As it is in project settings, it supposed to compare code to master branch, not to last branch scan. Any suggestions?
Hi,
Welcome to the community!
At a guess, you’ve set
- New Code period to
previous_version
- the
sonar.projectVersion
analysis parameter to use a value that includes your build number
Together, what these two things do is reset New Code with every analysis since
- the build number changes with each analysis
- which changes the
sonar.projectVersion
with each analysis - which resets the New Code period with each analysis
Does that sound right?
Ann