SonarQube Developer Edition - Version 9.1 (build 47736)
Bullseye Version 8.24.0
Bullseye is used by us to measure the coverage on C/C++ code. It marks while (1) - loops as constant, since there’s no condition inside. SonarQube shows this as uncovered line, even if it is covered. Is this a bug in Bullseye or can you provide a fix within SonarQube? I will also contact Bullseye in parallel and keep you updated.
as you see in the screenshot, the line was actually covered (the statements above and below are covered). I sent a request to the Bullseye developers to get some feedback from them as well. I will let you know as soon as I get a reply.
By now I got some feedback from the Bullseye developers:
This is an oversight on our part - for kind=“constant”, there ought be no
‘event’. The ‘constant’ value means there is no instrumentation to collect
coverage. This will be fixed in the next release. In the mean time, you
should ignore the ‘event’ in this case.
So it looks like we just need to wait for the next Bullseye release. Thanks for your time!
Hi @mpaladin
thanks for reopening this issue. Bullseye provided a new released version, with which the mentioned behavior is fixed and so called constants in the coverage reports do not have any event anymore.
Now, I think the cfamily parser for Bullseye might need some adaption, as it crashes now on finding XML elements without an event, as shown in the attached screenshot.
thank you for your report, I created CPP-3386, it is going to be part of the next release, unfortunately, it is too late for SonarQube 9.2, it is going to make it into SonarQube 9.3.
FYI, for kind="constant" the line won’t be marked as being hit. Even in the coverage file you provided there are cases where it is not possible to distinguish between being hit or not.