Skip to content

Enable JaCoCo coverage reporting for tsql-scriptdom-astgen and aggregate Sonar report discovery - #30

Merged
fupacat merged 3 commits into
masterfrom
copilot/add-jacoco-coverage-execution
Oct 12, 2026
Merged

fupacat merged 3 commits into
masterfrom
copilot/add-jacoco-coverage-execution

Conversation

Copilot AI commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

tsql-scriptdom-astgen tests were executing without JaCoCo, so SonarCloud had no execution data for that module and reported 0% coverage for its sources. This change aligns coverage generation across modules and updates Sonar report path resolution to ingest all module-level JaCoCo XML outputs.

  • JaCoCo execution in tsql-scriptdom-astgen

    • Added jacoco-maven-plugin to tsql-scriptdom-astgen/pom.xml
    • Configured prepare-agent and report executions (report bound to test), matching the existing pattern used by tsql-scriptdom-core
  • Sonar JaCoCo XML path aggregation at parent level

    • Updated parent pom.xml property:
      • from module-local path only
      • to recursive multi-module discovery
<sonar.coverage.jacoco.xmlReportPaths>
  ${project.basedir}/**/target/site/jacoco/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>

Co-authored-by: fupacat <595487+fupacat@users.noreply.github.com>
Copilot AI changed the title [WIP] Add JaCoCo coverage execution to tsql-scriptdom-astgen module Enable JaCoCo coverage reporting for tsql-scriptdom-astgen and aggregate Sonar report discovery Oct 12, 2026
Copilot AI requested a review from fupacat October 12, 2026 19:14
@fupacat
fupacat marked this pull request as ready for review October 12, 2026 20:08
Copilot AI balanced review requested due to automatic review settings October 12, 2026 20:08
@fupacat
fupacat enabled auto-merge (squash) October 12, 2026 20:09

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.

🟢 Approval recommended

The build-configuration change is minimal, correctly mirrors the established JaCoCo pattern, and properly aggregates module coverage reports for Sonar.

0 open findings

What changed in this PR

This PR fixes SonarCloud reporting 0% coverage for the tsql-scriptdom-astgen module. Previously only tsql-scriptdom-core ran the JaCoCo agent, so tsql-scriptdom-astgen's tests produced no execution data. The change enables JaCoCo in tsql-scriptdom-astgen and broadens the parent Sonar report-path property to discover JaCoCo XML output from every module.

Changes:

  • Added jacoco-maven-plugin to tsql-scriptdom-astgen/pom.xml with prepare-agent and report (bound to test) executions, mirroring tsql-scriptdom-core.
  • Changed the parent sonar.coverage.jacoco.xmlReportPaths from a module-local path to a recursive wildcard (${project.basedir}/**/target/site/jacoco/jacoco.xml).
File Description
tsql-scriptdom-astgen/​pom.xml Adds JaCoCo plugin executions so the module's tests generate coverage data; version inherited from parent pluginManagement (0.8.15).
pom.xml Updates Sonar JaCoCo XML report path to a recursive wildcard so all module-level reports are discovered.

I verified that the new tsql-scriptdom-astgen plugin block is identical to the existing tsql-scriptdom-core configuration, the JaCoCo version is managed centrally, tsql-scriptdom-astgen has tests that will now be instrumented, and the wildcard path resolves correctly at both parent and module scope (only two modules, no stray nested target directories). No objective issues were found.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI balanced review requested due to automatic review settings October 12, 2026 20:11
@fupacat
fupacat merged commit 9c22ae6 into master Oct 12, 2026
6 checks passed
@fupacat
fupacat deleted the copilot/add-jacoco-coverage-execution branch October 12, 2026 20:12

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.

🟢 Approved

Both changes faithfully replicate the existing working core JaCoCo pattern and use a Sonar-supported wildcard path, with no objective issues found.

0 open findings

🧠 Review effort: Balanced

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.

Add JaCoCo coverage execution to tsql-scriptdom-astgen module

3 participants