-
-
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
Rubocop requires its own .rubocop.yml to exist to function correctly #557
Comments
The |
I think that's because |
That seems likely, @yujinakayama. The problem is that |
What is |
In the end it's not used for anything (assuming you have excluded the
More details and a discussion about why RuboCop works like this can be found in #536. |
I dug into the problem and it's an issue with (why am I using a version of rubygems different from my colleague? Because I was testing upgrades :)) |
That's too bad, but it's good that you found the problem, @Confusion. Partly because of this bug in rubygems, and partly because we seem to get a new bug report to RuboCop every other week about its behavior regarding exclusion of vendor directories, I think it's time to make some changes. I know @yujinakayama has mentioned that he has some ideas for a redesign of the configuration functionality. I have an idea for a smaller change that I want to make first. It's basically that we move the exclusion of files earlier in |
I haven't checked out the fix yet, but I guess its also supposed to fix this scenario: When I'm using my project with 2 different rubies and 2 different versions of Rubocop (ok uncommon scenario, but it signals rubocop is doing something unexpected. Lets say ruby 1.9.3 uses rubocop 0.14.0 and ruby 2.0 uses 0.10.0. When Im running rubocop under ruby 1.9.3, rubocop warns me several times:
|
[Fix #557] Don't load configuration files for excluded files.
Yes @SirLenz0rlot that scenario should also be fixed. As long as you have the vendor directory excluded, RuboCop should not open any configuration files under it. |
Thanks for pointing that out (and the fix ofcourse). I'll check the fix later when the gem is released. |
A colleague of mine just upgraded one of our projects to rubocop-0.14.0. After
git pull
andbundle install
, I get the following error when runningbundle exec rake rubocop
This file indeed does not exist, although it is present in the
.gem
file. The gem was installed using rubygems 2.1.5 and bundler 1.3.4.Now not installing that file may be a bug or feature of either rubygems or bundler, but regardless of that, it seems strange that rubocop requires a local
.rubocop.yml
in the directory where it was installed to function properly. There is a.rubocop.yml
present at the $PROJECT level, which is the one that should be used. Is this a bug?The text was updated successfully, but these errors were encountered: