Skip to content

Issue #19: do not append parameters with empty value #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 4, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/main/groovy/org/scoverage/ScoverageExtension.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ class ScoverageExtension {
File sources
/** range positioning for highlighting */
boolean highlighting = true
/** regex of excluded packages, separated by semicolons */
String excludedPackages = ""
/** regex for each excluded package */
List<String> excludedPackages = []
/** regex for each excluded file */
List<String> excludedFiles = []

ScoverageExtension(Project project) {

Expand Down Expand Up @@ -87,7 +89,12 @@ class ScoverageExtension {
plugin.addAll(parameters)
}
plugin.add("-P:scoverage:dataDir:${extension.dataDir.absolutePath}".toString())
plugin.add("-P:scoverage:excludedPackages:${extension.excludedPackages}".toString())
if (extension.excludedPackages) {
plugin.add("-P:scoverage:excludedPackages:${extension.excludedPackages.join(';')}".toString())
}
if (extension.excludedFiles) {
plugin.add("-P:scoverage:excludedFiles:${extension.excludedFiles.join(';')}".toString())
}
if (extension.highlighting) {
plugin.add('-Yrangepos')
}
Expand Down