Skip to content

Commit ddc2bd5

Browse files
committed
Merge pull request #62 from randomcoder/Fix-Empty-Exclusions-Issue-61
Fix empty exclusions issue 61
2 parents 1e015f8 + 41142a8 commit ddc2bd5

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/main/scala/scoverage/ScoverageSbtPlugin.scala

+9-3
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,14 @@ class ScoverageSbtPlugin extends sbt.Plugin {
8585
s"-Xplugin:${classpath.getAbsolutePath}",
8686
s"-P:scoverage:dataDir:${crossTarget.value.getAbsolutePath}/scoverage-data"
8787
) ++
88-
Option(excludedPackages.value).map(v => s"-P:scoverage:excludedPackages:$v") ++
89-
Option(scoverageExcludedFiles.value).map(v => s"-P:scoverage:excludedFiles:$v")
88+
Option(excludedPackages.value.trim).map{
89+
case "" => ""
90+
case v => s"-P:scoverage:excludedPackages:$v"
91+
} ++
92+
Option(scoverageExcludedFiles.value.trim).map{
93+
case "" => ""
94+
case v => s"-P:scoverage:excludedFiles:$v"
95+
}
9096
}
9197
},
9298

@@ -436,4 +442,4 @@ class ScoverageSbtPlugin extends sbt.Plugin {
436442
// // test in ScoverageCompile <<= (test in ScoverageTest)
437443
// // )
438444
//
439-
//}
445+
//}

0 commit comments

Comments
 (0)