Skip to content

Commit

Permalink
Add support for OpenCover.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Jan 17, 2024
1 parent c847de6 commit f4c8461
Show file tree
Hide file tree
Showing 5 changed files with 204 additions and 296 deletions.
2 changes: 1 addition & 1 deletion plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<gitHubRepo>jenkinsci/coverage-plugin</gitHubRepo>

<!-- Library Dependencies Versions -->
<coverage-model.version>0.37.0</coverage-model.version>
<coverage-model.version>0.38.0</coverage-model.version>
<jsoup.version>1.17.2</jsoup.version>

<!-- Jenkins Plug-in Dependencies Versions -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public Optional<Delta> calculateCodeDeltaToReference(final Run<?, ?> referenceBu
}

/**
* Gets all code changes which are relevant for the coverage (added, renamed and modified files).
* Gets all code changes that are relevant for the coverage (added, renamed and modified files).
*
* @param delta
* The calculated code {@link Delta}
Expand All @@ -103,7 +103,7 @@ public Set<FileChanges> getCoverageRelevantChanges(final Delta delta) {
}

/**
* Maps the passed {@link FileChanges code changes} to the corresponding fully qualified names as they are used by
* Maps the given {@link FileChanges code changes} to the corresponding fully qualified names as they are used by
* the coverage reporting tools - usually the fully qualified name of the file.
*
* @param changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ public ListBoxModel doFillParserItems() {
ListBoxModel options = new ListBoxModel();
add(options, Parser.JACOCO);
add(options, Parser.COBERTURA);
add(options, Parser.OPEN_COVER);

Check warning on line 151 in plugin/src/main/java/io/jenkins/plugins/coverage/metrics/steps/CoverageTool.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 151 is not covered by tests

Check warning on line 151 in plugin/src/main/java/io/jenkins/plugins/coverage/metrics/steps/CoverageTool.java

View check run for this annotation

Codecov / codecov/patch

plugin/src/main/java/io/jenkins/plugins/coverage/metrics/steps/CoverageTool.java#L151

Added line #L151 was not covered by tests
add(options, Parser.PIT);
add(options, Parser.JUNIT);
return options;
Expand Down Expand Up @@ -207,6 +208,8 @@ public enum Parser {
"symbol-footsteps-outline plugin-ionicons-api"),
JACOCO(Messages._Parser_JaCoCo(), "**/jacoco.xml",
"symbol-footsteps-outline plugin-ionicons-api"),
OPEN_COVER(Messages._Parser_JaCoCo(), "**/jacoco.xml",
"symbol-footsteps-outline plugin-ionicons-api"),
PIT(Messages._Parser_PIT(), "**/mutations.xml",
"symbol-solid/virus-slash plugin-font-awesome-api"),
JUNIT(Messages._Parser_Junit(), "**/TEST-*.xml",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Recorder.Name=Record code coverage results

Parser.Cobertura=Cobertura Coverage Reports
Parser.JaCoCo=JaCoCo Coverage Reports
Parser.OpenCover=OpenCover Coverage Reports
Parser.PIT=PIT Mutation Testing Reports
Parser.Junit=JUnit Test Results

Expand Down
Loading

0 comments on commit f4c8461

Please sign in to comment.