Skip to content

Downgrade simplecov to 0.22.0 — SonarQube can't parse 1.0 JSON schema - #1435

Merged
IgnacioN99 merged 3 commits into
mainfrom
fix/simplecov-sonar-compat
Jul 31, 2026
Merged

Downgrade simplecov to 0.22.0 — SonarQube can't parse 1.0 JSON schema#1435
IgnacioN99 merged 3 commits into
mainfrom
fix/simplecov-sonar-compat

Conversation

@IgnacioN99

Copy link
Copy Markdown
Contributor

Board:

  • N/A — dependency compatibility fix, no ticket

Description:

CI was failing on the "Merge Results" job with:

ERROR Cannot read coverage report file, expecting standard SimpleCov JSON formatter output: 'coverage/coverage-0.json'

Root cause: simplecov 1.0.0 (bumped from 0.22.0 in #1434) changed the JSON formatter output in two ways SonarQube's SimpleCovSensor can't handle:

  1. A top-level $schema string field, which breaks the sensor's naive JSONObject probe (ClassCastException).
  2. Per-file coverage keyed on relative paths instead of absolute paths, which the sensor's file lookup doesn't resolve.

This is a known, currently-unfixed incompatibility:

This PR pins simplecov back to ~> 0.22.0 in the Gemfile and locks docile, simplecov-html, and simplecov_json_formatter back to their prior versions (the JSON formatter was merged into simplecov core in 1.0, dropping those as separate deps).


Notes:


Tasks:

  • Pin simplecov to ~> 0.22.0 in Gemfile
  • Regenerate Gemfile.lock via bundle lock --update simplecov (Docker)
  • Confirm CI/SonarQube coverage import succeeds on this branch

Risk:

  • Low — test-only gem, no runtime/app code affected. Rollback is reverting this single commit.

Preview:

  • N/A — no observable app-facing surface, CI-only fix

@IgnacioN99
IgnacioN99 marked this pull request as ready for review July 31, 2026 17:05
…chema)

simplecov 1.0.0 changed the JSON formatter output (top-level $schema
field, relative file paths) in a way SonarQube's SimpleCovSensor
can't parse, so every CI run fails coverage import with
"Cannot read coverage report file, expecting standard SimpleCov
JSON formatter output". Confirmed via sonar-ruby PR #160 (open,
unreviewed) and simplecov-ruby/simplecov#1228. Pinning back to
0.22.0 until sonar-ruby ships a fix.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@IgnacioN99
IgnacioN99 force-pushed the fix/simplecov-sonar-compat branch from c1eb36b to f61694c Compare July 31, 2026 17:07
…arsing

Prevents dependabot from re-proposing the bump we just reverted for
SonarQube compatibility (see previous commit / sonar-ruby PR #160).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
bundle lock --update simplecov (run via docker, linux-only) had
stripped the arm64-darwin/x86_64-linux platform entries for ffi,
nokogiri, and pg. Restored them so the lockfile still resolves on
both dev (macOS) and CI (linux).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@IgnacioN99
IgnacioN99 merged commit 17a2bc1 into main Jul 31, 2026
5 checks passed
@IgnacioN99
IgnacioN99 deleted the fix/simplecov-sonar-compat branch July 31, 2026 17:27
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.

3 participants