Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Action - Sonarqube - Xcode 15.4 - 16.1 - Apple Silicon #576

Open
salvatoreboemia opened this issue Nov 15, 2024 · 2 comments
Open

Comments

@salvatoreboemia
Copy link

Hi

I'm trying to create a report to use on Sonarqube for code coverage

I decide to use Slather in my GitHub action but I receive an error

My action

- name: Generate coverage report with Slather
        run: |
          slather coverage --sonarqube-xml \
            --workspace MyApp.xcworkspace \
            --scheme MyApp \
            MyApp.xcodeproj \
            --ignore "Pods/*" "build/*" "DerivedData/*"
      

But I got this error

ERROR: too many arguments

Could you help me?

Thanks

@jarrodlombardo-EventBase
Copy link
Contributor

The Readme says: $ slather coverage -s --scheme YourXcodeSchemeName path/to/project.xcodeproj

path/to/project.xcodeproj has to be the last argument.

This should work:

- name: Generate coverage report with Slather
        run: |
          slather coverage --sonarqube-xml \
            --workspace MyApp.xcworkspace \
            --scheme MyApp \
            --ignore "Pods/*" "build/*" "DerivedData/*" \
            MyApp.xcodeproj

@jarrodlombardo-EventBase
Copy link
Contributor

Maybe that won't work though since I don't think you can give multiple patterns to --ignore like that. You might need to do this instead:

- name: Generate coverage report with Slather
        run: |
          slather coverage --sonarqube-xml \
            --workspace MyApp.xcworkspace \
            --scheme MyApp \
            --ignore "Pods/*" \
            --ignore "build/*" \
            --ignore "DerivedData/*" \
            MyApp.xcodeproj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants