SonarCFamily for VxWorks

I am attempting to setup SonarQube for my Vxworks C++ environment. Wind River VxWorks provides a custom flavor of GCC to be able to compile VxWorks libraries. Unfortunately, it seems like sonar-scanner or the build-wrapper are unable to pickup the -mrtp flag used to compile VxWorks RTP Applications. The -mrtp flag just tells GCC to compile the project for VxWorks RTP. Has anyone had any luck configuring SonarQube for VxWorks?

Thanks.

Hi @esduran,

we officially support GCC compiler, we don’t have official support for Wind River VxWorks, did you try to give it a go to see what result you get?

Hello @mpaladin,

I have tried going through building our project with the build-wrapper and the sonar-scanner tool. It executes both successfully but it in SonarQube it reports zero bugs even when I purposefully put bugs in the code. I even tried compiling a simple source file with our Wind River GNU compiler and it works as long as I do not include any VxWorks headers. It seems like either the build-wrapper or sonar-scanner completely ignore the file if it has anything VxWorks related, due to the -mrtp compiler option.

Hi @esduran,

could you please share with me your sonar-scanner log and build-wrapper-dump.json file? I am sending you a PM where you can share them privately.

1 Like

Hi @esduran,

I created a ticket which is going to help in your case CPP-2194. It is going to be released in the upcoming days.

1 Like

That is great news! Thank you @mpaladin so much for your help.

Hi @esduran,

version 6.2 of the C/C++ analyser has been made public in the marketplace and includes CPP-2194.

2 Likes

Just updated to version 6.2 and it works perfectly now. Thanks @mpaladin for your help and for fixing this issue!

2 Likes