Skip to content

Commit 93a2823

Browse files
committed
Fixed issue #1, release 1.0.2
1 parent 5022947 commit 93a2823

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</parent>
1212

1313
<artifactId>sonar-scoverage-plugin-sonar3.5.1</artifactId>
14-
<version>1.0.1</version>
14+
<version>1.0.2</version>
1515
<packaging>sonar-plugin</packaging>
1616
<name>Sonar Scoverage Plugin</name>
1717

plugin/src/main/scala/com/buransky/plugins/scoverage/xml/XmlScoverageReportConstructingParser.scala

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,16 @@ class XmlScoverageReportConstructingParser(source: Source) extends ConstructingP
191191
// Get file
192192
val file = DirOrFile(path(path.length - 1).toString, Nil, Some(coverage))
193193

194-
// Append file
195-
dirs.last.children = List(file)
194+
if (dirs.isEmpty) {
195+
// File in root dir
196+
file
197+
}
198+
else {
199+
// Append file
200+
dirs.last.children = List(file)
196201

197-
dirs(0)
202+
dirs(0)
203+
}
198204
}
199205

200206
private def fileStatementCoverage(statementsInFile: Map[String, List[CoveredStatement]]):

0 commit comments

Comments
 (0)