I’m using SonarQube Developer Edition 8.3.1 on a Windows machine
I tried to build the attached HelloSonarCPP on the mac and windows - in both cases the same error:
13:01:00.301 ERROR: Error during SonarQube Scanner 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.execute(CFamilySensor.java:385)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
What I did on windows:
clone repo and cd into repo
C:\software\cygwin\bin\cmake CMakeLists.txt
./ci/build-wrapper-win-x86/build-wrapper-win-x86-64.exe --out-dir build_wrapper_output_directory C:\software\cygwin\bin\make -C ./ clean all
sonar-scanner -X
what I did on mac
clone repo and cd into repo
cmake CMakeLists.txt
./ci/build-wrapper-macosx-x86/build-wrapper-macosx-x86 --out-dir build_wrapper_output_directory make -C ./ clean all
sonar-scanner -X
Attached is the repo and the build_wrapper_output_directory ()
I did it, but I have the same problem.
On mac, I did the last step (sonar-scanner -X) on a Windows-machine (because of VPN access). I think, that is the reason on the mac side. Right?
MacOSX: clone repo and cd into repo
MacOSX: cmake CMakeLists.txt
MacOSX: ./ci/build-wrapper-macosx-x86/build-wrapper-macosx-x86 --out-dir build_wrapper_output_directory make -C ./ clean all
Win10: sonar-scanner -X
good to hear, MinGW preserves paths Windows style. Did you also change compiler?
The sonar-scanner output log is the standard output/error printed by the sonar-scanner, it would be nice if you could share it running an analysis with sonar.verbose=true property.