Build wrapper with Clang++ and Bullseye

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
  • error observed (wrap logs/code around triple quote ``` for proper formatting)
  • steps to reproduce
  • potential workaround

P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour

I’m trying to get a bullseye report for my c++ project.

My Issue is when i export CXX = "/opt/BullseyeCoverage_8_17_6/bin/covc clang++" then build-wrapper couldn’t recognize cpp files. It says The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed..

When I changed export CXX = "/opt/BullseyeCoverage_8_17_6/bin/clang++" then sonar scaning succeed but bullseye coverage result is 0%.

How can I get both succeed bullseye coverage and sonar-scanner result using clang++?

Here’s versions I use.

  • Bullseye version 8.17.6
  • SonarQube v. 8.3.0.34182
  • Sonar Scanner v4.4.0
  • CFamily plugin version v.6.9.0.17076

Hello @jaeeun2-choi,

From what you said, I’m not sure about how you use BW (build-wrapper) nor the scanner, maybe you could be more specific here? What commands are used? Logs?
Likely the first scenario does not compile files, then the BW output is empty and no analysis could happen.

As the doc says, general requirements are:

  • BW must wrap your build (meaning compiling steps must be executed)
  • creating the Bullseye report can be done during the build, or after, this doesn’t matter
  • both parameters sonar.cfamily.build-wrapper-output and sonar.cfamily.bullseye.reportPath are passed to the scanner at the end, so he can read the BW output and import the report

Does it make things clearer?

I solved my problem! It was bullseye’s environment variable issue. Thanks for the reply :slight_smile:

Great, good to know.

Could you please put your comment as the topic solution? So it properly closes it. Thank you.

Antoine

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