# "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed

**URL:** <https://community.sonarsource.com/t/build-wrapper-dump-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed/70129>\
**Category:** SonarQube Cloud\
**Tags:** cfamily, sonarqube-cloud, scanner\
**Created:** [August 19, 2022, 4:27pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed/70129 "2022-08-19T16:27:39Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ferat-Imrak](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ferat-imrak/32/35801_2.png) [@Ferat-Imrak](https://community.sonarsource.com/u/Ferat-Imrak)\
**Post date:** [August 19, 2022, 4:27pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed/70129/1 "2022-08-19T16:27:39Z")

</div>

I am integrating sonarcloud with GitHub actions to scan my repo for objective-c, c and swift languages. But I got this error. I checked other posts but couldn’t find any solution. Please help me. Thanks in advance!  
Here is my logs file for your review.

(logs removed)

```auto
java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that:
INFO: ------------------------------------------------------------------------
  * 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.process(CFamilySensor.java:462)
	at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:202)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:62)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:51)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:446)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:442)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:400)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:130)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
ERROR: 
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
Error: Process completed with exit code 1.

```

---

<div class="post-metadata">

**Author:** ![Abbas](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/abbas/32/5717_2.png) [@Abbas](https://community.sonarsource.com/u/Abbas)\
**Post date:** [August 20, 2022, 1:34pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed/70129/4 "2022-08-20T13:34:59Z")

</div>

Hi @Ferat-Imrak,

Build-wrapper wraps your build command and stores the commands of the files it compiles in the build-wrapper.json file.

The error you are facing means that we didn’t find any c/objc/c++ file indexed by the scanner with an entry in build-wrapper.json.

1- Is it the first time you have tried to analyze this project?  
2- Does the command provided to build-wrapper compile the c/objc/c++ files in the scanned directories?  
3- Do you see the files you want to analyze in the build-wrapper.json?

Please upload the scanner logs in verbose mode and the build-wrapper.json and .log files for further investigation. Let me know if you prefer to share them privately.

Thanks,

---

<div class="post-metadata">

**Author:** ![Ferat-Imrak](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ferat-imrak/32/35801_2.png) [@Ferat-Imrak](https://community.sonarsource.com/u/Ferat-Imrak)\
**Post date:** [August 22, 2022, 2:46pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed/70129/5 "2022-08-22T14:46:17Z")

</div>

Hi @Abbas ,  
Thanks for responding.

1. yes this is first time analyzing the project.
2. this is the command that i am using:

```auto
xcodebuild -project SfaraSDK-example/SfaraSDK-example.xcodeproj -scheme SfaraSDK-example -configuration Release clean build -arch arm64 BITCODE_GENERATION_MODE=bitcode ONLY_ACTIVE_ARCH=NO -sdk iphoneos BUILD_LIBRARIES_FOR_DISTRIBUTION=YES CODE_SIGNING_ALLOWED="NO" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS=""

```

1. Honestly i started using sonarcloud recently and I am running it in GitHub actions. so i don’t know how to get build-wrapper.json from github.  
I would like to share them privately.

the xcodebuild command is running `SfaraSDK-example/SfaraSDK-example.xcodeproj` this directory as for project directory but objective-c files are in this directory `SfaraSDK-example/SfaraSDK.xcframework`  
how can i scan the whole files and folders?

---

<div class="post-metadata">

**Author:** ![Ferat-Imrak](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ferat-imrak/32/35801_2.png) [@Ferat-Imrak](https://community.sonarsource.com/u/Ferat-Imrak)\
**Post date:** [August 23, 2022, 1:40pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed/70129/6 "2022-08-23T13:40:30Z")

</div>

Can someone please help me with this issue? @ganncamp @Colin @Joe @JolyLoic @Abbas  
I shared my logs file and if you need me to share more recourses for solving the issue pls let me know then i can share privately. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [August 23, 2022, 2:44pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed/70129/7 "2022-08-23T14:44:37Z")

</div>

Hey there.

Please make sure to read our Community FAQ.

[https://community.sonarsource.com/faq](https://community.sonarsource.com/faq)

Specifically it asks that you:

- Do not bump topics after a day
- Do not tag users in a thread who are not already engaged in a thread

If you cannot follow these rules, we will not be able to provide assistance.

---

<div class="post-metadata">

**Author:** ![Ferat-Imrak](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ferat-imrak/32/35801_2.png) [@Ferat-Imrak](https://community.sonarsource.com/u/Ferat-Imrak)\
**Post date:** [August 23, 2022, 2:48pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed/70129/8 "2022-08-23T14:48:39Z")

</div>

Ok thanks for letting me know about these rules. I didn’t know about them. Can someone help me pls? Abbas answered the issue over the weekend and i wasn’t working so I reply him as soon as i came back online on Monday.

---

<div class="post-metadata">

**Author:** ![Fred\_Tingaud](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/fred_tingaud/32/29112_2.png) [@Fred\_Tingaud](https://community.sonarsource.com/u/Fred_Tingaud)\
**Post date:** [August 23, 2022, 3:01pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed/70129/9 "2022-08-23T15:01:59Z")

</div>

> [@Ferat-Imrak](#):
>
> the xcodebuild command is running `SfaraSDK-example/SfaraSDK-example.xcodeproj` this directory as for project directory but objective-c files are in this directory `SfaraSDK-example/SfaraSDK.xcframework`  
> how can i scan the whole files and folders?

The code that will be scanned is the code you mention in your `sonar-project.properties` file in the `sonar.sources` property.  
If that helps, you can have a look at this sample project that uses xcode and github actions: [GitHub - sonarsource-cfamily-examples/macos-xcode-gh-actions-sq: An example xcode configuration for C++ project on MacOS using GitHub Actions and analyzed on SonarQube](https://github.com/sonarsource-cfamily-examples/macos-xcode-gh-actions-sq)

---

<div class="post-metadata">

**Author:** ![Ferat-Imrak](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ferat-imrak/32/35801_2.png) [@Ferat-Imrak](https://community.sonarsource.com/u/Ferat-Imrak)\
**Post date:** [August 23, 2022, 3:08pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed/70129/10 "2022-08-23T15:08:44Z")

</div>

Hi Fred,

Thanks for responding. The code i mentioned in my `sonar-project.properties` is this:  
`sonar.sources=.` which is the main directory. So it should scan whole project. And the project is mixed with objective-c and swift.

---

<div class="post-metadata">

**Author:** ![Ferat-Imrak](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ferat-imrak/32/35801_2.png) [@Ferat-Imrak](https://community.sonarsource.com/u/Ferat-Imrak)\
**Post date:** [August 23, 2022, 4:51pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed/70129/11 "2022-08-23T16:51:06Z")

</div>

Any solution any idea? I tried to change `sonar.source` directory but it didn’t work. Also can someone remove the attachment log file that I shared please? I am conformable to having them online.

---

<div class="post-metadata">

**Author:** ![Fred\_Tingaud](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/fred_tingaud/32/29112_2.png) [@Fred\_Tingaud](https://community.sonarsource.com/u/Fred_Tingaud)\
**Post date:** [August 24, 2022, 1:33pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed/70129/14 "2022-08-24T13:33:48Z")

</div>

Hi @Ferat-Imrak,  
Could you please share your whole sonar-project.properties and your build.yml? If you don’t want them to be visible publicly, you can send them to me via DM.  
Also can you confirm that when you run the command that you shared earlier (`xcodebuild -project SfaraSDK-example/SfaraSDK-example.xcodeproj -scheme SfaraSDK-example -configuration Release clean build -arch arm64 BITCODE_GENERATION_MODE=bitcode ONLY_ACTIVE_ARCH=NO -sdk iphoneos BUILD_LIBRARIES_FOR_DISTRIBUTION=YES CODE_SIGNING_ALLOWED="NO" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS=""`) without the build-wrapper, it builds the whole project correctly?  
Thanks

---

<div class="post-metadata">

**Author:** ![Ferat-Imrak](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ferat-imrak/32/35801_2.png) [@Ferat-Imrak](https://community.sonarsource.com/u/Ferat-Imrak)\
**Post date:** [August 24, 2022, 1:49pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed/70129/15 "2022-08-24T13:49:19Z")

</div>

Hi Fred,

Thanks for responding. I found out it is not an Objective-c project. There are only one or two files has objective-c files that in framework headers and I used these sonarcloud properties to ignore cfiles:

```auto
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-

```

So the CI with GitHub actions is working now.

Best,

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [August 31, 2022, 1:49pm UTC](https://community.sonarsource.com/t/build-wrapper-dump-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed/70129/16 "2022-08-31T13:49:22Z")

</div>

Closed on August 31, 2022, 1:49pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
