rubocop 1.62.0 → 1.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/config/default.yml +23 -3
  4. data/lib/rubocop/cli/command/auto_generate_config.rb +12 -3
  5. data/lib/rubocop/config.rb +33 -10
  6. data/lib/rubocop/config_obsoletion.rb +1 -1
  7. data/lib/rubocop/cop/base.rb +37 -0
  8. data/lib/rubocop/cop/gemspec/required_ruby_version.rb +3 -1
  9. data/lib/rubocop/cop/internal_affairs/example_description.rb +1 -0
  10. data/lib/rubocop/cop/internal_affairs/node_matcher_directive.rb +122 -28
  11. data/lib/rubocop/cop/layout/empty_line_after_magic_comment.rb +14 -7
  12. data/lib/rubocop/cop/layout/redundant_line_break.rb +8 -2
  13. data/lib/rubocop/cop/lint/assignment_in_condition.rb +2 -4
  14. data/lib/rubocop/cop/lint/debugger.rb +27 -2
  15. data/lib/rubocop/cop/lint/redundant_with_index.rb +4 -0
  16. data/lib/rubocop/cop/lint/useless_times.rb +1 -1
  17. data/lib/rubocop/cop/mixin/code_length.rb +12 -1
  18. data/lib/rubocop/cop/mixin/method_complexity.rb +15 -6
  19. data/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +1 -1
  20. data/lib/rubocop/cop/mixin/safe_assignment.rb +1 -1
  21. data/lib/rubocop/cop/naming/block_forwarding.rb +31 -12
  22. data/lib/rubocop/cop/naming/file_name.rb +2 -2
  23. data/lib/rubocop/cop/naming/inclusive_language.rb +1 -2
  24. data/lib/rubocop/cop/style/alias.rb +1 -0
  25. data/lib/rubocop/cop/style/class_vars.rb +3 -3
  26. data/lib/rubocop/cop/style/collection_compact.rb +3 -3
  27. data/lib/rubocop/cop/style/copyright.rb +16 -11
  28. data/lib/rubocop/cop/style/eval_with_location.rb +2 -0
  29. data/lib/rubocop/cop/style/exact_regexp_match.rb +2 -1
  30. data/lib/rubocop/cop/style/for.rb +2 -0
  31. data/lib/rubocop/cop/style/format_string.rb +9 -9
  32. data/lib/rubocop/cop/style/hash_each_methods.rb +1 -1
  33. data/lib/rubocop/cop/style/map_into_array.rb +175 -0
  34. data/lib/rubocop/cop/style/map_to_hash.rb +1 -1
  35. data/lib/rubocop/cop/style/map_to_set.rb +1 -1
  36. data/lib/rubocop/cop/style/multiline_method_signature.rb +10 -1
  37. data/lib/rubocop/cop/style/nil_comparison.rb +2 -0
  38. data/lib/rubocop/cop/style/raise_args.rb +1 -1
  39. data/lib/rubocop/cop/style/redundant_argument.rb +24 -1
  40. data/lib/rubocop/cop/style/redundant_current_directory_in_path.rb +5 -4
  41. data/lib/rubocop/cop/style/redundant_each.rb +1 -1
  42. data/lib/rubocop/cop/style/redundant_filter_chain.rb +1 -1
  43. data/lib/rubocop/cop/style/redundant_line_continuation.rb +8 -14
  44. data/lib/rubocop/cop/style/redundant_percent_q.rb +1 -1
  45. data/lib/rubocop/cop/team.rb +3 -0
  46. data/lib/rubocop/cop/utils/regexp_ranges.rb +1 -1
  47. data/lib/rubocop/directive_comment.rb +10 -8
  48. data/lib/rubocop/formatter/clang_style_formatter.rb +3 -7
  49. data/lib/rubocop/formatter/tap_formatter.rb +3 -7
  50. data/lib/rubocop/lockfile.rb +34 -4
  51. data/lib/rubocop/rspec/expect_offense.rb +15 -7
  52. data/lib/rubocop/rspec/shared_contexts.rb +13 -1
  53. data/lib/rubocop/runner.rb +3 -0
  54. data/lib/rubocop/target_ruby.rb +1 -1
  55. data/lib/rubocop/version.rb +2 -2
  56. data/lib/rubocop.rb +1 -0
  57. metadata +5 -4
@@ -81,7 +81,13 @@ module RuboCop
81
81
  redundant_argument = redundant_arg_for_method(node.method_name.to_s)
