Skip to content

ci: report sonar.projectVersion from package.json for new-code baseline#2

Merged
cevheri merged 1 commit into
mainfrom
ci/sonar-project-version
Jun 26, 2026
Merged

ci: report sonar.projectVersion from package.json for new-code baseline#2
cevheri merged 1 commit into
mainfrom
ci/sonar-project-version

Conversation

@cevheri

@cevheri cevheri commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

The SonarCloud project's new-code definition is set to Previous version, which only resets the baseline correctly if each analysis reports the project version. The scan did not pass sonar.projectVersion, so the baseline never advanced at releases.

This reads the version from package.json (the single source of truth, kept in sync with core.ts by sync-version) and passes it to the scanner via args: -Dsonar.projectVersion=.... The value is repo-controlled and passed as a scanner arg (not interpolated into a shell command).

CI/workflow-only change; no library source touched.

@sonarqubecloud

Copy link
Copy Markdown

@cevheri cevheri merged commit 6fc5325 into main Jun 26, 2026
6 checks passed
@cevheri cevheri deleted the ci/sonar-project-version branch June 26, 2026 09:29
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