Skip to content

WIP Configure Kover#62

Open
ashtanko wants to merge 1 commit intomainfrom
feature/kover
Open

WIP Configure Kover#62
ashtanko wants to merge 1 commit intomainfrom
feature/kover

Conversation

@ashtanko
Copy link
Owner

@ashtanko ashtanko commented Aug 17, 2025

Summary by CodeRabbit

  • Chores
    • CI now generates both HTML and XML code coverage reports in a single step; build success requires both to complete. The HTML report is published alongside the XML artifact.
    • Standardized coverage reporting across all modules with global and total-report filters prepared for fine-tuning. The existing minimum coverage verification threshold remains unchanged.

@coderabbitai
Copy link

coderabbitai bot commented Aug 17, 2025

Walkthrough

Updates CI to generate both XML and HTML coverage reports in a single step. Adds Kover report configuration in Gradle Kotlin DSL with global and total filters placeholders; existing verification threshold remains unchanged. No runtime or public API changes.

Changes

Cohort / File(s) Summary
CI Workflow
.github/workflows/ci.yml
Modified coverage step to run koverXmlReport and koverHtmlReport together, producing XML and HTML artifacts.
Gradle Build Configuration
build.gradle.kts
Added Kover reports configuration with global and total filters blocks (placeholders). Kept verify rule minBound(80) unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I wiggle my whiskers at coverage bright,
HTML and XML dance in the night.
Kover’s new filters await their cue,
Threshold still steady at eighty, true.
I thump my paws—CI’s in tune,
Reports bloom like clover under the moon. 🐇📊

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/kover

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sonarqubecloud
Copy link

@codacy-production
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (9ff506b) 10 9 90.00%
Head commit (5c1feed) 10 (+0) 9 (+0) 90.00% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#62) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.88%. Comparing base (9ff506b) to head (5c1feed).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #62   +/-   ##
=======================================
  Coverage   88.88%   88.88%           
=======================================
  Files           2        2           
  Lines           9        9           
  Branches        1        1           
=======================================
  Hits            8        8           
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
build.gradle.kts (1)

120-139: Fill Kover filters with concrete class/package patterns (avoid file globs).

The placeholders are fine for WIP, but Kover’s filters expect class/package names (FQNs), not file-system globs. Providing concrete examples now will prevent misconfiguration later and make intent explicit.

Consider something like the following within the existing blocks:

 kover {
   reports {
     filters {
-        excludes {
-            // exclusions for all report variants
-        }
-        includes {
-            // inclusions for all report variants
-        }
+        excludes {
+            // exclusions for all report variants
+            // by packages:
+            packages("dev.shtanko.generated.*", "dev.shtanko.example.*")
+            // by classes (FQCNs with simple patterns):
+            classes("*.BuildConfig", "*.R", "*.R$*")
+            // by annotations:
+            // annotatedBy("kotlinx.serialization.Serializable")
+        }
+        includes {
+            // inclusions for all report variants
+            // packages("dev.shtanko.core.*", "dev.shtanko.feature.*")
+            // classes("dev.shtanko.*Service", "dev.shtanko.*UseCase")
+        }
     }
     total {
       // overriding filters only for total report
       filters {
-          excludes {
-              // exclusions only for total report
-          }
-          includes {
-              // inclusions only for total report
-          }
+          excludes {
+              // exclusions only for total report
+              // packages("dev.shtanko.integration.*")
+          }
+          includes {
+              // inclusions only for total report
+              // packages("dev.shtanko.*")
+          }
       }
     }
   }
 }

If you prefer path-based excludes (e.g., generated sources), keep those in tooling like ktlint/spotless or Gradle source sets, not in Kover filters.
If you’d like, I can propose a first-pass filter set based on common Kotlin/JVM conventions.

.github/workflows/ci.yml (2)

72-74: Good: generate both Kover XML and HTML in one step; consider renaming step and making it more robust.

Minor nit: The step name still mentions “Xml,” but you now generate HTML too. Also consider adding --no-daemon --stacktrace for consistency with other steps.

Potential tweak:

  • Rename step to “Generate Kover coverage reports (XML + HTML)”.
  • Command: ./gradlew koverXmlReport koverHtmlReport --no-daemon --stacktrace.

If you want PR reviewers to access the HTML report easily, upload it as an artifact:

- name: Upload Kover HTML coverage report
  uses: actions/upload-artifact@v4
  with:
    name: kover-html-report
    path: build/reports/kover/html

72-74: Decide on a single source for coverage uploads (Kover vs JaCoCo) to avoid drift.

You’re now producing Kover XML/HTML, Codecov already consumes Kover XML, but Coveralls/Codacy steps still point to JaCoCo XML. That’s fine if intentional, but maintaining two sources can diverge.

  • If you intend to standardize on Kover everywhere, update Coveralls/Codacy to use ./build/reports/kover/report.xml.
  • If Coveralls/Codacy require JaCoCo XML specifically, keep as-is.

Would you like me to prepare a PR-ready diff to switch Coveralls/Codacy to Kover XML (if compatible with your tooling)?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 74e0733 and 5c1feed.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml (1 hunks)
  • build.gradle.kts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build
🔇 Additional comments (1)
build.gradle.kts (1)

120-139: Kover plugin is applied at root only; no subprojects detected

The scan shows a single build.gradle.kts (at the repo root) with alias(libs.plugins.kover) on line 28 and no other Gradle Kotlin or Groovy build files in subdirectories. Since there are no subprojects’ build scripts, the concern about applying Kover per-module does not apply here.

Likely an incorrect or invalid review comment.

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.

2 participants