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

Support folders in file patterns #16

Open
jdbancal opened this issue Jan 23, 2020 · 2 comments
Open

Support folders in file patterns #16

jdbancal opened this issue Jan 23, 2020 · 2 comments

Comments

@jdbancal
Copy link
Contributor

Currently it seems that the option -cover_exclude only supports file patterns. This means that it is not possible to exclude a single file in a subfolder, say a/function1.m. if a file with the same name is also present in another subfolder, say a/b/c/function1.m. Indeed, the pattern function1.m would match both.

Would it be possible to support exclude filters which match the full path, such as a/function1.m? Meaning that this would only match. Maybe, a simple way to do this could be to treat patterns slightly differently if they contain the / chararcter : currently a pattern like a/function1.m of ./function1.m will never match anything, right?

@nno
Copy link
Contributor

nno commented Jan 24, 2020

@jdbancal I think this is possible. I wonder if it would make sense to support something similar as rsync patterns, so that more complex patterns also involving directory names (maybe even including **) can be used.

For example, a utility function mocov_filename_matches_pattern could be added that compares whether a filename matches one or more patterns.

Before considering such an extensions: do you think this approach could work for your use case?

@jdbancal
Copy link
Contributor Author

Oh, rsync patterns would be amazing!

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