Skip to content

Improve coverage#314

Merged
alexander-yevsyukov merged 9 commits into
masterfrom
improve-coverage
May 28, 2026
Merged

Improve coverage#314
alexander-yevsyukov merged 9 commits into
masterfrom
improve-coverage

Conversation

@alexander-yevsyukov

@alexander-yevsyukov alexander-yevsyukov commented May 28, 2026

Copy link
Copy Markdown
Collaborator

This PR update the code under buildSrc that handles exclusion of generated code from coverage. Now Kotlin files generated by Protobuf compiler are going to be excluded.

Other notable changes

  • CoreJvm Compiler was bumped to the latest version which allowed to suppress warnings for the unsigned Protobuf fields using the new DSL from Validation Gradle plugin.

Copilot AI review requested due to automatic review settings May 28, 2026 17:36
@alexander-yevsyukov alexander-yevsyukov self-assigned this May 28, 2026
@alexander-yevsyukov alexander-yevsyukov marked this pull request as ready for review May 28, 2026 17:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .kt and .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

codecov Bot commented May 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 9.53%. Comparing base (1918b8f) to head (e7e32a8).
⚠️ Report is 10 commits behind head on master.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexander-yevsyukov alexander-yevsyukov merged commit 3a7ad80 into master May 28, 2026
8 of 9 checks passed
@alexander-yevsyukov alexander-yevsyukov deleted the improve-coverage branch May 28, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants