When running Azure pipelines against a Pull Request in GitHub, we see the following warning against each report on our SonarQube server:
Usage of parameter ‘sonar.pullrequest.provider’ from the scanner is deprecated. Please configure this parameter in the configuration of your project.
Presumably this parameter is set by one of the Azure tasks: SonarQubePrepare@4, SonarQubeAnalyze@4, or SonarQubePublish@4 so it’s not something we directly have any control over. Is there a way to silence this warning so that we don’t end up in the “broken windows” syndrome of having a warning that is always there but can be ignored?
Actually I found a dirty solution to temporary get rid of those notifications.
On Azure build agent(s) navigate to agent’s work tasks folder:
ex.: C:\work\_tasks
Then for each Sonarqube related task (SonarQubePrepare, SonarQubeAnalyze and SonarQubePublish) open sources of its latest version and open file under: “common\prepare-task.js”.
In these files just comment out lines where sonar.pullrequest.provider setting is set:
ex.: /* props["sonar.pullrequest.provider"] = "vsts"; */