SonarQube support for --install flag in catkin/colcon

I’m using SonarQube on a Bamboo build farm, version 8.9.10. I’m currently building a ROS workspace with catkin, and header files go missing during analysis if a --install flag is used.

Specifically, this set of commands work when scanned with no missing files:

catkin config -e /opt/ros/$ROSDISTRO --link-devel --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=1;

configuration/SonarQube/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output catkin build

But this one does not, and results in missing files:

catkin config -e /opt/ros/$ROSDISTRO --install --link-devel --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=1;

configuration/SonarQube/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output catkin build

The --install flag is documented here: catkin config – Configure a Workspace — catkin_tools 0.0.0 documentation

This is very likely related to the issues I’ve put on this forum in the past, particularly the issues with colcon since colcon creates the install directory automatically.

Hi,

To be clear, when you say your “header files go missing”, do you mean they’re deleted and/or don’t end up in the install space? Or do you mean they’re there but overlooked by analysis?

 
Ann

They’re in the expected build location, but not found by SonarQube’s analysis. Check out my linked issues for clarification on the exact error messages and symptoms I’m seeing.

1 Like

Hi @jrl2n4 ,

would you be able to share the analysis log in debug mode and the build-wrapper or compilation database file you are using? I can send you a private message if you prefer to share it privately.