SonarQube: 10.3
SonarScanner: 6.2.1.4610
I have an Xcode project with substantial amount of C++ code. We’ve been scanning it successfully using compilation database for quite some time. We’re recently started to upgrade from Xcode 15.2 to 16.0 and the scans are failing with 15.4 and 16.0 with the following error:
16:01:21 20:01:21.485 ERROR Error during SonarScanner CLI execution
16:01:21 java.lang.IllegalStateException: unexpanded response file
16:01:21 at com.sonar.cpp.analyzer.ClangDriver.onCapture(ClangDriver.java:532)
16:01:21 at com.sonar.cpp.analyzer.CompilerDrivers.onCapture(CompilerDrivers.java:36)
16:01:21 at com.sonar.cpp.plugin.CFamilySensor.lambda$process$37(CFamilySensor.java:1447)
16:01:21 at com.sonar.cpp.plugin.CompileCommandsReader.readCaptures(CompileCommandsReader.java:61)
16:01:21 at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:1445)
16:01:21 at com.sonar.cpp.plugin.CFamilySensor.processConfigurationReader(CFamilySensor.java:750)
16:01:21 at com.sonar.cpp.plugin.CFamilySensor.lambda$process$4(CFamilySensor.java:468)
16:01:21 at java.base/java.lang.Iterable.forEach(Iterable.java:75)
16:01:21 at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:468)
16:01:21 at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:241)
I turned on more debug output but there is no additional info produced.
I tried adding CLANG_USE_RESPONSE_FILE=NO to xcodebuild command and that seems to work around this problem but I suspect this is some kind of Xcode15.4+ incompatibility with the scanner given that 15.2 works without any problems. Nothing else has been changed.
Not sure what else I can provide to help resolve this issue.