Repository navigation
Exclude repository maintenance scripts from Sonar coverage scope - #603
Conversation
Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The change is a single, correctly-scoped Sonar coverage-exclusion property that matches the existing script files and aligns with issue #602 without affecting application coverage.
No open issues 🎉
What changed in this PR
This PR adds a single Maven property, sonar.coverage.exclusions, to the root pom.xml to exclude repository maintenance scripts under .github/scripts/** from SonarCloud coverage analysis. This keeps coverage metrics and quality gates focused on production application modules rather than chore/automation scripts, addressing issue #602.
Changes:
- Added
<sonar.coverage.exclusions>.github/scripts/**</sonar.coverage.exclusions>to the aggregator POM's<properties>block.
| File | Description |
|---|---|
| pom.xml | Introduces a Sonar coverage exclusion property so files under .github/scripts/ are omitted from coverage calculations. |
I verified that the .github/scripts/ directory exists and contains the maintenance scripts (lrs-conformance-summary.cjs, update-example-versions.sh, etc.) the pattern targets, that no pre-existing sonar.coverage.exclusions property is being overridden, and that the relative path resolves correctly from the aggregator POM where the Sonar scan is invoked. The change is scoped to coverage only and leaves application code coverage unchanged, consistent with the issue's acceptance criteria.
Review effort: Balanced
|



Description
Sonar coverage currently includes files under
.github/scripts/, which adds non-application automation code to coverage metrics. This change narrows coverage scope so quality gates remain focused on production modules..github/scripts/**Checklist: