Improve coverage#314
Merged
Merged
Conversation
armiol
approved these changes
May 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the buildSrc JaCoCo coverage filtering so generated Kotlin sources (including protoc-gen-kotlin outputs) are excluded from coverage calculations alongside generated Java sources.
Changes:
- Extend source-set discovery to include Kotlin source directories when collecting generated sources for filtering.
- Replace the generated-source → class-name mapping with a unified, path-based approach that supports
.ktand.proto.kt, and add unit tests for it. - Bump snapshot versions and regenerate dependency-report artifacts.
Reviewed changes
Copilot reviewed 11 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| version.gradle.kts | Bumps the published snapshot version. |
| docs/dependencies/pom.xml | Regenerated dependency POM reflecting updated versions. |
| docs/dependencies/dependencies.md | Regenerated dependency/license report reflecting updated versions and timestamps. |
| buildSrc/src/test/kotlin/io/spine/gradle/report/coverage/FileExtensionsTest.kt | Adds tests for mapping source files to JVM class names (Java/Kotlin/proto-kt). |
| buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/PathMarker.kt | Simplifies path markers and renames the output marker for main compilation output. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/JacocoConfig.kt | Collects both Java and Kotlin main source dirs for generated-code detection. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/FileExtensions.kt | Introduces Kotlin/proto-kt class-name mapping and updates compiled-class parsing marker usage. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/FileExtension.kt | Adds the .kt extension constant. |
| buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/CodebaseFilter.kt | Uses the new Kotlin-aware class-name mapping when excluding generated classes. |
| buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt | Updates the referenced Validation SDK snapshot version. |
| AGENTS.md | Updates agent/review guidance (config-managed content). |
| .github/copilot-instructions.md | Updates Copilot guidance (config-managed content). |
| .agents/skills/review-docs/SKILL.md | Updates doc-review skill guidance (config-managed content). |
| .agents/skills/kotlin-review/SKILL.md | Updates Kotlin-review skill guidance (config-managed content). |
| .agents/documentation-guidelines.md | Adds Protobuf header guidance (config-managed content). |
| .agents/coding-guidelines.md | Adds Kotlin Protobuf DSL guidance (config-managed content). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #314 +/- ##
========================================
Coverage 9.53% 9.53%
Complexity 62 62
========================================
Files 82 82
Lines 2034 2034
Branches 160 160
========================================
Hits 194 194
Misses 1834 1834
Partials 6 6 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR update the code under
buildSrcthat handles exclusion of generated code from coverage. Now Kotlin files generated by Protobuf compiler are going to be excluded.Other notable changes