java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found but 0

we have a project that we manage to scan and push to sonar succussfully with sonar scanner (see Sonar GUI screenshot)

the project strucure is:

                src

               out

                    blackwell
              debug

                     coverity

BUT
we want to exclude the “out” and “debug” folders which are the project build output and only to include the “src” folder
so we tried to configure:

sonar.sources=src/
or
to exclude the out and debug folders

in both cases when trying to narrow the scope only to src, the scanner failed with the error :
ERROR: Error during SonarScanner execution
12:27:50 java.lang.IllegalStateException: The “build-wrapper-dump.json” file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that:
12:27:50 * you are using the latest version of the build-wrapper and the CFamily analyzer
12:27:50 * you are correctly invoking the scanner with correct configuration
12:27:50 * your compiler is supported
12:27:50 * you are wrapping your build correctly
12:27:50 * you are wrapping a full/clean build
12:27:50 * you are providing the path to the correct build-wrapper output directory
12:27:50 * you are building and analyzing the same source checkout, absolute paths must be identical in build and analysis steps…

note in the screenshot from sonar GUI that sonar also take the whole paths out/blackwell as if it is one folder (same for debug/coverity)

facts:
Sonarcube version: 10.5.1
analyzer version 6.54.0.69031
build-wrapper version 6.52.1
running on docker (same for build and analysis)

Hi,

Let’s talk about your build. Can you share your pipeline? And what compiler do you use?

 
Thx,
Ann

not sure regarding the compliation proccess itself . but we run the build with sonar wrapper inside docker. every works as expected but failed when trying to exclude those specific two folders

Hi,

Are you saying analysis works until you try to narrow the scope?

When analysis works, do the contents of src show up in SonarQube?

 
Thx,
Ann