File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
scalac-scoverage-plugin/src/main/scala/scoverage Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -62,14 +62,15 @@ object IOUtils {
6262 /**
6363 * Aggregates all subproject reports, returning the location of the aggregated file.
6464 */
65- val aggregator : (File , File ) => File = (baseDir, targetDir) => {
65+ val aggregator : (File , File ) => Unit = (baseDir, targetDir) => {
6666 val files = IOUtils .reportFileSearch(baseDir)
6767 println(s " [info] Found ${files.size} subproject report files [ ${files.mkString(" ," )}] " )
68- val nodes = files.map(xml.XML .loadFile)
69- val aggregated = ScoverageXmlMerger .merge(nodes)
70- val outFile = new File (targetDir, Constants .XMLReportFilename )
71- writeToFile(outFile, aggregated.toString)
72- outFile
68+ if (files.size > 0 ) {
69+ val nodes = files.map(xml.XML .loadFile)
70+ val aggregated = ScoverageXmlMerger .merge(nodes)
71+ val outFile = new File (targetDir, Constants .XMLReportFilename )
72+ writeToFile(outFile, aggregated.toString)
73+ }
7374 }
7475
7576 val isMeasurementFile = (file : File ) => file.getName.startsWith(Constants .MeasurementsPrefix )
You can’t perform that action at this time.
0 commit comments