lib/rubocop/config_obsoletion.rb in rubocop-1.50.2 vs lib/rubocop/config_obsoletion.rb in rubocop-1.51.0
- old
+ new
@@ -66,14 +66,14 @@
end
# Cop rules are keyed by the name of the original cop
def load_cop_rules(rules)
rules.flat_map do |rule_type, data|
- data.map do |cop_name, configuration|
+ data.filter_map do |cop_name, configuration|
next unless configuration # allow configurations to be disabled with `CopName: ~`
COP_RULE_CLASSES[rule_type].new(@config, cop_name, configuration)
- end.compact
+ end
end
end
# Parameter rules may apply to multiple cops and multiple parameters
# and are given as an array. Each combination is turned into a separate