The Compilation Database JSON file was found but 0 C/C++/Objective-C files were analyzed. Please mak

Hi,

I am using SonarCloud in my CI pipeline in GitHub Actions. My project is Arduino based.
I compile by using the arduino-cli. It uses avr-g++ under the hood.
Moreover, I can generate compile_commands.json for the code I want to analyze.
But when I run SonarCloud task, I am getting The Compilation Database JSON file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that:

Could you help me because I can not really understand what is wrong :frowning:
I’ve attached the compile_commands.json and the log from SonarCloud task.
compile_commands.json (25.3 KB)

log.txt (67.0 KB)

Hello @AlieksieievYurii,

It seems that you are using SonarSource/sonarcloud-github-action@v2.0.2, but for CFamily you need to use sonarsource/sonarcloud-github-c-cpp@v2.

There is one example of using a compilation database in GitHub Actions.

Please, give it a try and let me know if that helped.

Regards,
Alejandro