I am trying to integrate sonarqube into our CI pipline.
It seems to work and the master branch is analyzed properly, but the PR scanning always passes even if I add intentional bugs to my PR…
Also, it never reports coverage changes even though I do add them
I am using sonarqube 8.9 developer edition and I am running it using google cloud build
Here is my build/test/scan command:
dotnet sonarscanner begin /k:"$PROJECT_KEY" \
/d:sonar.login="$SONAR_KEY" \
/d:sonar.host.url="$SONAR_HOST" \
/d:sonar.cs.opencover.reportsPaths=$TEST_DIR/coverage.opencover.xml \
/d:sonar.pullrequest.base=master \
/d:sonar.pullrequest.branch=$BRANCH_NAME \
/d:sonar.pullrequest.key=$PR_NUMBER
dotnet build Ide/Lim.sln
dotnet test --no-build $TEST_DIR/UnitTests.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
dotnet sonarscanner end /d:sonar.login="$SONAR_KEY"
What am I missing?