GCOV support branch/conditional coverage for c language?

We are using SonarQube Developer edition.
Our code base in C language and we are using gcov tool for code coverage.

It’s observed, we are not getting branch or condition coverage for in SonarQube.
Is GCOV only support line coverage and not support branch or condition coverage.
GCC version we are using-cgcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04)

What version of SonarQube are you using? It should be noted in the footer of your SonarQube instance.

SonarQube version

  • Developer Edition
  • Version 9.9.1 (build 69595)

Thanks. Branch/condition coverage should be imported – we support reading this information from the gcov support.

Can you provide a screenshot indicating that Lines to Cover are detected but no Condition coverage (in the Measures tab of your project), as well as a copy of the coverage report where you expect the coverage to be reported?

Hi Below is the screen shot shows conditional coverage is 0

what is the way to import branch coverage in sonarqube?

Any update here ?

Hi @Colin Can you please guide on this issue?

Coming back to this point:

Here, I was referring to the reports that are being fed to the scanner (see the documentation here). In these reports you should be able to see if condition coverage is actually being reported (that’s the only way SonarQube would know about it).

If possible it would be useful to share one of the raw reports where you expect to see condition coverage.