Skip to content

PoC: evaluate SonarCloud as a code quality and coverage tool#4996

Open
fernandolins wants to merge 10 commits into
mainfrom
chore/sonarcloud-integration
Open

PoC: evaluate SonarCloud as a code quality and coverage tool#4996
fernandolins wants to merge 10 commits into
mainfrom
chore/sonarcloud-integration

Conversation

@fernandolins

@fernandolins fernandolins commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Linked issue

Closes #4995

Summary / motivation

Bedges available:
Coverage
Duplicated Lines (%)
Code Smells
Bugs
Quality Gate Status

SONAR DASHBOARD

Integrates SonarCloud into the CI pipeline as a proof of concept to evaluate whether
it surfaces actionable quality and security insights for this codebase.

Changes:

  • Added sonar-project.properties configuring sources (pylib, qt, ts, rslib)
    and coverage report paths
  • Extended tools/coverage/coverage-py (and .bat) to emit coverage.xml (Cobertura)
  • Extended tools/coverage/coverage-ts (and .bat) to emit lcov.info via the V8 provider
  • Extended tools/coverage/coverage-rust (and .bat) to emit lcov.info via
    cargo-llvm-cov report
  • Added a SonarCloud Scan step to the check-linux CI job, running after all
    checks pass and before the build cache is saved

How to test

Details

1. Install sonar-scanner

brew install sonar-scanner

2. Generate and configure a token

Go to sonarcloud.io → My Account → Security → Generate Token
Copy the generated token and export it in your shell:

export SONAR_TOKEN=your_token_here

3. Generate coverage reports

just test --coverage

Expected output files:

  • out/coverage/python-pylib/coverage.xml
  • out/coverage/python-qt/coverage.xml
  • out/coverage/typescript/lcov.info
  • out/coverage/rust/lcov.info

4. Run the scanner manually

sonar-scanner

Results will appear in the SonarCloud dashboard

To test coverage generation locally:

just coverage
# verify files exist:
# out/coverage/python-pylib/coverage.xml
# out/coverage/python-qt/coverage.xml
# out/coverage/typescript/lcov.info
# out/coverage/rust/lcov.info

@read-the-docs-community

read-the-docs-community Bot commented Jun 16, 2026

Copy link
Copy Markdown

Documentation build overview

📚 Anki | 🛠️ Build #33253635 | 📁 Comparing 03db7b2 against latest (02e16b5)

  🔍 Preview build  

8 files changed · ± 8 modified

± Modified

@sonarqubecloud

Copy link
Copy Markdown

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.

PoC: evaluate SonarCloud as a code quality and coverage analysis tool

1 participant