Sonar code coverage using Slather for Swift iOS code

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

Hi,

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.2 → 7.9.x → 8.9.10 → 9.9

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes for 7.9 to 8.9, as well as the LTS to LTS release upgrade notes for 8.9 to 9.9 helpful. If you have questions about upgrading, feel free to open a new thread for that here.

Regarding your error, it occurs before analysis ever starts. You need to look to your coverage engine.

 
Ann

Hi,
May i request you to elaborate a bit about this?

Thanks

Hi,

That error doesn’t come from analysis.

 
Ann

Hello,

So it means i need to check the slather tool for this issue?

Thanks