Adopt a JaCoCo Method Filter extension#42
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the project’s Scala code-coverage tooling to the JaCoCo Method Filter (JMF) sbt plugin, replacing the custom in-repo JaCoCo agent/report SBT plugins, and updates CI/docs to support the new approach.
Changes:
- Added
jacoco-method-filter-sbtand enabledJacocoFilterPluginin the build, including JMF report output configuration. - Removed the custom JaCoCo SBT plugins previously living under
project/. - Overhauled the JaCoCo GitHub Actions workflow and expanded internal Copilot guidance for JMF usage.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
project/plugins.sbt |
Adds the MoranaApps JMF sbt plugin dependency. |
project/JacocoBaseKeysPlugin.scala |
Removes legacy custom JaCoCo base keys plugin. |
project/FilteredJacocoAgentPlugin.scala |
Removes legacy custom JaCoCo agent/report plugin implementation. |
project/Dependencies.scala |
Bumps Scala 2.13 patch version. |
project/build.properties |
Updates sbt version. |
build.sbt |
Enables JacocoFilterPlugin and configures JMF report output format/path. |
.github/workflows/ci-check-jacoco.yml |
Updates coverage workflow structure + thresholds and switches report glob. |
.github/copilot-instructions.md |
Adds JMF-specific guidance and updates coverage-related documentation. |
| - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d | ||
| id: filter | ||
| with: | ||
| token: "" |
There was a problem hiding this comment.
This is an optimization, where it does a fallback to do a local comparison and do not run a gh api, when it is not needed.
miroslavpojer
left a comment
There was a problem hiding this comment.
From QA point of view - Approved.
I am not Code Owner.
| @@ -1 +1 @@ | |||
| sbt.version = 1.9.7 | |||
| sbt.version = 1.10.11 | |||
There was a problem hiding this comment.
Check with DevOps - Harry, if this is ok with target platform PROD env.
There was a problem hiding this comment.
After checking. The sbt version is downloaded automatically based on this parameter.
Overview
This pull request introduces significant improvements to our code coverage workflow and documentation, focusing on stricter and more maintainable JaCoCo coverage enforcement for Scala code. The main changes include a major overhaul of the CI coverage workflow, expanded documentation and best practices for JaCoCo Method Filter (JMF) usage, and a comprehensive update to the
jmf-rules.txttemplate to clarify rule-writing and global rule safety.Release Notes
Related
Closes #21