Master Quality Gate will not assess previous_version because I cannot automatically set a new version

  • Developer Edition Version 7.9.1 (build 27448)
  • When I merge my pull request into my master branch, I want the SonarQube scan to only assess new code for the Quality Gate analysis. Currently, it assesses all of the code for all of time when merging to master instead of only assessing the new code.
  • I set the New Code Period to previous_version for the project but cannot figure out how to have the system automatically set a new version each time a new analysis is completed. If I could figure out how to set a new version each time a code analysis is completed, I’m thinking that would solve my issue.

Hi,

Welcome to the community!

When you analyze a branch, you will always get analysis of the entire project. When you analyze a pull request before merge, you’ll see issues on just the changes.

 
Make sense?
Ann

P.S.

You really don’t want to do that. It completely screws up your New Code Period and related metrics.