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

Include files (opposite of ignore) #544

Open
sushant-here opened this issue Sep 22, 2023 · 3 comments
Open

Include files (opposite of ignore) #544

sushant-here opened this issue Sep 22, 2023 · 3 comments

Comments

@sushant-here
Copy link
Contributor

Im working on a existing app with no unit tests. Im sure lots of people have been in this situation before!

All new functionality is unit tested - but I would like to track it. Overall it shows 3% but if I manually look at just my new files its closer to 100%.

I would like to track code coverage for the files that I have added. Is there any way to specify patterns for what files to include in the coverage report?

Eg only include files that contain ViewModel in their name.

@dnedrow
Copy link
Contributor

dnedrow commented Jan 3, 2024

@sushant-here Would you expect an "include" option to be exclusive of "ignore". That seems logical to me.

@dnedrow
Copy link
Contributor

dnedrow commented Jan 4, 2024

@ksuther Should source_files act as an include directive such that ONLY files in the source_files array are run through slather?

As @sushant-here noted, it would be nice to have a feature like this.

E.g.

source_files:
  - **/*ViewModel.swift

This would result in slather only scanning the files that match the glob. I could swear that's how source_files used to act, but now it doesn't seem to do anything.

@sushant-here
Copy link
Contributor Author

@sushant-here Would you expect an "include" option to be exclusive of "ignore". That seems logical to me.

If a file has been matched by an include wildcard. We should still be able to exclude it with a ignore.

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