Unrecognized command line argument: -/d:sonar.qualitygate.wait=true

Below is the yml script for scanning

  • dotnet sonarscanner -/d:sonar.qualitygate.wait=true begin /k:“projectkey” /d:sonar.login=“token”

And I get this error in the pipeline: Unrecognized command line argument: -/d:sonar.qualitygate.wait=true

You should remove the - from the beginning of the parameter (so the format matches how you pass sonar.login) and also put it after the begin command

I noticed the quality gate actually fail but subsequent job get executed even though sonar.qualitygate.wait=true is set true.

Is it not suppose to skip running subsequent job?

  1. That’s probably up to your CI Pipeline, whether it keeps running tasks after a failed task
  2. What version of SonarQube are you using? This option only works in 8.x

I am using SonarQube Community Edition Version 8.6 (build 39681)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.