Skip to content

Commit

Permalink
Merge pull request #139 from pulgupta/master
Browse files Browse the repository at this point in the history
changed the logging to print coverage numbers as a float percentage
  • Loading branch information
centic9 authored Dec 18, 2020
2 parents 25b3464 + 68069f6 commit 3c36c2e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/hudson/plugins/jacoco/JacocoPublisher.java
Original file line number Diff line number Diff line change
Expand Up @@ -684,12 +684,12 @@ public void perform(@Nonnull Run<?, ?> run, @Nonnull FilePath filePath, @Nonnull
logger.println("[JaCoCo plugin] Could not parse coverage results. Setting Build to failure.");
run.setResult(Result.FAILURE);
} else {
logger.println("[JaCoCo plugin] Overall coverage: class: " + result.getClassCoverage().getPercentage()
+ ", method: " + result.getMethodCoverage().getPercentage()
+ ", line: " + result.getLineCoverage().getPercentage()
+ ", branch: " + result.getBranchCoverage().getPercentage()
+ ", instruction: " + result.getInstructionCoverage().getPercentage()
+ ", complexity: " + result.getComplexityScore().getPercentage());
logger.println("[JaCoCo plugin] Overall coverage: class: " + result.getClassCoverage().getPercentageFloat()
+ ", method: " + result.getMethodCoverage().getPercentageFloat()
+ ", line: " + result.getLineCoverage().getPercentageFloat()
+ ", branch: " + result.getBranchCoverage().getPercentageFloat()
+ ", instruction: " + result.getInstructionCoverage().getPercentageFloat()
+ ", complexity: " + result.getComplexityScore().getPercentageFloat());
result.setThresholds(healthReports);

// Calculate final result of the current build according to the state of two flags: changeBuildStatus and buildOverBuild
Expand Down

0 comments on commit 3c36c2e

Please sign in to comment.