Skip to content

fix: use absolute path for Sonar coverage report#329

Merged
driessamyn merged 1 commit into
mainfrom
fix/sonar-coverage-path
Mar 28, 2026
Merged

fix: use absolute path for Sonar coverage report#329
driessamyn merged 1 commit into
mainfrom
fix/sonar-coverage-path

Conversation

@driessamyn
Copy link
Copy Markdown
Owner

@driessamyn driessamyn commented Mar 28, 2026

Summary

Context

After splitting the CI workflow (#327), Sonar runs in a separate workflow_run job that downloads the coverage artifact. However, Sonar resolves the relative build/reports/kover/report.xml path per-module (e.g. core/build/reports/kover/report.xml), not from the workspace root. Since the downloaded artifact is at the root, Sonar couldn't find it and reported 0% coverage.

Test plan

  • Verify Sonar analysis picks up coverage after merge

Summary by CodeRabbit

  • Chores
    • Enhanced the continuous integration pipeline configuration to improve code coverage analysis reporting during automated quality checks.

Sonar resolves sonar.coverage.jacoco.xmlReportPaths relative to each
module directory, not the workspace root. Override with an absolute path
so the downloaded coverage artifact is found correctly.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 92a5ed05-c342-4252-a759-348cb2d3f6f3

📥 Commits

Reviewing files that changed from the base of the PR and between 5c105e1 and 669fc30.

📒 Files selected for processing (1)
  • .github/workflows/analysis.yml

📝 Walkthrough

Walkthrough

The GitHub Actions workflow configuration was modified to explicitly specify the JaCoCo coverage report path when executing SonarQube analysis. The -Dsonar.coverage.jacoco.xmlReportPaths parameter is now passed to the ./gradlew sonar command in both PR and push jobs, with the push job's command reformatted to a multi-line structure.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow Configuration
.github/workflows/analysis.yml
Added explicit JaCoCo XML report path (-Dsonar.coverage.jacoco.xmlReportPaths) to SonarQube gradle command in both PR and push analysis jobs; reformatted push job command to multi-line folded block format.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🐰 A path so clear, now SonarQube can see,
The coverage report hops where it should be,
JaCoCo's XML in the right place at last,
No more searching—this workflow's running fast!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly describes the main change: using an absolute path for the Sonar coverage report instead of a relative path.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sonar-coverage-path

Comment @coderabbitai help to get the list of available commands and usage tips.

@driessamyn driessamyn merged commit 81b9952 into main Mar 28, 2026
4 checks passed
@driessamyn driessamyn deleted the fix/sonar-coverage-path branch March 28, 2026 14:12
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.

1 participant