-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add ability to specify patterns to be excluded from coverage report #6
Conversation
Will exclude matching directories and files from the list.
This adds an option to the API to specify patterns which should not be included in the coverage report. Closes MOxUnit#4.
@@ -67,7 +86,9 @@ | |||
if ~ignore_fn | |||
path_fn=fullfile(root_dir, fn); | |||
|
|||
if isdir(path_fn) | |||
if ~isempty(regexp(fn,exclude_re,'once')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently this would also exclude directories that match the pattern. Is that intended, or would it make more sense to limit this to files (not directories) only? In any case, can you please add this in the documentation (around line 15)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 074542d.
Thanks. this looks very good. I added two minor comments. |
Thanks @scottclowe, looks great. I will wait for travis to finish; if it is happy, I will merge. |
I fixed the two issues you picked up on. Thanks for pointing them out! I would like to be able to omit both files and directories. We could have two arguments, one which files must match and another for directories but I think this is cleaner. There are two use-cases which this fix will improve
|
NF: Add ability to specify patterns to be excluded from coverage report
Support for this API change still needs to be implemented in MOxUnit/MOxUnit. I can do that too if you'd like? |
Added to MOcov in MOxUnit/MOcov#6.
@scottclowe, thanks for the offer; I would appreciate it if you could implement that in MOxUnit and send a PR. |
@scottclowe sent out a PR at MOxUnit/MOxUnit#22 |
Added to MOcov in MOxUnit/MOcov#6.
Added to MOcov in MOxUnit/MOcov#6.
Added to MOcov in MOxUnit/MOcov#6.
NF: add timing of unit tests
Closes #4.
Adds -cover_exclude option, which can be to specify patterns for directories and files which should be excluded from the coverage report. This can be used multiple times to specify multiple patterns.
The implementation method was as discussed on the thread for #4.
I have not altered README.md, so there is currently no documentation for this feature.