Must-share information (formatted with Markdown):
- SonarQube cloud LTS9.9
- what are you trying to achieve: I tried to analyze C language files with sonar-scanner
- what have you tried so far to achieve this: The compiler (ccblkfn.exe from Analog Devices) used in my project is not officially supported by SonarQube. So as recommended, I manually created a compile_commands.json file with detailed compilation information. I saved this file together with a sonar-project.properties file in the root directory of my project and executed “sonar-scanner.bat -Dsonar.login=Mycredential” command. After a while of execution, I got the following results:
16:25:04.641 ERROR: Error during SonarScanner execution java.lang.IllegalStateException: The Compilation Database JSON file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that: * you are correctly invoking the scanner with correct configuration * your compiler is supported * you are providing the path to the correct Compilation Database JSON * 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:494) at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:215) at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
I don’t know how to debug this problem. According to my understanding, compilation database is the method for C compilers which are not supported by sonar-build-wrapper. Does the error message mean that this compilation database method is not possible?
Could you please kindly help? Thanks in advance.
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!