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

**URL:** <https://community.sonarsource.com/t/the-compilation-database-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed-please-mak/101340>\
**Category:** SonarQube Cloud\
**Created:** [September 23, 2023, 1:37pm UTC](https://community.sonarsource.com/t/the-compilation-database-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed-please-mak/101340 "2023-09-23T13:37:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlieksieievYurii](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/alieksieievyurii/32/49611_2.png) [@AlieksieievYurii](https://community.sonarsource.com/u/AlieksieievYurii)\
**Post date:** [September 23, 2023, 1:37pm UTC](https://community.sonarsource.com/t/the-compilation-database-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed-please-mak/101340/1 "2023-09-23T13:37:39Z")

</div>

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 ☹  
I’ve attached the compile\_commands.json and the log from SonarCloud task.  
[compile\_commands.json](https://community.sonarsource.com/uploads/short-url/dc4dfspobSbYZHx8cfu9t9MI06U.json) (25.3 KB)

[log.txt](https://community.sonarsource.com/uploads/short-url/2Zn5VO9NfiUxqWUz3mns47q7m9h.txt) (67.0 KB)

---

<div class="post-metadata">

**Author:** ![aalvarez](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/aalvarez/32/39649_2.png) [@aalvarez](https://community.sonarsource.com/u/aalvarez)\
**Post date:** [September 25, 2023, 2:28pm UTC](https://community.sonarsource.com/t/the-compilation-database-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed-please-mak/101340/4 "2023-09-25T14:28:06Z")

</div>

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`](https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c).

There is one [example of using a compilation database in GitHub Actions](https://github.com/sonarsource-cfamily-examples/linux-cmake-compdb-gh-actions-sc/blob/main/.github/workflows/build.yml).

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

Regards,  
Alejandro

---

<div class="post-metadata">

**Author:** ![simon-stathealth](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/simon-stathealth/32/56251_2.png) [@simon-stathealth](https://community.sonarsource.com/u/simon-stathealth)\
**Post date:** [April 5, 2024, 12:57pm UTC](https://community.sonarsource.com/t/the-compilation-database-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed-please-mak/101340/6 "2024-04-05T12:57:07Z")

</div>

did you ever solve this issue? i am experiencing the same issue.
