Generic Code Coverage should be skipped when coverageReportPaths file does not exist instead of fail scan

generic_data

(Javier Azaret) #1

When running MSBuild scan with the sonar.coverageReportPaths set to a file that does not exist the scan operation fails. It would be nice if the scan would continue with the coverage skipped as it does with other coverage report types such as lcov as it can be difficult to determine whether a report exists or not before build (as required with Sonar Scanner MSBuild start command)

08:12:50  INFO: ------------------------------------------------------------------------

08:12:50 INFO: EXECUTION FAILURE
08:12:50 INFO: ------------------------------------------------------------------------
08:12:50 INFO: Total time: 9.399s
08:12:51 INFO: Final Memory: 49M/1101M
08:12:51 INFO: ------------------------------------------------------------------------
08:12:51 ERROR: Error during SonarQube Scanner execution
08:12:51 ERROR: Error during parsing of the generic coverage report ‘C:\Jenkins\workspace\Build\Out\SonarQube.xml’. Look at SonarQube documentation to know the expected XML format.
08:12:51 ERROR: Caused by: C:\Jenkins\workspace\Build\Out\SonarQube.xml (The system cannot find the file specified)
08:12:51 ERROR: