Scanner command used : dotnet sonarscanner begin -o:“softsure” -k:$apiServiceName -d:sonar.host.url=“https://sonarcloud.io” -d:sonar.token=“" -d:sonar.projectBaseDir=“$(pwd)/” -d:sonar.cs.vscoveragexml.reportsPaths="**/.coverage" -d:sonar.coverage.exclusions="/DTO” -d:sonar.pullrequest.key=“$pullRequestId” -d:sonar.pullrequest.branch=“$branchName” -d:sonar.pullrequest.base=“develop”
Languages C#
Hi there
in my AzureDevops pipeline, I run a bash script to do the following
determine what solutions to rebuild (could be one or more out of 200)
calculate their sonar project name
begin the sonar scan
rebuild solution
run unit tests
end the sonar scan
it all works correctly, except that Sonar does not add the comment decorations on the Pull Request code review. Im quite sure that the Azure Devops personal access token is correct, as it works elsewhere but for another repository .
I’ve not specified sonar.pullrequest.provider as that parameter is deprecated apparently,
to answer your question though, I cant use the SonarQube Cloud Extension for Azure DevOps in this case, as I dont know which sonar project(s) will be analyzed in this CI pipeline. We have 200 microservice’s in a mono repo. the bash script dynamically determines which of the 200 were modified and individually rebuilds them while scanning with sonar.