Skip to content

fix(sonar): Batch 11 maintainability + coverage CI wiring - #41

Merged
konih merged 8 commits into
mainfrom
batch11-sonar-maintainability
Aug 4, 2026
Merged

fix(sonar): Batch 11 maintainability + coverage CI wiring#41
konih merged 8 commits into
mainfrom
batch11-sonar-maintainability

Conversation

@konih

@konih konih commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • E5-S18 — nested comments in empty apis/{cluster,namespaced}/v1alpha1/register.go init() (go:S1186 / D-023)
  • E5-S19 — lower cognitive complexity + named CRD view types in config/*_test.go (S3776 / S8205)
  • Coverage CI — wire SonarCloud analysis so cover.out reaches Sonar (sonar-project.properties, coverage.yml sonar job, dispatch shim, sonar_pg_09_*)
  • E5-S21 — quote Dockerfile Setup Terraform expansions (docker:S6570); preserve E5-S17 COPY
  • E5-S20 — shell hygiene (S131 / S7677 / S7688 / S1066) + e2e PG-04 meta aligned with read-only floor (D-025)

OpenSpec: openspec/changes/sonar-maintainability-2026-08/ (PG-M01…M08).

Operator follow-up (non-blocking)

  • D-024: disable Sonar Autoscan + add GitHub secret SONAR_TOKEN so coverage uploads succeed.

Test plan

  • Independent review APPROVE on each lane
  • Local gates (meta tests / go test ./config/ / Dockerfile meta) green before merge
  • CI on main after land

konih added 8 commits August 4, 2026 00:50
Satisfy go:S1186 on Upjet scaffold init stubs without AddToScheme; types
register via SchemeBuilder / generated zz_*.go. Adds REQ-SONAR-PG-M01 meta
test and OpenSpec sonar-maintainability-2026-08 scaffold + pg-m01.
Satisfy go:S1186 without AddToScheme (D-023). Meta test + OpenSpec PG-M01.
…-S19

Extract helpers so TestCRDGoldenContract, TestCRDStructuralInvariants, and
FuzzGetExternalName stay ≤ Sonar S3776 threshold; replace anonymous nested
crd view structs with named types (godre:S8205) without changing goldens.
Automatic Analysis cannot import Go coverprofiles. Add sonar-project.properties
(pointing at make coverage's cover.out), a sonarcloud job on the Coverage
workflow, and a workflow_dispatch shim — matching kollect/mkurator. Preserve
CPD exclusions from .sonarcloud.properties. Operator must disable Autoscan and
add repo secret SONAR_TOKEN before the first successful upload.
Case default, stderr, [[, merged nested ifs. Align e2e PG-04 meta with
workflow read-only floor (a311484); forbid workflow write/admin scopes.
Tighten D-025 read-only floor check; document contract in OpenSpec M04.
@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@konih
konih merged commit f9f4628 into main Aug 4, 2026
16 of 17 checks passed
@konih
konih deleted the batch11-sonar-maintainability branch August 4, 2026 09:55
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