SimpleCov condition coverage support

SimpleCov now supports Branch Coverage GitHub - simplecov-ruby/simplecov: Code coverage for Ruby with a powerful configuration library and automatic merging of coverage across test suites by enabling enable_coverage :branch

I’m using SimpleCov version 0.21.0 & it worked on my local. But when I run the analysis in SonarCloud, it looks like it’s ignored, so it only shows line coverage.

It looks like this in the coverage.json:

"file.rb": {
      "lines": [
      "branches": [
          "type": "then",
          "start_line": 6,
          "end_line": 6,
          "coverage": 2
          "type": "else",
          "start_line": 8,
          "end_line": 8,
          "coverage": 3

Did I miss something? or it’s not supported yet?
Thank you.

Hello Azhari,

Thanks for bringing this to our attention! You guessed correctly, this is not yet supported on our side, as the logic responsible for importing the reports does not yet know about branch coverage.

I’ve opened a ticket for adding support for branch coverage to the coverage importing sensor.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.