In SonarQube, when the cppcheck-report.xml is empty, it gives error
While running the plugin for C++, when the cppcheck-report.xml does not contain any data (blank file generated from cpp-check due to parser error), SonarQube is complaining exception
Caused by: org.sonar.api.utils.SonarException: Unable to parse file: cppcheck-report.xml at com.sonar.cpp.plugin.C.A.A(Unknown Source) at com.sonar.cpp.plugin.C.D.analyse(Unknown Source) at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:79) at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70) at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:119) at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:194) at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
How can we overcome this?