We are working on for the sonar swift code coverage using following document.
But i am getting following error while doing the steps.
Error: Error Domain=XCCovErrorDomain Code=0 “Failed to load result bundle” UserInfo={NSLocalizedDescription=Failed to load result bundle, NSUnderlyingError=0x7faaea708c20 {Error Domain=IDEFoundation.ResultBundleError Code=0 “This version of Xcode does not support opening result bundles created with versions of Xcode and xcodebuild using the v1 API.”}}
My current mac versions are as follows:
Xcode 11.1
Build version 11A1027
Here there was the same problem reported, and problem was in quotes. Try to run your command somehow differently, e.g. ./xccov-to-sonarqube-generic.sh Build/Logs/Test/*.xcresult/ > sonarqube-generic-coverage.xml, try to add quotes around parameters.
You can also run commands inside xccov-to-sonarqube-generic.sh manually to understand which step makes it fail
Our project is having both swift and objective c codes. So sonarswift is analyzing swift codes but it is not analyzing objc code. Can you help me finding a solution for both swift and objc. What plugin should be used in order to get both.
I have gone through the generic coverage documents and specified sonar.coverageReportPaths path as well. but execution is getting failed stating following error.
ERROR: Error during SonarQube Scanner execution
ERROR: Error during parsing of the generic coverage report
ERROR: Caused by: report refers to a file with an unknown language
I’m also getting same issue which you were getting Amit.
SGMUOB4KNG8WN:ios nxgdev09$ sh xccov-to-sonarqube-generic.sh “/DerivedData/Logs/Test/*.xcresult” > sonarqube.generic-coverage.xml
Error: Error Domain=XCCovErrorDomain Code=0 “Failed to load result bundle” UserInfo={NSLocalizedDescription=Failed to load result bundle, NSUnderlyingError=0x7fdf41600e20 {Error Domain=IDEFoundation.ResultBundleError Code=0 “This version of Xcode does not support opening result bundles created with versions of Xcode and xcodebuild using the v1 API.”}}
Could someone help us to identify the root cause in xcode11.3.