82
82
  return false if redundant_argument.nil?
83
83
 
84
- node.first_argument.source.sub(/\A'/, '"').sub(/'\z/, '"') == redundant_argument
84
+ target_argument = if node.first_argument.respond_to?(:value)
85
+ node.first_argument.value
86
+ else
87
+ node.first_argument
88
+ end
89
+
90
+ argument_matched?(target_argument, redundant_argument)
85
91
  end
86
92
 
87
93
  def redundant_arg_for_method(method_name)
@@ -98,6 +104,23 @@ module RuboCop
98
104
  range_with_surrounding_space(node.first_argument.source_range, newlines: false)
99
105
  end
100
106
  end
107
+
108
+ def argument_matched?(target_argument, redundant_argument)
109
+ argument = if target_argument.is_a?(AST::Node)
110
+ target_argument.source
111
+ elsif exclude_cntrl_character?(target_argument, redundant_argument)
112
+ target_argument.inspect
113
+ else
114
+ target_argument.to_s
115
+ end
116
+
117
+ argument == redundant_argument
118
+ end
119
+
120
+ def exclude_cntrl_character?(target_argument, redundant_argument)
121
+ !target_argument.to_s.sub(/\A'/, '"').sub(/'\z/, '"').match?(/[[:cntrl:]]/) ||
122
+ !redundant_argument.match?(/[[:cntrl:]]/)
123
+ end
101
124
  end
102
125
  end
103
126
  end
@@ -18,14 +18,15 @@ module RuboCop
18
18
  extend AutoCorrector
19
19
 
20
20
  MSG = 'Remove the redundant current directory path.'
21
+ RESTRICT_ON_SEND = %i[require_relative].freeze
21
22
  CURRENT_DIRECTORY_PATH = './'
22
23
 
23
24
  def on_send(node)
24
- return unless node.method?(:require_relative)
25
- return unless node.first_argument.str_content&.start_with?(CURRENT_DIRECTORY_PATH)
26
- return unless (index = node.first_argument.source.index(CURRENT_DIRECTORY_PATH))
25
+ return unless (first_argument = node.first_argument)
26
+ return unless first_argument.str_content&.start_with?(CURRENT_DIRECTORY_PATH)
27
+ return unless (index = first_argument.source.index(CURRENT_DIRECTORY_PATH))
27
28
 
28
- begin_pos = node.first_argument.source_range.begin.begin_pos + index
29
+ begin_pos = first_argument.source_range.begin.begin_pos + index
29
30
  range = range_between(begin_pos, begin_pos + 2)
30
31
 
31
32
  add_offense(range) do |corrector|
@@ -86,7 +86,7 @@ module RuboCop
86
86
  def range(node)
87
87
  return node.selector unless node.method?(:each)
88
88
 
89
- if node.parent.call_type?
89
+ if node.parent&.call_type?
90
90
  node.selector.join(node.parent.loc.dot)
91
91
  else
92
92
  node.loc.dot.join(node.selector)
@@ -79,7 +79,7 @@ module RuboCop
79
79
  private_constant :REPLACEMENT_METHODS
80
80
 
81
81
  def on_send(node)
82
- return if node.arguments? || node.block_node
82
+ return if node.arguments? || node.block_literal?
83
83
 
84
84
  select_predicate?(node) do |select_node, filter_method|
85
85
  return if RAILS_METHODS.include?(filter_method) && !active_support_extensions_enabled?
@@ -72,7 +72,7 @@ module RuboCop
72
72
  ALLOWED_STRING_TOKENS = %i[tSTRING tSTRING_CONTENT].freeze
73
73
  ARGUMENT_TYPES = %i[
74
74
  kFALSE kNIL kSELF kTRUE tCONSTANT tCVAR tFLOAT tGVAR tIDENTIFIER tINTEGER tIVAR
75
- tLABEL tLBRACK tLCURLY tLPAREN_ARG tSTRING tSTRING_BEG tSYMBOL tXSTRING_BEG
75
+ tLBRACK tLCURLY tLPAREN_ARG tSTRING tSTRING_BEG tSYMBOL tXSTRING_BEG
76
76
  ].freeze
77
77
 
78
78
  def on_new_investigation
@@ -124,10 +124,8 @@ module RuboCop
124
124
  return true unless (node = find_node_for_line(range.line))
125
125
  return false if argument_newline?(node)
126
126
 
127
- continuation_node = node.parent || node
128
- return false if allowed_type?(node) || allowed_type?(continuation_node)
129
-
130
- continuation_node.source.include?("\n") || continuation_node.source.include?("\\\n")
127
+ source = node.parent ? node.parent.source : node.source
128
+ parse(source.gsub("\\\n", "\n")).valid_syntax?
131
129
  end
132
130
 
133
131
  def inside_string_literal?(range, token)
@@ -142,22 +140,22 @@ module RuboCop
142
140
  current_token.type == :tIDENTIFIER && ARGUMENT_TYPES.include?(next_token.type)
143
141
  end
144
142
 
145
- # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
143
+ # rubocop:disable Metrics/AbcSize
146
144
  def argument_newline?(node)
147
145
  node = node.to_a.last if node.assignment?
148
146
  return false if node.parenthesized_call?
149
147
 
150
148
  node = node.children.first if node.root? && node.begin_type?
151
149
 
152
- if argument_is_method?(node) || node.begin_type?
153
- argument_newline?(node.children.first)
150
+ if argument_is_method?(node)
151
+ argument_newline?(node.first_argument)
154
152
  else
155
153
  return false unless method_call_with_arguments?(node)
156
154
 
157
- !same_line?(node, node.first_argument)
155
+ node.loc.selector.line != node.first_argument.loc.line
158
156
  end
159
157
  end
160
- # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
158
+ # rubocop:enable Metrics/AbcSize
161
159
 
162
160
  def find_node_for_line(line)
163
161
  processed_source.ast.each_node do |node|
@@ -165,10 +163,6 @@ module RuboCop
165
163
  end
166
164
  end
167
165
 
168
- def allowed_type?(node)
169
- node.and_type? || node.or_type? || (node.if_type? && node.ternary?)
170
- end
171
-
172
166
  def same_line?(node, line)
173
167
  return false unless (source_range = node.source_range)
174
168
 
@@ -53,7 +53,7 @@ module RuboCop
53
53
  return if interpolated_quotes?(node) || allowed_percent_q?(node)
54
54
 
55
55
  add_offense(node) do |corrector|
56
- delimiter = /^%Q[^"]+$|'/.match?(node.source) ? QUOTE : SINGLE_QUOTE
56
+ delimiter = /\A%Q[^"]+\z|'/.match?(node.source) ? QUOTE : SINGLE_QUOTE
57
57
 
58
58
  corrector.replace(node.loc.begin, delimiter)
59
59
  corrector.replace(node.loc.end, delimiter)
@@ -174,6 +174,9 @@ module RuboCop
174
174
  end
175
175
 
176
176
  def support_target_rails_version?(cop)
177
+ # In this case, the rails version was already checked by `#excluded_file?`
178
+ return true if defined?(RuboCop::Rails::TargetRailsVersion::USES_REQUIRES_GEM_API)
179
+
177
180
  return true unless cop.class.respond_to?(:support_target_rails_version?)
178
181
 
179
182
  cop.class.support_target_rails_version?(cop.target_rails_version)
@@ -88,7 +88,7 @@ module RuboCop
88
88
  end
89
89
 
90
90
  def escaped_octal?(expr)
91
- expr.text =~ /^\\[0-7]$/
91
+ expr.text.valid_encoding? && expr.text =~ /^\\[0-7]$/
92
92
  end
93
93
 
94
94
  def octal_digit?(char)
@@ -6,9 +6,11 @@ module RuboCop
6
6
  # cops it contains.
7
7
  class DirectiveComment
8
8
  # @api private
9
- REDUNDANT_DIRECTIVE_COP_DEPARTMENT = 'Lint'
9
+ LINT_DEPARTMENT = 'Lint'
10
10
  # @api private
11
- REDUNDANT_DIRECTIVE_COP = "#{REDUNDANT_DIRECTIVE_COP_DEPARTMENT}/RedundantCopDisableDirective"
11
+ LINT_REDUNDANT_DIRECTIVE_COP = "#{LINT_DEPARTMENT}/RedundantCopDisableDirective"
12
+ # @api private
13
+ LINT_SYNTAX_COP = "#{LINT_DEPARTMENT}/Syntax"
12
14
  # @api private
13
15
  COP_NAME_PATTERN = '([A-Z]\w+/)*(?:[A-Z]\w+)'
14
16
  # @api private
@@ -118,9 +120,10 @@ module RuboCop
118
120
  end
119
121
 
120
122
  def parsed_cop_names
121
- splitted_cops_string.map do |name|
123
+ cops = splitted_cops_string.map do |name|
122
124
  department?(name) ? cop_names_for_department(name) : name
123
125
  end.flatten
126
+ cops - [LINT_SYNTAX_COP]
124
127
  end
125
128
 
126
129
  def department?(name)
@@ -128,17 +131,16 @@ module RuboCop
128
131
  end
129
132
 
130
133
  def all_cop_names
131
- exclude_redundant_directive_cop(cop_registry.names)
134
+ exclude_lint_department_cops(cop_registry.names)
132
135
  end
133
136
 
134
137
  def cop_names_for_department(department)
135
138
  names = cop_registry.names_for_department(department)
136
- has_redundant_directive_cop = department == REDUNDANT_DIRECTIVE_COP_DEPARTMENT
137
- has_redundant_directive_cop ? exclude_redundant_directive_cop(names) : names
139
+ department == LINT_DEPARTMENT ? exclude_lint_department_cops(names) : names
138
140
  end
139
141
 
140
- def exclude_redundant_directive_cop(cops)
141
- cops - [REDUNDANT_DIRECTIVE_COP]
142
+ def exclude_lint_department_cops(cops)
143
+ cops - [LINT_REDUNDANT_DIRECTIVE_COP, LINT_SYNTAX_COP]
142
144
  end
143
145
  end
144
146
  end
@@ -24,14 +24,10 @@ module RuboCop
24
24
  message: message(offense)
25
25
  )
26
26
 
27
- begin
28
- return unless valid_line?(offense)
27
+ return unless valid_line?(offense)
29
28
 
30
- report_line(offense.location)
31
- report_highlighted_area(offense.highlighted_area)
32
- rescue IndexError
33
- # range is not on a valid line; perhaps the source file is empty
34
- end
29
+ report_line(offense.location)
30
+ report_highlighted_area(offense.highlighted_area)
35
31
  end
36
32
 
37
33
  def valid_line?(offense)
@@ -53,14 +53,10 @@ module RuboCop
53
53
  message: message(offense)
54
54
  )
55
55
 
56
- begin
57
- return unless valid_line?(offense)
56
+ return unless valid_line?(offense)
58
57
 
59
- report_line(offense.location)
60
- report_highlighted_area(offense.highlighted_area)
61
- rescue IndexError
62
- # range is not on a valid line; perhaps the source file is empty
63
- end
58
+ report_line(offense.location)
59
+ report_highlighted_area(offense.highlighted_area)
64
60
  end
65
61
 
66
62
  def annotate_message(msg)
@@ -5,14 +5,23 @@ module RuboCop
5
5
  # Does not actually resolve gems, just parses the lockfile.
6
6
  # @api private
7
7
  class Lockfile
8
- # Gems that the bundle depends on
8
+ # @param [String, Pathname, nil] lockfile_path
9
+ def initialize(lockfile_path = nil)
10
+ lockfile_path ||= defined?(Bundler) ? Bundler.default_lockfile : nil
11
+
12
+ @lockfile_path = lockfile_path
13
+ end
14
+
15
+ # Gems that the bundle directly depends on.
16
+ # @return [Array<Bundler::Dependency>, nil]
9
17
  def dependencies
10
18
  return [] unless parser
11
19
 
12
20
  parser.dependencies.values
13
21
  end
14
22
 
15
- # All activated gems, including transitive dependencies
23
+ # All activated gems, including transitive dependencies.
24
+ # @return [Array<Bundler::Dependency>, nil]
16
25
  def gems
17
26
  return [] unless parser
18
27
 
@@ -21,17 +30,38 @@ module RuboCop
21
30
  parser.dependencies.values.concat(parser.specs.flat_map(&:dependencies))
22
31
  end
23
32
 
33
+ # Returns the locked versions of gems from this lockfile.
34
+ # @param [Boolean] include_transitive_dependencies: When false, only direct dependencies
35
+ # are returned, i.e. those listed explicitly in the `Gemfile`.
36
+ # @returns [Hash{String => Gem::Version}] The locked gem versions, keyed by the gems' names.
37
+ def gem_versions(include_transitive_dependencies: true)
38
+ return {} unless parser
39
+
40
+ all_gem_versions = parser.specs.to_h { |spec| [spec.name, spec.version] }
41
+
42
+ if include_transitive_dependencies
43
+ all_gem_versions
44
+ else
45
+ direct_dep_names = parser.dependencies.keys
46
+ all_gem_versions.slice(*direct_dep_names)
47
+ end
48
+ end
49
+
50
+ # Whether this lockfile includes the named gem, directly or indirectly.
51
+ # @param [String] name
52
+ # @return [Boolean]
24
53
  def includes_gem?(name)
25
54
  gems.any? { |gem| gem.name == name }
26
55
  end
27
56
 
28
57
  private
29
58
 
59
+ # @return [Bundler::LockfileParser, nil]
30
60
  def parser
31
- return unless defined?(Bundler) && Bundler.default_lockfile
32
61
  return @parser if defined?(@parser)
62
+ return unless @lockfile_path
33
63
 
34
- lockfile = Bundler.read_file(Bundler.default_lockfile)
64
+ lockfile = Bundler.read_file(@lockfile_path)
35
65
  @parser = lockfile ? Bundler::LockfileParser.new(lockfile) : nil
36
66
  rescue Bundler::BundlerError
37
67
  nil
@@ -111,6 +111,7 @@ module RuboCop
111
111
  source
112
112
  end
113
113
 
114
+ # rubocop:disable Metrics/AbcSize
114
115
  def expect_offense(source, file = nil, severity: nil, chomp: false, **replacements)
115
116
  expected_annotations = parse_annotations(source, **replacements)
116
117
  source = expected_annotations.plain_source
@@ -123,10 +124,17 @@ module RuboCop
123
124
  expect(actual_annotations).to eq(expected_annotations), ''
124
125
  expect(@offenses.map(&:severity).uniq).to eq([severity]) if severity
125
126
 
127
+ # Validate that all offenses have a range that formatters can display
128
+ expect do
129
+ @offenses.each { |offense| offense.location.source_line }
130
+ end.not_to raise_error, 'One of the offenses has a misconstructed range, for ' \
131
+ 'example if the offense is on line 1 and the source is empty'
132
+
126
133
  @offenses
127
134
  end
135
+ # rubocop:enable Metrics/AbcSize
128
136
 
129
- # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
137
+ # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity
130
138
  def expect_correction(correction, loop: true, source: nil)
131
139
  if source
132
140
  expected_annotations = parse_annotations(source, raise_error: false)
@@ -148,7 +156,6 @@ module RuboCop
148
156
 
149
157
  break corrected_source unless loop
150
158
  break corrected_source if @last_corrector.empty?
151
- break corrected_source if corrected_source == @processed_source.buffer.source
152
159
 
153
160
  if iteration > RuboCop::Runner::MAX_ITERATIONS
154
161
  raise RuboCop::Runner::InfiniteCorrectionLoop.new(@processed_source.path, [@offenses])
@@ -163,19 +170,20 @@ module RuboCop
163
170
 
164
171
  expect(new_source).to eq(correction)
165
172
  end
166
- # rubocop:enable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
173
+ # rubocop:enable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity
167
174
 
168
175
  def expect_no_corrections
169
176
  raise '`expect_no_corrections` must follow `expect_offense`' unless @processed_source
170
177
 
171
178
  return if @last_corrector.empty?
172
179
 
173
- # In order to print a nice diff, e.g. what source got corrected to,
174
- # we need to run the actual corrections
175
-
180
+ # This is just here for a pretty diff if the source actually got changed
176
181
  new_source = @last_corrector.rewrite
177
-
178
182
  expect(new_source).to eq(@processed_source.buffer.source)
183
+
184
+ # There is an infinite loop if a corrector is present that did not make
185
+ # any changes. It will cause the same offense/correction on the next loop.
186
+ raise RuboCop::Runner::InfiniteCorrectionLoop.new(@processed_source.path, [@offenses])
179
187
  end
180
188
 
181
189
  def expect_no_offenses(source, file = nil)
@@ -110,7 +110,19 @@ RSpec.shared_context 'config' do # rubocop:disable Metrics/BlockLength
110
110
  let(:config) do
111
111
  hash = { 'AllCops' => all_cops_config, cop_class.cop_name => cur_cop_config }.merge!(other_cops)
112
112
 
113
- RuboCop::Config.new(hash, "#{Dir.pwd}/.rubocop.yml")
113
+ config = RuboCop::Config.new(hash, "#{Dir.pwd}/.rubocop.yml")
114
+
115
+ rails_version_in_gemfile = Gem::Version.new(
116
+ rails_version || RuboCop::Config::DEFAULT_RAILS_VERSION
117
+ )
118
+
119
+ allow(config).to receive(:gem_versions_in_target).and_return(
120
+ {
121
+ 'railties' => rails_version_in_gemfile
122
+ }
123
+ )
124
+
125
+ config
114
126
  end
115
127
 
116
128
  let(:cop) { cop_class.new(config, cop_options) }
@@ -20,6 +20,9 @@ module RuboCop
20
20
  message = 'Infinite loop detected'
21
21
  message += " in #{path}" if path
22
22
  message += " and caused by #{root_cause}" if root_cause
23
+ message += ' Hint: Please update to the latest RuboCop version if not already in use,'
24
+ message += ' and report a bug if the issue still occurs on this version.'
25
+ message += ' Please check the latest version at https://rubygems.org/gems/rubocop'
23
26
  super(message)
24
27
  end
25
28
  end
@@ -105,7 +105,7 @@ module RuboCop
105
105
  def version_from_right_hand_side(right_hand_side)
106
106
  gem_requirement_versions = gem_requirement_versions(right_hand_side)
107
107
 
108
- if right_hand_side.array_type?
108
+ if right_hand_side.array_type? && right_hand_side.children.all?(&:str_type?)
109
109
  version_from_array(right_hand_side)
110
110
  elsif gem_requirement_versions
111
111
  gem_requirement_versions.map(&:value)
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  # This module holds the RuboCop version information.
5
5
  module Version
6
- STRING = '1.62.0'
6
+ STRING = '1.63.0'
7
7
 
8
8
  MSG = '%<version>s (using %<parser_version>s, ' \
9
9
  'rubocop-ast %<rubocop_ast_version>s, ' \
@@ -11,7 +11,7 @@ module RuboCop
11
11
 
12
12
  CANONICAL_FEATURE_NAMES = {
13
13
  'Rspec' => 'RSpec', 'Graphql' => 'GraphQL', 'Md' => 'Markdown', 'Factory_bot' => 'FactoryBot',
14
- 'Thread_safety' => 'ThreadSafety'
14
+ 'Thread_safety' => 'ThreadSafety', 'Rspec_rails' => 'RSpecRails'
15
15
  }.freeze
16
16
  EXTENSION_PATH_NAMES = {
17
17
  'rubocop-md' => 'markdown', 'rubocop-factory_bot' => 'factory_bot'
data/lib/rubocop.rb CHANGED
@@ -557,6 +557,7 @@ require_relative 'rubocop/cop/style/lambda'
557
557
  require_relative 'rubocop/cop/style/lambda_call'
558
558
  require_relative 'rubocop/cop/style/line_end_concatenation'
559
559
  require_relative 'rubocop/cop/style/magic_comment_format'
560
+ require_relative 'rubocop/cop/style/map_into_array'
560
561
  require_relative 'rubocop/cop/style/map_to_hash'
561
562
  require_relative 'rubocop/cop/style/map_to_set'
562
563
  require_relative 'rubocop/cop/style/method_call_without_args_parentheses'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.62.0
4
+ version: 1.63.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2024-03-06 00:00:00.000000000 Z
13
+ date: 2024-04-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
@@ -778,6 +778,7 @@ files:
778
778
  - lib/rubocop/cop/style/line_end_concatenation.rb
779
779
  - lib/rubocop/cop/style/magic_comment_format.rb
780
780
  - lib/rubocop/cop/style/map_compact_with_conditional_block.rb
781
+ - lib/rubocop/cop/style/map_into_array.rb
781
782
  - lib/rubocop/cop/style/map_to_hash.rb
782
783
  - lib/rubocop/cop/style/map_to_set.rb
783
784
  - lib/rubocop/cop/style/method_call_with_args_parentheses.rb
@@ -1031,9 +1032,9 @@ licenses:
1031
1032
  - MIT
1032
1033
  metadata:
1033
1034
  homepage_uri: https://rubocop.org/
1034
- changelog_uri: https://github.com/rubocop/rubocop/releases/tag/v1.62.0
1035
+ changelog_uri: https://github.com/rubocop/rubocop/releases/tag/v1.63.0
1035
1036
  source_code_uri: https://github.com/rubocop/rubocop/
1036
- documentation_uri: https://docs.rubocop.org/rubocop/1.62/
1037
+ documentation_uri: https://docs.rubocop.org/rubocop/1.63/
1037
1038
  bug_tracker_uri: https://github.com/rubocop/rubocop/issues
1038
1039
  rubygems_mfa_required: 'true'
1039
1040
  post_install_message: