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

Conversation

Projects
None yet
2 participants
@grosser
Copy link
Owner

grosser commented Feb 7, 2019

cleanup for #682
fyi @nc-annenk

@grosser grosser force-pushed the grosser/exclude branch from 8509890 to cab2c8d Feb 7, 2019

@grosser grosser merged commit 6892372 into master Feb 7, 2019

1 of 3 checks passed

continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@grosser grosser deleted the grosser/exclude branch Feb 7, 2019

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

This comment has been minimized.

@nc-annenk

nc-annenk Feb 8, 2019

Contributor

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?

This comment has been minimized.

@grosser

grosser Feb 8, 2019

Author Owner

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
You can’t perform that action at this time.