fix(sonar): use sonar.rust.lcov.reportPaths instead of generic coverage XML
CI / Rust Format (pull_request) Successful in 18s
CI / Dependency-Track (BOM) (pull_request) Successful in 22s
CI / Rust Tests + Coverage (pull_request) Successful in 1m24s
CI / Clippy (SARIF) (pull_request) Successful in 1m41s
CI / TypeScript Lint + Typecheck (pull_request) Successful in 23s
CI / TypeScript Tests + Coverage (pull_request) Successful in 34s
CI / SonarQube (pull_request) Successful in 51s
CI / E2E Tests (Playwright + Electron) (pull_request) Successful in 1m42s
CI / Electron Release Build (pull_request) Successful in 2m5s

Sonar job failed parsing target/sonar-rust-coverage.xml (Generic Coverage).
Official Rust import is LCOV via sonar.rust.lcov.reportPaths; drop XML
conversion in CI and keep target/lcov.info in the test-reports artifact.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-09 01:32:08 -04:00
parent 39e31c9534
commit 5170ad633c
3 changed files with 3 additions and 12 deletions
-6
View File
@@ -96,11 +96,6 @@ jobs:
--flavor rust \
--repo-root "${GITHUB_WORKSPACE:-.}" \
--strict
python3 scripts/lcov_to_sonar_coverage.py \
--input target/lcov.info \
--output target/sonar-rust-coverage.xml \
--repo-root "${GITHUB_WORKSPACE:-.}" \
--strict
echo "=== sonar-test-execution.xml ==="
cat target/nextest/ci/sonar-test-execution.xml || echo "(file not found)"
@@ -109,7 +104,6 @@ jobs:
name: test-reports
path: |
target/lcov.info
target/sonar-rust-coverage.xml
target/nextest/ci/junit.xml
target/nextest/ci/sonar-test-execution.xml
if-no-files-found: warn
-2
View File
@@ -50,8 +50,6 @@ else
run "tests + coverage" cargo llvm-cov nextest --workspace --profile ci --lcov --output-path target/lcov.info
run "junit → Sonar test execution (Rust)" \
python3 scripts/junit_to_sonar_test_execution.py --flavor rust --repo-root . --strict
run "LCOV → Sonar Rust coverage (Generic XML)" \
python3 scripts/lcov_to_sonar_coverage.py --input target/lcov.info --repo-root . --strict
fi
# ── 4. Cargo Deny (optional) ────────────────────────────────────────────────────
+3 -4
View File
@@ -11,13 +11,12 @@ sonar.inclusions=**/*.rs
sonar.rust.clippy.enabled=false
sonar.sarifReportPaths=target/clippy-report.sarif
# Rust: CI converts target/lcov.info → target/sonar-rust-coverage.xml (Generic Coverage).
# TypeScript still uses sonar.javascript.lcov.reportPaths below.
sonar.coverageReportPaths=target/sonar-rust-coverage.xml
# Rust coverage: native LCOV import (Sonar Rust analyzer). Do not use sonar.coverageReportPaths for .rs —
# the Generic Coverage sensor fails on our converted XML on SQ 26.x; see test-coverage-parameters (Rust).
sonar.rust.lcov.reportPaths=target/lcov.info
# Generic test execution import is disabled: SonarQube 26.4 + JS bridge intermittently fails while reading
# sonar-test-execution.xml (InterruptedException in BridgeServerImpl.isAlive, then a misleading parse error).
# CI still generates test-results/sonar-test-execution.xml (Vitest) and target/nextest/ci/... (Rust) for debugging.
# Coverage and issue analysis are unchanged (LCOV + generic Rust coverage + SARIF).
sonar.scm.provider=git