Closed vigneshsarma closed 11 years ago
Hmm... I thought about adding support to actual ignorers, but this is much simpler, I like your approach. I would rename option though, maybe -O/--only
? And why name it invIgnorer
? Inverted?
only
sounds much better than what I had, changed that,
invIgnore
: exactly, because we are using its not
value rather than directly using it... Better ideas?
I'm thinking that maybe it's worth it to rename Ignorer's Ignore
method to Match
, and then searchFiles
could accept ignorer
and includer
. Or no, includer sounds like it would add files... ok, maybe just invertIgnorer
then? I have no better ideas.
Actually Match
seems more generic...
you could say
if ignoredFiles.Match(name) {
return;
}
if !acceptedFiles.Match(name) {
return;
}
Exactly, that's what I mean.
Should I add it to this pull request, or a separate one?
Yeah, add to this one, whole point of renaming to Match
is to make this change look nice. :)
The change in NewGeneralMatcher
is so that in the alternate case it shouldn't have to needlessly loop through those patterns. I didn't change that the first time trying to keep the changes to the minimum but, since we are refraction it I thought this would be better.
Well, this is looking seriously good. :) Thanks!
this is in connection with issue #10,
I have very little experience with go code, what do you think?