We are trying to integrate sonarqube analysis for Pull Request validation pipeline. Pull requests originates from developer’s feature branch, so how do we supply sonar.branch.name to run the scan for each Pull Requests where the branch name varies.
How/where are you running analysis? I believe many people pull the value from their CI/CD environments.
Thank you Ann for your response. We are triggering a pull request validation pipeline from the branch policy and thats in ADO. We are tyring to add SonarQube Analysis in this pipeline. On the step “Prepare Analysis on Sonarqube” we are trying to provide additional parameters, and using “standalone scanner” and selecting the “manual configuration” mode. So everytime when this pull request pipeline runs, sonarqube analysis fails with an error “A pull request analysis cannot have the branch analysis parameter ‘sonar.branch.name’” . We are stuck here. Which step of sonarqube analysis creates “sonar.project.properties” and that’s not taking all the additional parameters we supply in the task step. Also from where the input “sonar.branch.name” is getting passed to SonarQube though we are not supplying it anywhere.