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
Do not try to expand nil Include when inheriting. #11807
base: master
Are you sure you want to change the base?
Conversation
expect(configuration_from_file['Style/StringLiterals']['Include']).to be_nil | ||
end | ||
|
||
it 'gets an Include that is relative to the subdirectory when inheriting from a nil Include' do |
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.
Not so sure about this test. I wanted to mostly check that going from not nil to nil and vice versa worked
324bbba
to
751d5e7
Compare
I'm OK with your proposal, but this is also something we should document in the configuration section of RuboCop, as generally I don't think we've considered the use of |
Yeah, I agree with @bbatsov. |
@juanxo Ping :-) |
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.
Looks good!
@juanxo Ping again :-) |
1 similar comment
@juanxo Ping again :-) |
@juanxo Ping. |
Hey, sorry for the long delay in answering. Will look to rebase and ship this |
When inheriting from a parent config file that has nullified an Include in any rule, it will currently fail as it will assume that the Include will always be an non-nullable array
Example:
I'm currently using this pattern to remove a default Include pattern so it resorts back to the AllCops inclusion list, so setting it to
[]
does not accomplish the same effect.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 runs RuboCop on its own code.{change_type}_{change_description}.md
if the new code introduces user-observable changes. See changelog entry format for details.