Hello,
We are using SquishCoco for C/C++ to do code coverage analysis. It should now be possible to import these results via a Squish exported cobertura file.
Using sonar.cfamily.cobertura.reportPaths=$(System.DefaultWorkingDirectory)/coverage_all_unittests.xml I am trying to import these results into SonarCloud, which should be possible now looking at some forum posts.
During the SonarCloudAnalyze, the file detected and read, but an exception occurs:
##[error]16:55:17.826 ERROR Error during SonarScanner Engine execution
com.sonar.cpp.plugin.visualstudio.XmlParserHelper$ParseErrorException: Unexpected closing element "line", expecting "conditions" in C:\a\1\s\coverage_all_unittests.xml at line 15
at com.sonar.cpp.plugin.visualstudio.XmlParserHelper.parseError(XmlParserHelper.java:135)
at com.sonar.cpp.plugin.cobertura.CoberturaParser.enteringElement(CoberturaParser.java:78)
at com.sonar.cpp.plugin.cobertura.CoberturaParser.skipConditions(CoberturaParser.java:234)
at com.sonar.cpp.plugin.cobertura.CoberturaParser.parseLine(CoberturaParser.java:210)
at com.sonar.cpp.plugin.cobertura.CoberturaParser.parseLines(CoberturaParser.java:187)
at com.sonar.cpp.plugin.cobertura.CoberturaParser.parseClasses(CoberturaParser.java:140)
at com.sonar.cpp.plugin.cobertura.CoberturaParser.parsePackages(CoberturaParser.java:120)
at com.sonar.cpp.plugin.cobertura.CoberturaParser.parseReport(CoberturaParser.java:98)
at com.sonar.cpp.plugin.cobertura.CoberturaParser.parse(CoberturaParser.java:71)
at com.sonar.cpp.plugin.cobertura.CoberturaSensor.lambda$execute$2(CoberturaSensor.java:47)
The exported file indeed does not have the ‘conditions’ section. Azure devops itself has no problem loading the xml file.
Are there options for the analyze step to load this file?
Thank you