Skip to content

Commit

Permalink
Merge pull request #7875 from koic/enable_new_cops_for_rubocop_develo…
Browse files Browse the repository at this point in the history
…pment

Enable `NewCops` for RuboCop development
  • Loading branch information
koic committed Apr 13, 2020
2 parents 4c4bd1a + 3aac880 commit e22c2e2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .rubocop.yml
Expand Up @@ -7,6 +7,7 @@ require:
- rubocop-rspec

AllCops:
NewCops: enable
Exclude:
- 'vendor/**/*'
- 'spec/fixtures/**/*'
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/config.rb
Expand Up @@ -47,7 +47,7 @@ def check
end

def_delegators :@hash, :[], :[]=, :delete, :each, :key?, :keys, :each_key,
:map, :merge, :to_h, :to_hash
:map, :merge, :to_h, :to_hash, :transform_values
def_delegators :@validator, :validate, :target_ruby_version

def to_s
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/config_loader_resolver.rb
Expand Up @@ -181,7 +181,7 @@ def handle_disabled_by_default(config, new_default_configuration)
end

def transform(config)
Hash[config.map { |cop, params| [cop, yield(params)] }]
config.transform_values { |params| yield(params) }
end

def gem_config_path(gem_name, relative_config_path)
Expand Down

0 comments on commit e22c2e2

Please sign in to comment.