java.lang.IllegalStateException: 0 C/C++/Objective-C files were analyzed

Hello Team,
I am running this sonarqube from my project and I am getting this error. It is not able to scan the c/c++ code. The scanner is running fine but not able to scan the c/c++ code.

Here is the configuration:


Your relative path to source folder may be different


Encoding of the source files


We are also running the build-wrapper as:
build-wrapper-linux-x86-64 --out-dir /home/builds/sonarqube/ssg/build_output make all

attached the build-wrapper.log and build-wrapper-dump.json files
build-wrapper.log (362.0 KB)
build-wrapper-dump.json (26.5 KB)

Hello @kishore535,

Looking at the output of the build wrapper, it seems only the linking step was captured. To properly analyze your project, you need to capture all build commands. To achieve this, it is best to do a clean build.

Analysis Steps Using Build Wrapper gives an example for make:

build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory make clean all

Given your build command, you may want to add clean before all if it is properly defined in your Makefile.

I also see you used a full path for the sonar.sources property. It is best practice to use a relative path instead.

I hope this helps.

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