The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed

Hi Team I am facing this issue

<15:46:21.596 ERROR Error during SonarScanner CLI execution
java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that:
  * you are using the latest version of the build-wrapper and the CFamily analyzer
  * you are correctly invoking the scanner with correct configuration
  * your compiler is supported
  * you are wrapping your build correctly
  * you are wrapping a full/clean build
  * you are providing the path to the correct build-wrapper output directory
  * you are building and analyzing the same source checkout, absolute paths must be identical in build and analysis steps
        at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:609)
        at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:241)
        at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
        at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
        at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:64)
        at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
        at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:223)
        at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:202)
        at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:197)
        at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:193)
        at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:166)
        at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:223)
        at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:202)
        at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)
        at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:223)
        at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:202)
        at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:138)
        at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:223)
        at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:202)
        at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:71)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:65)
        at org.sonarsource.scanner.lib.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:41)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.sonarsource.scanner.lib.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:62)
        at jdk.proxy3/jdk.proxy3.$Proxy2.execute(Unknown Source)
        at org.sonarsource.scanner.lib.InProcessScannerEngineFacade.doAnalyze(InProcessScannerEngineFacade.java:39)
        at org.sonarsource.scanner.lib.ScannerEngineFacade.analyze(ScannerEngineFacade.java:61)
        at org.sonarsource.scanner.cli.Main.analyze(Main.java:77)
        at org.sonarsource.scanner.cli.Main.main(Main.java:63)
15:46:21.602 ERROR>

Can you help how to resolve it, attaching logs for your reference

Thanks,
Altaf
bw-output.zip (792.4 KB)

Hey there.

Could you provide your complete scanner logs as well? The output of sonar-scanner -X.

Hi Colin,

Please find the requested logs.
SonarfailXdebug.txt (909.1 KB)

Thanks,
Altaf

It looks like you only have one file that is indexed as C/C++/Objective-C, and it doesn’t look like source code.

18:57:42.457 DEBUG 'CMakeFiles\3.26.4\CompilerIdC\CMakeCCompilerId.c' indexed with language 'c'

I see lots of files with the .cpp.o or .cpp.o.d file extension. Are these supposed to source code files you anaylzed, or is this the compiled code?

I think you’ve started your analysis from the build directory rather than the source code directory.

18:57:18.680 INFO Base dir: C:\Users\kondasar\Music\KSCP2\PLAC_Application\Build