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

Ignore swift packages #445

Open
sschizas opened this issue Feb 7, 2020 · 3 comments
Open

Ignore swift packages #445

sschizas opened this issue Feb 7, 2020 · 3 comments

Comments

@sschizas
Copy link

sschizas commented Feb 7, 2020

I have started replacing my project's cocoa pods with respectively swift packages. I have noticed that overall code coverage generated by the Slather (run via Danger) starts to drop. Is there a way to add the swift packages at Slather's ignore list? If so, can you please give me an example as I haven't managed to find a way to do this.

@kevnm67
Copy link

kevnm67 commented Mar 5, 2020

@sschizas I solved this issue adding "../../../Library/*" to my ignore list. What's your full slather command?

NOTE: the ignored path above was discovered in the generated 'cobertura.xml' file.

@sschizas
Copy link
Author

@kevnm67 I am using Danger slather plug-in:

# Test coverage with slather
slather.configure(
  "Foo.xcodeproj",
  "Foo",
  options: {
    workspace: 'Foo.xcworkspace',
    configuration: 'Dev',
    ignore_list: ['Pods/*', '../../../Library/*'],
    ci_service: :bitrise
  }
)

slather.notify_if_coverage_is_less_than(minimum_coverage: 70.0, notify_level: :warning)
slather.notify_if_modified_file_is_less_than(minimum_coverage: 80.0, notify_level: :warning)
slather.show_coverage

@kevnm67
Copy link

kevnm67 commented Apr 16, 2020

@sschizas Did you previously include '../../../Library/*' in the ignore list? or add it after my previous comment?

Also, you may want to try adding the source directory option. Here are some other paths I've ignored in one project but, to be honest, can't remember if they were specific to coverage or because they caused errors when uploading reports to code climate:

- '../../../Library/*'
- '../Library/Developer/*'
- '~/**/DerivedData/*'

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