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
[Fix #7433] User vs project exclusion inheritance #8176
[Fix #7433] User vs project exclusion inheritance #8176
Conversation
3f79152
to
514cc46
Compare
There's an error which sounds like it's my fault. I'll have a look. |
Ok, so I tried this on a real project and it did "break" my editor integration when inspecting vendored code.
I believe it's debatable which behaviour is best, but I'll try to change this PR to be fully backwards compatible with the previous behaviour in this regard and add a regression spec. |
Ok, I don't think I was testing this correctly. Turns out this PR is also correcting a very strange behaviour regarding vendored files. The standard behavior of my editor rubocop integration is to ignore vendored files. That's unchanged with this PR. However, if I put a For what it's worth, my editor integration is https://github.com/dense-analysis/ale/, and the |
f19adaa
to
3e4a7ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changelog entry now needs to be moved up to the master (unreleased)
section, but other than that the changes look good. 👍
Don't load personal configuration files to look for exclusions if there's a project configuration.
3e4a7ef
to
2362fe7
Compare
@jonas054 Thanks!! I rebased this PR and moved the changelog entry. |
If there's a specific project configuration, we want the exclusions for the user configuration to be ignored, just like the rest of the configuration is ignored.
Note that this solution slightly changes behavior if people are running rubocop for within a subproject folder that resolves to a
.rubocop.yml
different from the one in the root folder. However, I believe that if people are doing this, they are probably using--ignore-parent-exclusion
already, so it's not going to be an issue.Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).bundle exec rake default
. It executes all tests and RuboCop for itself, and generates the documentation.