Fail the build if SonarQube analysis finds xml parsing errors

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube 7.3. SonarXMl 2.0.1
  • what are you trying to achieve
    We are running VSTS build pipelines. SonarQube analysis steps throwing XML parsing errors but continuing the scan for rest of the files and publishing the results. We want to break the build when SonarQube encounters XML parsing errors.
  • what have you tried so far to achieve this
    We tried upgrading the SonarXML to version 2.0.1. Is there a way to handle this issue?

Hi could you detail why you would like to do so ?

I think it is quite easy:

  • enable XML parser failure with blocker severity
  • configure quality gate that no new blockers allowed
  • fail the build if the quality gate does not pass

I tend to agree with @agabrys solution. Does it solve your issue @karmuru?