Skip to content

Commit 597555a

Browse files
committed
Updated XML writer for filename based on debug
1 parent d455586 commit 597555a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/scala/scoverage/report/ScoverageXmlWriter.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ import scoverage.MeasuredMethod
1212
class ScoverageXmlWriter(sourceDir: File, outputDir: File, debug: Boolean) {
1313

1414
def write(coverage: Coverage): Unit = {
15-
FileUtils.write(
16-
new File(outputDir.getAbsolutePath + "/scoverage.xml"),
17-
new PrettyPrinter(120, 4).format(xml(coverage))
18-
)
15+
val file = debug match {
16+
case true => new File(outputDir.getAbsolutePath + "/scoverage-debug.xml")
17+
case false => new File(outputDir.getAbsolutePath + "/scoverage.xml")
18+
}
19+
FileUtils.write(file, new PrettyPrinter(120, 4).format(xml(coverage)))
1920
}
2021

2122
def statement(stmt: MeasuredStatement): Node = {

0 commit comments

Comments
 (0)