I’m trying to get code coverage on sonar for swift iOS, im following slather steps mentioned in this URL, [Coverage & Test Data] Generate Reports for Swift
The below task in the pipeline is failing, before this task Xcode build is happening,
- task: Bash@3
inputs:
targetType: ‘inline’
script: |
gem install slather
slather coverage --sonarqube-xml --scheme BCM --build-directory $(build.Repository.LocalPath)/BCM/Build --workspace $(build.Repository.LocalPath)/BCM.xcworkspace $(build.Repository.LocalPath)/BCM.xcodeproj
the above task is failing with this below error,
Successfully installed nokogiri-1.14.3-x86_64-darwin
Successfully installed clamp-1.3.2
Successfully installed slather-2.7.4
Parsing documentation for nokogiri-1.14.3-x86_64-darwin
Installing ri documentation for nokogiri-1.14.3-x86_64-darwin
Parsing documentation for clamp-1.3.2
Installing ri documentation for clamp-1.3.2
Parsing documentation for slather-2.7.4
Installing ri documentation for slather-2.7.4
Done installing documentation for nokogiri, clamp, slather after 3 seconds
3 gems installed
ERROR: too many arguments
See: ‘slather coverage --help’
##[debug]Exit code 1 received from tool ‘/bin/bash’
##[debug]STDIO streams have closed for tool ‘/bin/bash’
##[error]Bash exited with code ‘1’.
Please let me know what needs to be updated in the slather coverage command
xcode verision 14.2
Sonar version 7.2