This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
Conversation
benogle
added a commit
that referenced
this pull request
Jul 24, 2015
Support legit, real life negation
Closed
benogle
added a commit
to atom/atom
that referenced
this pull request
Jul 25, 2015
This adds solid negation and inclusion support. See atom/scandal#29
benogle
added a commit
to atom/atom
that referenced
this pull request
Jul 25, 2015
This adds solid negation and inclusion support. See atom/scandal#29
benogle
added a commit
to atom/atom
that referenced
this pull request
Jul 28, 2015
This adds solid negation and inclusion support. See atom/scandal#29
This was referenced Jul 28, 2015
|
Yay 👍 |
|
@benogle Hello, how do we specify the inclusions? So, is it just And order matters? Or maybe I'm missing something, do I actually write inclusions: ['inclusion']
exclusions: ['exclusion']somewhere? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This is the path to finishing atom/find-and-replace#149 and does a couple things:
inclusions. It will move negated patterns to theexclusionslist.globalExclusions. Global exclusions are thecore.ignoredNamesin atom. These patterns can be overridden by theinclusions.Behavior
There are semi-complicated interactions with the
inclusions,exclusions, andglobalExclusionsthat need to work well. These are all supported by this PR. Consider the following tree:Let's pretend we have
ignoredNamesset tovendor/, *.pyc, which means:Without
inclusionsorexclusionsset, it will search:But we're totally over markdown files and dont want to search them, so we specify a negation of
!*.md. This negation makes it into theexclusionslistAnd maybe we want to search
vendor/. In this case, thevendorinclusion needs to override thevendor/inglobalExclusions. Otherwise, no results will show, and people will be confused. Also, we expect to still ignore*.pycfiles.Along the same lines, we might want to search
pycfiles. In this case, we still expect thevendordirectory to be ignored.And finally, maybe we dont want to search in the
testsdirectory, so lets add a new negation for that. At this point thepathsinput in find and replace would look like:vendor, !*.md, !test/