sonar: exclude tests from complexity and parameter rules, raise the S3776 threshold #65

Closed
opened 2026-10-19 15:26:41 +02:00 by pti · 1 comment
Owner

First SonarQube scan of main reports 209 issues. 144 are go:S3776 cognitive complexity above 15, of which 94 sit in _test.go files, and 5 of the 14 go:S107 too-many-parameters findings are in tests. Table-driven tests are complex by design, so the signal is noise there. Proposal: add sonar.issue.ignore.multicriteria entries in sonar-project.properties scoping go:S3776 and go:S107 to non-test files, and raise the S3776 threshold from 15 to 25 in the Go quality profile on the server, which leaves roughly 37 production functions to refactor. Also set the quality gate to new-code conditions so main stays green while legacy debt is worked down. Part of the SonarQube cleanup tracking issue.

First SonarQube scan of main reports 209 issues. 144 are go:S3776 cognitive complexity above 15, of which 94 sit in _test.go files, and 5 of the 14 go:S107 too-many-parameters findings are in tests. Table-driven tests are complex by design, so the signal is noise there. Proposal: add sonar.issue.ignore.multicriteria entries in sonar-project.properties scoping go:S3776 and go:S107 to non-test files, and raise the S3776 threshold from 15 to 25 in the Go quality profile on the server, which leaves roughly 37 production functions to refactor. Also set the quality gate to new-code conditions so main stays green while legacy debt is worked down. Part of the SonarQube cleanup tracking issue.
Author
Owner

done.

done.
pti closed this issue 2026-10-19 20:15:18 +02:00
Sign in to join this conversation.
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#65
No description provided.