SonarQube 8.5 EDIT: 8.2 Developer Edition
Is it possible to scan both main (target, master) branch and source branch (for PR analysis)?
During my build PR analysis is just fine, the scan is successful, but in Sonarqube master branch shows as not scanned:
"master" branch has not been analyzed yet and you have multiple branches already. It looks like it is not your Main Branch, check your configuration
When I use both:
I get the error:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:220.127.116.116:sonar (default-cli) on project mqe-hob-tests: A pull request analysis cannot have the branch analysis parameter 'sonar.branch.name'
I would like to avoid creating a separate job just for scanning master branch. I use scanner for maven in Jenkins pipeline job.