Sonarqube Developer Edition Version 7.2.1.
Running Integrated with MSBuild in Azure Devops (VSTS)
so we upgraded to the developer edition to use the multi-branch analysis which works great! however one thing that we lost was the github comments which decorated the PR’s. is it possible to use both at the same time? we tried it and recieved the following issue.
ERROR: Error during SonarQube Scanner execution
ERROR: A pull request analysis cannot have the branch analysis parameter ‘sonar.branch.name’
we got around the issue in the community edition by doing the following
if (PR)
prepare analysis with following params (sonar.pullrequest.base, sonar.pullrequest.branch, sonar.pullrequest.key)
msbuild
run code analysis
if (master)
prepare analysis (no params)
msbuild
run code analysis
publish quality gates
which apparently does not work anymore.
does anybody have any suggestions for doing both multi-branch for PR’s, and leaving the github comments as well?
I’m confused. Your screenshot shows GitHub configuration, but your initial post mentions “Azure Devops (VSTS)”. You for sure will not be able to annotate VSTS PRs with GH credentials.
I am taking over trying to get this to work from Michael. We followed the document you mentioned but we are still not seeing the nice inline comments on the github PR. Below are the advanced properties on the Prepare Analysis task in our Azure Devops (VSTS) Pipeline.
Those need to be defined at the global level in the UI. Decoration happens after scanner-side analysis, by which time values set on the analysis side aren’t available, as I understand it.
Hi,
I found the problem. From your suggestion i went into the Administration > General > Pull Request settings on the SonarQube Project itself. That fixed out problem and we are getting inline comments on the github PR now from the analysis.
Thank you for the help @ganncamp