Integrate sonarCloud or sonarQube for C/C++ project buit inside docker in travis pipeline

Hi All,

I’m trying to integrate sonarCloud in our travis CI for a C/C++ project.
The application is built inside docker.

I read some documentation and I understand that there are some issues to integrate sonarCloud for C/C++ projects built inside docker. (a note from sonarcloud

The Build Wrapper collects information about the build including absolute file paths (source files, standard headers, libraries, etc…). Later on, SonarScanner uses this information and needs to access those paths. Whereas this is straightforward while running these 2 steps on the same host, it is worth some consideration when using any sort of containerization. A consequence of this is that C / C++ / Objective-C analysis is NOT supported by SonarScanner CLI Docker image

It seems that an option is run sonarScanner directly inside a docker (As it is commented here)

But I can’t find the documentation of how to configure all the tools to analyze the code and report information to sonarCloud.

How can I config my project?

Thanks in advance
Best regards
Jordi

Hello @jordi,

Welcome to the community!

It is not clear to me which tool you are referring to, The documentation that you shared includes “Analysis Steps” Did you follow this section? Is there any step that was not clear?

Please provide more precise questions so we can help you better!

Thanks,