SonarQube and code coverage

Still, it’s not clear why Sonar uses its own coverage calculation model.
Moreover, I can’t understand where it gets the CT,CF, B values.

For ex., I have a pipeline that runs dotCover and later runs reportGenerator to transform dotCover results into HTML, Cobertura and Sonar formats. Both Cobertura and HTML shows around 46%, but when I import Sonar file into Sonar - it shows 55%. I looked at Sonar file and the only thing I see there - is the lines that were covered or not (e.g. ). There is now any information about conditions, only line coverage.

I wonder where can I read more about the Sonar coverage calculation model? Also, is there a way to instruct Sonar not to use its calculation model but rather use the simple one that other tools leverage?

2 Likes