Skip to content

Commit

Permalink
improve logs #3
Browse files Browse the repository at this point in the history
  • Loading branch information
pawlakm committed May 22, 2017
1 parent 01d5e01 commit 6f4e576
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ private String buildWarningMessage(final CoverageResultEntry coverageResultEntry
return sb.append(coverageResultEntry.getCoverageLevel())
.append(" ")
.append(coverageResultEntry.getCoverageType())
.append(" Coverage is below expected threshold! Mesured ")
.append(coverageResultEntry.getCurrentCoverage())
.append(" Coverage is below expected threshold! Measured ")
.append(printableCoverage(coverageResultEntry.getCurrentCoverage()))
.append("% but should be at least: ")
.append(coverageResultEntry.getExpectedCoverage())
.append(printableCoverage(coverageResultEntry.getExpectedCoverage()))
.append("%")
.toString();
}
Expand All @@ -104,6 +104,10 @@ private Arguments buildCheckArguments() {
.build();
}

private static double printableCoverage(final double coberturaPercentage) {
return Math.round(coberturaPercentage * 10000.0) / 100.0;
}

/**
* Locates Cobertura data file to be used to check coverage.
*
Expand Down

0 comments on commit 6f4e576

Please sign in to comment.