-
ALM used: GitHub
-
CI system used: TeamCity
-
Scanner command used when applicable (private details masked)
dotnet %teamcity.tool.sonar-scanner-msbuild-5.5.3.43281-net5.0%\SonarScanner.MSBuild.dll
/d:sonar.pullrequest.key=%teamcity.pullRequest.number%
/d:sonar.pullrequest.branch=“%teamcity.pullRequest.source.branch%”
/d:sonar.pullrequest.base=“%teamcity.pullRequest.target.branch%” -
Languages of the repository
c#, TypeScript some SQL -
Only if the SonarCloud project is public, the URL
- And if you need help with pull request decoration, then the URL to the PR too
-
Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
I’m trying to use Sonar as a Quality gate. It’s responding to requests to scan & I can see the PR scan in SonarCloud. It even adds a comment to the PR. What it doesn’t do is appear as a check, so when the quality gate fails, it just adds a comment, which is useless.
How do I make Sonar scans appear as a check in GitHub?
- Steps to reproduce
- Potential workaround
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!