-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Include/Exclude Globbing with '**' Should Match Files In Base Directory #1011
Comments
I just noticed that you all are reinventing the wheel on a lot of the path stuff, personally I would look at the Pathname builtin library in Ruby. It does all of that stuff for you. I think it could help simplify the codebase quite a bit. |
Ouch, it seems we made a serious mistake. For some reason I thought we were actually using |
Absolutely. Thanks for the pointer, @jfelchner! |
It's a problem that we can't use With the The question is, do we just switch to |
I'd suggest the deprecation notice option. At least for a couple of versions we have to warn users that the config format has changed. |
@jfelchner Could you explain in more detail what you meant when you said that we're reinventing the wheel? Because I don't quite see it. Thanks! |
[Fix #1011] Add pattern matching with Dir#[] for config.
@jonas054 thanks so much for jumping on this. The response was more than I expected. 😄 I'll try to do some code refactoring in a PR to show you what I'm referring to, but no promises on timeframe. I'm currently releasing a large refactoring of |
The way that
**
works in unix and Ruby itself is typically that it means "match zero or more subdirectories". Unfortunately the way Rubocop handles it, it matches "one or more subdirectories".This means that you have to have this:
Instead of this:
In fact, you can check that this is the case by opening up an IRB session in your current project base dir and run this:
And you'll see that it does in fact return the file in the base of your project.
The text was updated successfully, but these errors were encountered: