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

cleanup pattern matching #683

Merged
merged 1 commit into from Feb 7, 2019
Merged

cleanup pattern matching #683

merged 1 commit into from Feb 7, 2019

Conversation

grosser
Copy link
Owner

@grosser grosser commented Feb 7, 2019

cleanup for #682
fyi @nc-annenk

@grosser grosser merged commit 6892372 into master Feb 7, 2019
@grosser grosser deleted the grosser/exclude branch February 7, 2019 18:45
files.grep(options[:suffix] || test_suffix)
.grep(options[:pattern] || //)
files = files.grep(suffix_pattern).grep(include_pattern)
files -= files.grep(exclude_pattern) if exclude_pattern
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving the filtering of the exclusion into this block means folders are not filtered out. If the goal is to mirror the functionality of rspec --pattern and `--exclude-pattern, wouldn't the folder need to have the regexes applied as well?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it means files that are explicitly added are not affected by filters
folders are still effected since they are covered to files and then matched against

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

Successfully merging this pull request may close these issues.

None yet

2 participants