You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rubocop 1.4.2 shows a warning about pending cops, even if the NewCops: enabled is set in a required config file.
This happens because the possible_new_cops? methods in the ConfigLoader checks against config and not against merged_config.
Warning Text:
The following cops were added to RuboCop, but are not configured. Please set Enabled to either `true` or `false` in your `.rubocop.yml` file.
Please also note that can also opt-in to new cops by default by adding this to your config:
AllCops:
NewCops: enable
Expected behavior
I expect that for the pending new cops check the merged configuration is considered and no warning is show when the NewCops setting is configured in a shared config file.
Actual behavior
The NewCops setting is not considered and the warning about pending new cops is shown.
Steps to reproduce the problem
Use 2 configuration files.
# File: .rubocop.ymlrequire:
- base# NewCops is not set here## AllCops:# NewCops: enable
Base
# File: base.ymlAllCops:
NewCops: enable
RuboCop version
Include the output of rubocop -V or bundle exec rubocop -V if using Bundler. Here's an example:
Rubocop
1.4.2
shows a warning about pending cops, even if theNewCops: enabled
is set in arequired
config file.This happens because the
possible_new_cops?
methods in the ConfigLoader checks againstconfig
and not againstmerged_config
.Warning Text:
Expected behavior
I expect that for the pending new cops check the merged configuration is considered and no warning is show when the
NewCops
setting is configured in a shared config file.Actual behavior
The
NewCops
setting is not considered and the warning about pending new cops is shown.Steps to reproduce the problem
Use 2 configuration files.
Base
RuboCop version
Include the output of
rubocop -V
orbundle exec rubocop -V
if using Bundler. Here's an example:Solution
A possible solution is, as described above in the intro, to use
merged_config
instead ofconfig
for the check in the ConfigLoader.The text was updated successfully, but these errors were encountered: