Skip to content

ci: bring back the SonarCloud scan - #231

Merged
obalunenko merged 1 commit into
masterfrom
ci/restore-sonar
Nov 15, 2026
Merged

obalunenko merged 1 commit into
masterfrom
ci/restore-sonar

Conversation

@obalunenko

Copy link
Copy Markdown
Owner

Description

Brings back the SonarCloud scan that #230 removed. Since #230 Sonar has not analyzed anything: the last analysis of #229 is from commit 5552837.

In the Quality reports job:

  • make test-cover again also writes tests-report.json (go test -json);
  • a golangci-lint step writes the checkstyle report linters-report.xml;
  • the sonarqube-scan-action step with SONAR_TOKEN is back; the secret is still in the repo.

What differs from the setup before #230:

  • The checkstyle report is requested with --output.checkstyle.path in the CI step only, not in .golangci.yml. Before, every local make lint-full left linters-report.xml in the working tree. I checked that the flag keeps the text output from the config and writes the findings to the report.
  • sonar-project.properties without sonar.projectVersion=1.0 and the vendor/ exclusions. vendor/ was removed in chore: lower minimum Go to 1.26.0, test on stable/oldstable, drop vendor/ #225.

Also restored: the Quality Gate badge in the README, and the tests-report.json and linters-report.xml entries in .gitignore.

Github Issue

—

Possible failures/side-effects

  • make test-cover writes the go test output to tests-report.json, so the terminal stays silent; this was the case before chore: trim tooling to what a small library needs #230 too. A failing test still fails the target.

  • Sonar has not seen commits after 5552837. The first analysis on master after the merge may show a large "new code" diff.

  • Local checks:

    • make test-cover writes coverage/full.cov and tests-report.json;
    • workflow YAML syntax is valid;
    • golangci-lint with the checkstyle flag writes the report.

    The scan step itself is checked only by this PR's CI run.

🤖 Generated with Claude Code

#230 dropped the scan, and Sonar has not analyzed anything since. Restore
it in the reports job with its inputs: the coverage profile, the go test
JSON report and the golangci-lint checkstyle report.

The checkstyle report is now requested with a flag in that one step, not
in .golangci.yml, so local lint runs no longer leave linters-report.xml
behind. sonar-project.properties drops the stale projectVersion and the
vendor/ exclusions, as vendor/ is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@obalunenko
obalunenko merged commit 5965689 into master Nov 15, 2026
9 checks passed
@obalunenko
obalunenko deleted the ci/restore-sonar branch November 15, 2026 21:09
@codecov

codecov Bot commented Nov 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8fe5733) to head (cd66009).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #231   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           99        99           
=========================================
  Hits            99        99           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant