SonarQube Integration with Jenkins for C language

Hi,

We are using SonarQube ver 7.9.3. Code C.
Main question is:
Must we build code in Jenkins before scaning SonarQube? Or the scanning can be done without build in Jenkins?
What would be the difference?

Many thanks!
Talia

Hello @TaliaDo ,
To be able to analyze your code, you need to build it otherwise we won’t know what to analyze.
So without build, the results of the analysis will be empty :slight_smile:

In addition to this, for C code, you also need to wrap your build on Jenkins with build-wrapper-win-x86-64.exe --out-dir bw-output.
To do that, I invite you to read the documentation.
You can add the download of the build wrapper before its execution and you should end up with something like:

curl -L -O {SonarQube URL}/static/cpp/build-wrapper-win-x86.zip
unzip build-wrapper-win-x86.zip
build-wrapper-win-x86\build-wrapper-win-x86-64.exe --out-dir  bw-output make clean test

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