Objective-C scan gives no files back to analyse

Must-share information (formatted with Markdown):

  • Jenkins plugin SonarQube Scanner, SonarQube Developer Edition Version 8.1 (build 31237)

  • We are trying to scan objc files in macOS environment, however we are geting “java.lang.IllegalStateException: The “build-wrapper-dump.json” file was found empty” error

  • these are commands we’re running to start sonarqube scan:

sh "build-wrapper-macosx-x86 --out-dir . /usr/bin/xcrun xcodebuild clean -project ${xcodeBuildProjectPath} -scheme ${xcodeBuildScheme} SUPPORTS_MACCATALYST=NO "

customParameters += " -Dsonar.c.file.suffixes=.c -Dsonar.cpp.file.suffixes=.cpp,.hpp -Dsonar.objc.file.suffixes=.h,.m,.mm -Dsonar.scm.disabled=true -Dsonar.scm.exclusions.disabled=true -Dsonar.cfamily.cache.enabled=false -Dsonar.verbose=true"

sh "${scannerHome}/bin/sonar-scanner -X -Dsonar.projectName=\"${projectName}\" -Dsonar.projectKey=${projectKey} -Dsonar.projectVersion=${newVersion} -Dsonar.sources=${parameters.sonarqube.sources} -Dsonar.cfamily.build-wrapper-output=. ${customParameters}"

In the log file result of the sonar-scanner execution:

log.txt (87.4 KB)

Help would be much appreciated. :slight_smile:

Hi @lszuca ,

could you please share build-wrapper-dump.json and build-wrapper.log files?

Hi @mpaladin,
You can find both files in attached zip.

wrapper logs.zip (116.1 KB)

Hi @lszuca,

few notes:

  • from the logs it seems like you are using a very old version of build-wrapper
    Wed May 19 15:13:44 2021: build-wrapper, version 6.2 (macosx-x86)
  • the build-wrapper-dump.json you shared is not empty, so the first log.txt you provided is not from the same run or you are pointing the scanner to the wrong build-wrapper output dir
  • the build-wrapper-dump.json file contains many entries with -x objective-c++, please be aware that we do not support Objective-C++

@mpaladin are you planning to support objective-c++?

Hello @luk,
Unfortunately there is currently no plan to support objective-c++.
But we’ve taken your need into account, and you can check if any progress is made with this ticket: CPP-649.