which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension): SonarQube: 9.2-developer, SonarScanner: 4.6.2.2472, CFamily plugin version: 6.20.2.38358, build-wrapper: /build-wrapper-output/build-wrapper-dump.json was generated using 6.20 build-wrapper version
what are you trying to achieve: scan my code
what have you tried so far to achieve this: update all the plugins and sonar to latest
Using Texas Instruments v20.2.5.LTS for CC1352P - compiler
How I wrap build command:
Texas Instruments compiler are supported only on macOS and Windows, as stated in our documentation:
Texas Instruments compilers on Windows and macOS for ARM, C2000, C6000, C7000, MSP430, and PRU
The primary reason is the fact that TI compilers on linux are statically built and build-wrapper is not able to work with statically linked binary. You can try to generate a JSON Compilation Database, i.e. using bear tool and using the JSON Compilation Database as configuration.
Hi @mpaladin Thanks for your answer. I was working on changing container from Linux to Windows. And still result isn’t proper. Could you help me With solving this issue. Looks like I missed something and can’t get what exactly.
Hi @mpaladin ,
Sorry, forgot to paste
ERROR: Error during SonarScanner 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
But json file isn’t empty. Can send you in private messages (as file contain env variables and additional info from build etc…)
For the records, the issue was coming from misconfiguration of the sonar-scanner, the set of indexed files was different from the set of built files. The issue has been solved.
If you didn’t see – last year we introduced support in SonarQube Server for a feature called C/C++ AutoConfig! Removing the question of supported compiler altogether.
This is available in SonarQube Server v10.6+, although you should really target at least v2025.1.