Azure Pipelines tasks to begin and end a SonarQube analysis.
SonarQube Begin — installs the dotnet-sonarscanner global tool (if missing) and runs
dotnet sonarscanner begin with the given project key, host URL, and token. Run before the
build/test steps.
SonarQube End — runs dotnet sonarscanner end with the given token to finish the
analysis and upload results. Run after the build/test steps, paired with a preceding
"SonarQube Begin" task in the same job. Then waits for the server to process the analysis and
publishes the Quality Gate status and main metrics (bugs, vulnerabilities, code smells,
coverage, duplications) to the Extensions tab of the build results. Optionally fails the
build when the Quality Gate fails (failOnQualityGate).