ci/sonar: scope complexity rules to production code, send the release version #75

Merged
pti merged 1 commit from ci/sonar-scope into main 2026-10-19 15:48:28 +02:00
Owner

Repo half of #65, part of #73. The first scan of main reported 144 go:S3776 cognitive complexity findings, 94 of them in _test.go files, and 5 of 14 go:S107 parameter-count findings in tests. Table-driven tests are long by design, so sonar-project.properties now ignores both rules on **/*_test.go through sonar.issue.ignore.multicriteria, versioned in the repo instead of the server UI. The CI scan also passes sonar.projectVersion taken from the last wraptool-v tag, falling back to 0.0.0, so the server-side new-code definition Previous version resets at each release instead of never. Server half already done by the operator: Go quality profile extended with the S3776 threshold at 25, and the project on the built-in Sonar way gate with new-code conditions only. Effect is visible on the first main scan after merge. 🤖 Generated with Claude Code

Repo half of #65, part of #73. The first scan of main reported 144 go:S3776 cognitive complexity findings, 94 of them in _test.go files, and 5 of 14 go:S107 parameter-count findings in tests. Table-driven tests are long by design, so sonar-project.properties now ignores both rules on **/*_test.go through sonar.issue.ignore.multicriteria, versioned in the repo instead of the server UI. The CI scan also passes sonar.projectVersion taken from the last wraptool-v tag, falling back to 0.0.0, so the server-side new-code definition Previous version resets at each release instead of never. Server half already done by the operator: Go quality profile extended with the S3776 threshold at 25, and the project on the built-in Sonar way gate with new-code conditions only. Effect is visible on the first main scan after merge. 🤖 Generated with Claude Code
ci(sonar): scope complexity rules to production code, send the release version
All checks were successful
Lint / lint (pull_request) Successful in 1m19s
Lint / sonarqube (pull_request) Has been skipped
584dd07987
Forgejo #65. The first scan of main reported 144 go:S3776 findings, 94 of
them in _test.go files, and 5 of 14 go:S107 findings in tests. Table-driven
tests are long by design, so both rules now ignore **/*_test.go via
sonar.issue.ignore.multicriteria, versioned here rather than in the server
UI.

The scan also sends sonar.projectVersion from the last wraptool-v* tag
(0.0.0 when none is reachable), so the server's "previous version" new-code
definition resets at every release instead of never.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
pti merged commit 8f1970583b into main 2026-10-19 15:48:28 +02:00
pti deleted branch ci/sonar-scope 2026-10-19 15:48:28 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pti/wraptool!75
No description provided.