Skip to content

Improve filtering of generated code in the coverage reports#670

Merged
alexander-yevsyukov merged 6 commits into
masterfrom
do-not-escape-backticks
May 28, 2026
Merged

Improve filtering of generated code in the coverage reports#670
alexander-yevsyukov merged 6 commits into
masterfrom
do-not-escape-backticks

Conversation

@alexander-yevsyukov
Copy link
Copy Markdown
Contributor

This PR brings the changes to buildSrc recently adopted in Validation for filtering of proto-generated code from test coverage reports.

Other notable changes

  • Agents instructions were included to avoid escaping backticks in version bump commit message.

@alexander-yevsyukov alexander-yevsyukov marked this pull request as ready for review May 28, 2026 17:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 JaCoCo coverage filtering logic in buildSrc to better exclude proto-/generated sources from coverage reports, including Kotlin sources generated by protoc-gen-kotlin.

Changes:

  • Extend coverage filtering to consider Kotlin source roots and Kotlin-generated class naming (.kt, .proto.kt, synthetic *Kt classes).
  • Simplify generated-class discovery by deriving class FQNs from source-relative paths (File.classNamesIn), and apply those when excluding compiled outputs.
  • Add focused unit tests for the new source-file-to-class-name mapping logic; update agent skill docs for version bump commit subjects.

Reviewed changes

Copilot reviewed 2 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
buildSrc/src/test/kotlin/io/spine/gradle/report/coverage/FileExtensionsTest.kt Adds tests for deriving JVM class FQNs from .java, .kt, and .proto.kt sources.
buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/PathMarker.kt Removes Java-specific path markers and renames output marker to MAIN_OUTPUT_FOLDER.
buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/JacocoConfig.kt Collects both Java and Kotlin main source directories for filtering/source reporting.
buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/FileExtensions.kt Introduces classNamesIn, updates compiled-class parsing marker, and adjusts docs/constants.
buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/FileExtension.kt Adds KOTLIN_SOURCE file extension.
buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/CodebaseFilter.kt Switches generated class name discovery to the new classNamesIn approach.
buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt Bumps Core JVM Compiler snapshot version constants.
.agents/skills/bump-version/SKILL.md Clarifies commit-subject backtick handling and adds a shell-safe example.

Comment thread .agents/skills/bump-version/SKILL.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 8 changed files in this pull request and generated no new comments.

@alexander-yevsyukov alexander-yevsyukov merged commit bf604a9 into master May 28, 2026
2 checks passed
@alexander-yevsyukov alexander-yevsyukov deleted the do-not-escape-backticks branch May 28, 2026 18:10
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