We recently upgraded from SonarQube 8.0 to 8.3. Our scanner is run on Bamboo and uses the Maven plugin.
Previously in our CI pipeline, we used the sonar.branch.name and sonar.branch.target parameters. This allowed us to have the build branch build fail if a Quality Gate did not pass.
Now that all branches are basically branches in 8.3, we have lost some of this Quality Gate / Build Breaker functionality if the code changes are included in the first build/analysis.
To get around that I started playing with the new Pull Request feature. I got this working with Bamboo and Sonar. All the parameters are correct and Sonar correctly recognizes the “merge into” and “from” branches. The problem that I’m having now is that most of our Pull Requests are small and will be less than 20 lines.
It seems that if we fully switch over to the Pull Request analysis method that most of our builds will have some false Passes because the “small number of lines” issue. How can we turn this off completely or change it to something really small like 5 lines?