rubocop 0.75.1 → 0.80.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 (199) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +4 -4
  4. data/config/default.yml +374 -335
  5. data/lib/rubocop.rb +53 -32
  6. data/lib/rubocop/ast/builder.rb +43 -41
  7. data/lib/rubocop/ast/node.rb +5 -13
  8. data/lib/rubocop/ast/node/block_node.rb +2 -0
  9. data/lib/rubocop/ast/node/def_node.rb +11 -0
  10. data/lib/rubocop/ast/node/forward_args_node.rb +18 -0
  11. data/lib/rubocop/ast/node/regexp_node.rb +2 -4
  12. data/lib/rubocop/ast/node/return_node.rb +24 -0
  13. data/lib/rubocop/ast/traversal.rb +20 -3
  14. data/lib/rubocop/cli.rb +11 -227
  15. data/lib/rubocop/cli/command.rb +21 -0
  16. data/lib/rubocop/cli/command/auto_genenerate_config.rb +105 -0
  17. data/lib/rubocop/cli/command/base.rb +33 -0
  18. data/lib/rubocop/cli/command/execute_runner.rb +76 -0
  19. data/lib/rubocop/cli/command/init_dotfile.rb +45 -0
  20. data/lib/rubocop/cli/command/show_cops.rb +80 -0
  21. data/lib/rubocop/cli/command/version.rb +17 -0
  22. data/lib/rubocop/cli/environment.rb +21 -0
  23. data/lib/rubocop/comment_config.rb +8 -3
  24. data/lib/rubocop/config.rb +8 -1
  25. data/lib/rubocop/config_loader.rb +20 -20
  26. data/lib/rubocop/config_loader_resolver.rb +2 -1
  27. data/lib/rubocop/config_obsoletion.rb +73 -10
  28. data/lib/rubocop/config_validator.rb +77 -110
  29. data/lib/rubocop/cop/autocorrect_logic.rb +7 -4
  30. data/lib/rubocop/cop/bundler/gem_comment.rb +4 -4
  31. data/lib/rubocop/cop/bundler/insecure_protocol_source.rb +2 -2
  32. data/lib/rubocop/cop/commissioner.rb +15 -7
  33. data/lib/rubocop/cop/cop.rb +31 -6
  34. data/lib/rubocop/cop/corrector.rb +8 -7
  35. data/lib/rubocop/cop/correctors/space_corrector.rb +1 -2
  36. data/lib/rubocop/cop/gemspec/ordered_dependencies.rb +1 -1
  37. data/lib/rubocop/cop/generator.rb +3 -4
  38. data/lib/rubocop/cop/generator/configuration_injector.rb +2 -2
  39. data/lib/rubocop/cop/internal_affairs.rb +1 -0
  40. data/lib/rubocop/cop/internal_affairs/method_name_equal.rb +59 -0
  41. data/lib/rubocop/cop/layout/{align_arguments.rb → argument_alignment.rb} +1 -1
  42. data/lib/rubocop/cop/layout/{align_array.rb → array_alignment.rb} +1 -1
  43. data/lib/rubocop/cop/layout/{indent_assignment.rb → assignment_indentation.rb} +1 -1
  44. data/lib/rubocop/cop/layout/comment_indentation.rb +10 -13
  45. data/lib/rubocop/cop/layout/empty_comment.rb +7 -16
  46. data/lib/rubocop/cop/layout/empty_line_between_defs.rb +2 -1
  47. data/lib/rubocop/cop/layout/end_of_line.rb +8 -3
  48. data/lib/rubocop/cop/layout/extra_spacing.rb +1 -1
  49. data/lib/rubocop/cop/layout/{indent_first_argument.rb → first_argument_indentation.rb} +14 -12
  50. data/lib/rubocop/cop/layout/{indent_first_array_element.rb → first_array_element_indentation.rb} +4 -4
  51. data/lib/rubocop/cop/layout/{indent_first_hash_element.rb → first_hash_element_indentation.rb} +4 -4
  52. data/lib/rubocop/cop/layout/{indent_first_parameter.rb → first_parameter_indentation.rb} +3 -3
  53. data/lib/rubocop/cop/layout/{align_hash.rb → hash_alignment.rb} +16 -8
  54. data/lib/rubocop/cop/layout/{indent_heredoc.rb → heredoc_indentation.rb} +5 -5
  55. data/lib/rubocop/cop/layout/leading_comment_space.rb +33 -2
  56. data/lib/rubocop/cop/layout/{leading_blank_lines.rb → leading_empty_lines.rb} +1 -1
  57. data/lib/rubocop/cop/{metrics → layout}/line_length.rb +68 -112
  58. data/lib/rubocop/cop/layout/multiline_assignment_layout.rb +1 -1
  59. data/lib/rubocop/cop/layout/multiline_block_layout.rb +14 -5
  60. data/lib/rubocop/cop/layout/multiline_hash_brace_layout.rb +0 -4
  61. data/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb +1 -1
  62. data/lib/rubocop/cop/layout/{align_parameters.rb → parameter_alignment.rb} +1 -1
  63. data/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +2 -0
  64. data/lib/rubocop/cop/layout/space_around_keyword.rb +12 -0
  65. data/lib/rubocop/cop/layout/space_around_operators.rb +50 -7
  66. data/lib/rubocop/cop/layout/space_before_block_braces.rb +17 -0
  67. data/lib/rubocop/cop/layout/space_before_first_arg.rb +8 -0
  68. data/lib/rubocop/cop/layout/space_in_lambda_literal.rb +9 -7
  69. data/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb +7 -4
  70. data/lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb +2 -9
  71. data/lib/rubocop/cop/layout/space_inside_parens.rb +6 -6
  72. data/lib/rubocop/cop/layout/{trailing_blank_lines.rb → trailing_empty_lines.rb} +1 -1
  73. data/lib/rubocop/cop/layout/trailing_whitespace.rb +18 -2
  74. data/lib/rubocop/cop/lint/debugger.rb +1 -1
  75. data/lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb +1 -1
  76. data/lib/rubocop/cop/lint/{duplicated_key.rb → duplicate_hash_key.rb} +1 -1
  77. data/lib/rubocop/cop/lint/each_with_object_argument.rb +1 -1
  78. data/lib/rubocop/cop/lint/erb_new_arguments.rb +9 -8
  79. data/lib/rubocop/cop/lint/ineffective_access_modifier.rb +1 -1
  80. data/lib/rubocop/cop/lint/missing_cop_enable_directive.rb +2 -2
  81. data/lib/rubocop/cop/lint/{multiple_compare.rb → multiple_comparison.rb} +1 -1
  82. data/lib/rubocop/cop/lint/non_deterministic_require_order.rb +89 -0
  83. data/lib/rubocop/cop/lint/{unneeded_cop_disable_directive.rb → redundant_cop_disable_directive.rb} +26 -26
  84. data/lib/rubocop/cop/lint/{unneeded_cop_enable_directive.rb → redundant_cop_enable_directive.rb} +18 -15
  85. data/lib/rubocop/cop/lint/{unneeded_require_statement.rb → redundant_require_statement.rb} +1 -1
  86. data/lib/rubocop/cop/lint/{unneeded_splat_expansion.rb → redundant_splat_expansion.rb} +6 -6
  87. data/lib/rubocop/cop/lint/{string_conversion_in_interpolation.rb → redundant_string_coercion.rb} +1 -1
  88. data/lib/rubocop/cop/lint/redundant_with_index.rb +2 -2
  89. data/lib/rubocop/cop/lint/redundant_with_object.rb +2 -2
  90. data/lib/rubocop/cop/lint/safe_navigation_chain.rb +5 -6
  91. data/lib/rubocop/cop/lint/{handle_exceptions.rb → suppressed_exception.rb} +1 -1
  92. data/lib/rubocop/cop/lint/useless_access_modifier.rb +57 -23
  93. data/lib/rubocop/cop/lint/useless_setter_call.rb +5 -1
  94. data/lib/rubocop/cop/lint/void.rb +4 -4
  95. data/lib/rubocop/cop/metrics/abc_size.rb +1 -1
  96. data/lib/rubocop/cop/metrics/method_length.rb +1 -1
  97. data/lib/rubocop/cop/metrics/utils/abc_size_calculator.rb +23 -6
  98. data/lib/rubocop/cop/migration/department_name.rb +30 -2
  99. data/lib/rubocop/cop/mixin/alignment.rb +1 -1
  100. data/lib/rubocop/cop/mixin/configurable_enforced_style.rb +4 -0
  101. data/lib/rubocop/cop/mixin/frozen_string_literal.rb +7 -7
  102. data/lib/rubocop/cop/mixin/{hash_alignment.rb → hash_alignment_styles.rb} +1 -1
  103. data/lib/rubocop/cop/mixin/hash_transform_method.rb +172 -0
  104. data/lib/rubocop/cop/mixin/line_length_help.rb +88 -0
  105. data/lib/rubocop/cop/mixin/method_complexity.rb +2 -1
  106. data/lib/rubocop/cop/mixin/nil_methods.rb +4 -4
  107. data/lib/rubocop/cop/mixin/rational_literal.rb +18 -0
  108. data/lib/rubocop/cop/mixin/statement_modifier.rb +7 -4
  109. data/lib/rubocop/cop/mixin/trailing_comma.rb +16 -18
  110. data/lib/rubocop/cop/naming/{uncommunicative_block_param_name.rb → block_parameter_name.rb} +3 -3
  111. data/lib/rubocop/cop/naming/file_name.rb +12 -5
  112. data/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb +5 -5
  113. data/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +1 -1
  114. data/lib/rubocop/cop/naming/{uncommunicative_method_param_name.rb → method_parameter_name.rb} +4 -4
  115. data/lib/rubocop/cop/naming/predicate_name.rb +6 -6
  116. data/lib/rubocop/cop/offense.rb +11 -0
  117. data/lib/rubocop/cop/registry.rb +8 -3
  118. data/lib/rubocop/cop/style/alias.rb +1 -1
  119. data/lib/rubocop/cop/style/array_join.rb +1 -1
  120. data/lib/rubocop/cop/style/attr.rb +10 -2
  121. data/lib/rubocop/cop/style/block_delimiters.rb +60 -1
  122. data/lib/rubocop/cop/style/comment_annotation.rb +5 -5
  123. data/lib/rubocop/cop/style/conditional_assignment.rb +2 -2
  124. data/lib/rubocop/cop/style/copyright.rb +11 -7
  125. data/lib/rubocop/cop/style/double_cop_disable_directive.rb +2 -2
  126. data/lib/rubocop/cop/style/empty_case_condition.rb +2 -2
  127. data/lib/rubocop/cop/style/empty_literal.rb +2 -2
  128. data/lib/rubocop/cop/style/empty_method.rb +5 -5
  129. data/lib/rubocop/cop/style/eval_with_location.rb +1 -1
  130. data/lib/rubocop/cop/style/even_odd.rb +1 -1
  131. data/lib/rubocop/cop/style/format_string.rb +10 -7
  132. data/lib/rubocop/cop/style/format_string_token.rb +2 -0
  133. data/lib/rubocop/cop/style/frozen_string_literal_comment.rb +99 -11
  134. data/lib/rubocop/cop/style/guard_clause.rb +3 -2
  135. data/lib/rubocop/cop/style/hash_each_methods.rb +87 -0
  136. data/lib/rubocop/cop/style/hash_syntax.rb +2 -2
  137. data/lib/rubocop/cop/style/hash_transform_keys.rb +79 -0
  138. data/lib/rubocop/cop/style/hash_transform_values.rb +79 -0
  139. data/lib/rubocop/cop/style/if_unless_modifier.rb +45 -3
  140. data/lib/rubocop/cop/style/infinite_loop.rb +5 -4
  141. data/lib/rubocop/cop/style/inverse_methods.rb +19 -13
  142. data/lib/rubocop/cop/style/ip_addresses.rb +4 -4
  143. data/lib/rubocop/cop/style/line_end_concatenation.rb +14 -10
  144. data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +7 -205
  145. data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +169 -0
  146. data/lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb +54 -0
  147. data/lib/rubocop/cop/style/method_def_parentheses.rb +17 -9
  148. data/lib/rubocop/cop/style/mixin_grouping.rb +1 -1
  149. data/lib/rubocop/cop/style/multiline_method_signature.rb +1 -1
  150. data/lib/rubocop/cop/style/multiline_when_then.rb +6 -2
  151. data/lib/rubocop/cop/style/nested_modifier.rb +4 -2
  152. data/lib/rubocop/cop/style/nested_parenthesized_calls.rb +5 -5
  153. data/lib/rubocop/cop/style/next.rb +5 -5
  154. data/lib/rubocop/cop/style/non_nil_check.rb +21 -9
  155. data/lib/rubocop/cop/style/numeric_literals.rb +7 -3
  156. data/lib/rubocop/cop/style/numeric_predicate.rb +4 -3
  157. data/lib/rubocop/cop/style/option_hash.rb +3 -3
  158. data/lib/rubocop/cop/style/or_assignment.rb +3 -2
  159. data/lib/rubocop/cop/style/percent_literal_delimiters.rb +7 -7
  160. data/lib/rubocop/cop/style/{unneeded_capital_w.rb → redundant_capital_w.rb} +1 -1
  161. data/lib/rubocop/cop/style/{unneeded_condition.rb → redundant_condition.rb} +3 -3
  162. data/lib/rubocop/cop/style/{unneeded_interpolation.rb → redundant_interpolation.rb} +1 -1
  163. data/lib/rubocop/cop/style/redundant_parentheses.rb +3 -3
  164. data/lib/rubocop/cop/style/{unneeded_percent_q.rb → redundant_percent_q.rb} +1 -1
  165. data/lib/rubocop/cop/style/redundant_return.rb +27 -29
  166. data/lib/rubocop/cop/style/{unneeded_sort.rb → redundant_sort.rb} +5 -5
  167. data/lib/rubocop/cop/style/safe_navigation.rb +13 -10
  168. data/lib/rubocop/cop/style/semicolon.rb +2 -2
  169. data/lib/rubocop/cop/style/special_global_vars.rb +5 -7
  170. data/lib/rubocop/cop/style/symbol_array.rb +2 -2
  171. data/lib/rubocop/cop/style/ternary_parentheses.rb +1 -1
  172. data/lib/rubocop/cop/style/trailing_comma_in_arguments.rb +0 -22
  173. data/lib/rubocop/cop/style/trailing_underscore_variable.rb +7 -1
  174. data/lib/rubocop/cop/style/trivial_accessors.rb +5 -5
  175. data/lib/rubocop/cop/style/while_until_modifier.rb +1 -1
  176. data/lib/rubocop/cop/style/yoda_condition.rb +16 -1
  177. data/lib/rubocop/cop/team.rb +5 -0
  178. data/lib/rubocop/cop/util.rb +1 -1
  179. data/lib/rubocop/cop/utils/format_string.rb +10 -18
  180. data/lib/rubocop/cop/variable_force.rb +11 -6
  181. data/lib/rubocop/formatter/base_formatter.rb +2 -2
  182. data/lib/rubocop/formatter/clang_style_formatter.rb +1 -3
  183. data/lib/rubocop/formatter/formatter_set.rb +1 -0
  184. data/lib/rubocop/formatter/json_formatter.rb +6 -5
  185. data/lib/rubocop/formatter/junit_formatter.rb +63 -0
  186. data/lib/rubocop/formatter/tap_formatter.rb +1 -3
  187. data/lib/rubocop/node_pattern.rb +100 -12
  188. data/lib/rubocop/options.rb +17 -11
  189. data/lib/rubocop/processed_source.rb +1 -1
  190. data/lib/rubocop/rake_task.rb +1 -0
  191. data/lib/rubocop/result_cache.rb +24 -8
  192. data/lib/rubocop/rspec/shared_contexts.rb +5 -0
  193. data/lib/rubocop/runner.rb +50 -29
  194. data/lib/rubocop/target_finder.rb +12 -6
  195. data/lib/rubocop/target_ruby.rb +151 -0
  196. data/lib/rubocop/version.rb +1 -1
  197. metadata +69 -35
  198. data/lib/rubocop/cop/mixin/safe_mode.rb +0 -24
  199. data/lib/rubocop/cop/style/braces_around_hash_parameters.rb +0 -209
@@ -52,6 +52,7 @@ RSpec.shared_context 'config', :config do
52
52
  cop_name = described_class.cop_name
53
53
  hash[cop_name] = RuboCop::ConfigLoader
54
54
  .default_configuration[cop_name]
55
+ .merge('Enabled' => true) # in case it is 'pending'
55
56
  .merge(cop_config)
56
57
  end
57
58
 
@@ -88,3 +89,7 @@ end
88
89
  RSpec.shared_context 'ruby 2.6', :ruby26 do
89
90
  let(:ruby_version) { 2.6 }
90
91
  end
92
+
93
+ RSpec.shared_context 'ruby 2.7', :ruby27 do
94
+ let(:ruby_version) { 2.7 }
95
+ end
@@ -104,30 +104,31 @@ module RuboCop
104
104
  end
105
105
 
106
106
  def process_file(file)
107
- puts "Scanning #{file}" if @options[:debug]
108
107
  file_started(file)
109
-
110
108
  offenses = file_offenses(file)
111
- if @options[:display_only_fail_level_offenses]
112
- offenses = offenses.select { |o| considered_failure?(o) }
113
- end
114
- formatter_set.file_finished(file, offenses)
115
- offenses
116
109
  rescue InfiniteCorrectionLoop => e
117
- formatter_set.file_finished(file, e.offenses.compact.sort.freeze)
110
+ offenses = e.offenses.compact.sort.freeze
118
111
  raise
112
+ ensure
113
+ file_finished(file, offenses || [])
119
114
  end
120
115
 
121
116
  def file_offenses(file)
122
117
  file_offense_cache(file) do
123
118
  source = get_processed_source(file)
124
119
  source, offenses = do_inspection_loop(file, source)
125
- add_unneeded_disables(file, offenses.compact.sort, source)
120
+ add_redundant_disables(file, offenses.compact.sort, source)
126
121
  end
127
122
  end
128
123
 
124
+ def cached_result(file, team)
125
+ ResultCache.new(file, team, @options, @config_store)
126
+ end
127
+
129
128
  def file_offense_cache(file)
130
- cache = ResultCache.new(file, @options, @config_store) if cached_run?
129
+ config = @config_store.for(file)
130
+ cache = cached_result(file, standby_team(config)) if cached_run?
131
+
131
132
  if cache&.valid?
132
133
  offenses = cache.load
133
134
  # If we're running --auto-correct and the cache says there are
@@ -146,33 +147,37 @@ module RuboCop
146
147
  offenses
147
148
  end
148
149
 
149
- def add_unneeded_disables(file, offenses, source)
150
- if check_for_unneeded_disables?(source)
151
- config = @config_store.for(file)
152
- if config.for_cop(Cop::Lint::UnneededCopDisableDirective)
153
- .fetch('Enabled')
154
- cop = Cop::Lint::UnneededCopDisableDirective.new(config, @options)
155
- if cop.relevant_file?(file)
156
- cop.check(offenses, source.disabled_line_ranges, source.comments)
157
- offenses += cop.offenses
158
- offenses += autocorrect_unneeded_disables(file, source, cop,
159
- offenses)
160
- end
150
+ def add_redundant_disables(file, offenses, source)
151
+ if check_for_redundant_disables?(source)
152
+ redundant_cop_disable_directive(file) do |cop|
153
+ cop.check(offenses, source.disabled_line_ranges, source.comments)
154
+ offenses += cop.offenses
155
+ offenses += autocorrect_redundant_disables(file, source, cop,
156
+ offenses)
161
157
  end
162
158
  end
163
159
 
164
160
  offenses.sort.reject(&:disabled?).freeze
165
161
  end
166
162
 
167
- def check_for_unneeded_disables?(source)
163
+ def check_for_redundant_disables?(source)
168
164
  !source.disabled_line_ranges.empty? && !filtered_run?
169
165
  end
170
166
 
167
+ def redundant_cop_disable_directive(file)
168
+ config = @config_store.for(file)
169
+ if config.for_cop(Cop::Lint::RedundantCopDisableDirective)
170
+ .fetch('Enabled')
171
+ cop = Cop::Lint::RedundantCopDisableDirective.new(config, @options)
172
+ yield cop if cop.relevant_file?(file)
173
+ end
174
+ end
175
+
171
176
  def filtered_run?
172
177
  @options[:except] || @options[:only]
173
178
  end
174
179
 
175
- def autocorrect_unneeded_disables(file, source, cop, offenses)
180
+ def autocorrect_redundant_disables(file, source, cop, offenses)
176
181
  cop.processed_source = source
177
182
 
178
183
  team = Cop::Team.new(RuboCop::Cop::Registry.new, nil, @options)
@@ -180,7 +185,7 @@ module RuboCop
180
185
 
181
186
  return [] unless team.updated_source_file?
182
187
 
183
- # Do one extra inspection loop if any unneeded disables were
188
+ # Do one extra inspection loop if any redundant disables were
184
189
  # removed. This is done in order to find rubocop:enable directives that
185
190
  # have now become useless.
186
191
  _source, new_offenses = do_inspection_loop(file,
@@ -189,11 +194,19 @@ module RuboCop
189
194
  end
190
195
 
191
196
  def file_started(file)
197
+ puts "Scanning #{file}" if @options[:debug]
192
198
  formatter_set.file_started(file,
193
199
  cli_options: @options,
194
200
  config_store: @config_store)
195
201
  end
196
202
 
203
+ def file_finished(file, offenses)
204
+ if @options[:display_only_fail_level_offenses]
205
+ offenses = offenses.select { |o| considered_failure?(o) }
206
+ end
207
+ formatter_set.file_finished(file, offenses)
208
+ end
209
+
197
210
  def cached_run?
198
211
  @cached_run ||=
199
212
  (@options[:cache] == 'true' ||
@@ -201,7 +214,7 @@ module RuboCop
201
214
  @config_store.for(Dir.pwd).for_all_cops['UseCache']) &&
202
215
  # When running --auto-gen-config, there's some processing done in the
203
216
  # cops related to calculating the Max parameters for Metrics cops. We
204
- # need to do that processing and can not use caching.
217
+ # need to do that processing and cannot use caching.
205
218
  !@options[:auto_gen_config] &&
206
219
  # We can't cache results from code which is piped in to stdin
207
220
  !@options[:stdin]
@@ -291,9 +304,7 @@ module RuboCop
291
304
  @mobilized_cop_classes[config.object_id] ||= begin
292
305
  cop_classes = Cop::Cop.all
293
306
 
294
- %i[only except].each do |opt|
295
- OptionsValidator.validate_cop_list(@options[opt])
296
- end
307
+ OptionsValidator.new(@options).validate_cop_options
297
308
 
298
309
  if @options[:only]
299
310
  cop_classes.select! { |c| c.match?(@options[:only]) }
@@ -354,5 +365,15 @@ module RuboCop
354
365
  ProcessedSource.from_file(file, ruby_version)
355
366
  end
356
367
  end
368
+
369
+ # A Cop::Team instance is stateful and may change when inspecting.
370
+ # The "standby" team for a given config is an initialized but
371
+ # otherwise dormant team that can be used for config- and option-
372
+ # level caching in ResultCache.
373
+ def standby_team(config)
374
+ @team_by_config ||= {}
375
+ @team_by_config[config.object_id] ||=
376
+ Cop::Team.new(mobilized_cop_classes(config), config, @options)
377
+ end
357
378
  end
358
379
  end
@@ -65,12 +65,7 @@ module RuboCop
65
65
  to_inspect?(file, hidden_files, base_dir_config)
66
66
  end
67
67
 
68
- if fail_fast?
69
- # Most recently modified file first.
70
- target_files.sort_by! { |path| -Integer(File.mtime(path)) }
71
- else
72
- target_files.sort!
73
- end
68
+ target_files.sort_by!(&order)
74
69
  end
75
70
 
76
71
  def to_inspect?(file, hidden_files, base_dir_config)
@@ -186,5 +181,16 @@ module RuboCop
186
181
  config.file_to_exclude?(file)
187
182
  end
188
183
  end
184
+
185
+ private
186
+
187
+ def order
188
+ if fail_fast?
189
+ # Most recently modified file first.
190
+ ->(path) { -Integer(File.mtime(path)) }
191
+ else
192
+ :itself
193
+ end
194
+ end
189
195
  end
190
196
  end
@@ -0,0 +1,151 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ # The kind of Ruby that code inspected by RuboCop is written in.
5
+ class TargetRuby
6
+ KNOWN_RUBIES = [2.3, 2.4, 2.5, 2.6, 2.7].freeze
7
+ DEFAULT_VERSION = KNOWN_RUBIES.first
8
+
9
+ OBSOLETE_RUBIES = {
10
+ 1.9 => '0.50', 2.0 => '0.50', 2.1 => '0.58', 2.2 => '0.69'
11
+ }.freeze
12
+ private_constant :KNOWN_RUBIES, :OBSOLETE_RUBIES
13
+
14
+ # A place where information about a target ruby version is found.
15
+ class Source
16
+ attr_reader :version, :name
17
+
18
+ def initialize(config)
19
+ @config = config
20
+ @version = find_version
21
+ end
22
+
23
+ def to_s
24
+ name
25
+ end
26
+ end
27
+
28
+ # The target ruby version may be configured in RuboCop's config.
29
+ class RuboCopConfig < Source
30
+ def name
31
+ "`TargetRubyVersion` parameter (in #{@config.smart_loaded_path})"
32
+ end
33
+
34
+ private
35
+
36
+ def find_version
37
+ @config.for_all_cops['TargetRubyVersion']&.to_f
38
+ end
39
+ end
40
+
41
+ # The target ruby version may be found in a .ruby-version file.
42
+ class RubyVersionFile < Source
43
+ FILENAME = '.ruby-version'
44
+
45
+ def name
46
+ "`#{FILENAME}`"
47
+ end
48
+
49
+ private
50
+
51
+ def find_version
52
+ file = ruby_version_file
53
+ return unless file && File.file?(file)
54
+
55
+ File.read(file).match(/\A(ruby-)?(?<version>\d+\.\d+)/) do |md|
56
+ md[:version].to_f
57
+ end
58
+ end
59
+
60
+ def ruby_version_file
61
+ @ruby_version_file ||=
62
+ @config.find_file_upwards(FILENAME,
63
+ @config.base_dir_for_path_parameters)
64
+ end
65
+ end
66
+
67
+ # The lock file of Bundler may identify the target ruby version.
68
+ class BundlerLockFile < Source
69
+ def name
70
+ "`#{bundler_lock_file_path}`"
71
+ end
72
+
73
+ private
74
+
75
+ def find_version
76
+ lock_file_path = bundler_lock_file_path
77
+ return nil unless lock_file_path
78
+
79
+ in_ruby_section = false
80
+ File.foreach(lock_file_path) do |line|
81
+ # If ruby is in Gemfile.lock or gems.lock, there should be two lines
82
+ # towards the bottom of the file that look like:
83
+ # RUBY VERSION
84
+ # ruby W.X.YpZ
85
+ # We ultimately want to match the "ruby W.X.Y.pZ" line, but there's
86
+ # extra logic to make sure we only start looking once we've seen the
87
+ # "RUBY VERSION" line.
88
+ in_ruby_section ||= line.match(/^\s*RUBY\s*VERSION\s*$/)
89
+ next unless in_ruby_section
90
+
91
+ # We currently only allow this feature to work with MRI ruby. If
92
+ # jruby (or something else) is used by the project, it's lock file
93
+ # will have a line that looks like:
94
+ # RUBY VERSION
95
+ # ruby W.X.YpZ (jruby x.x.x.x)
96
+ # The regex won't match in this situation.
97
+ result = line.match(/^\s*ruby\s+(\d+\.\d+)[p.\d]*\s*$/)
98
+ return result.captures.first.to_f if result
99
+ end
100
+ end
101
+
102
+ def bundler_lock_file_path
103
+ @config.bundler_lock_file_path
104
+ end
105
+ end
106
+
107
+ # If all else fails, a default version will be picked.
108
+ class Default < Source
109
+ def name
110
+ 'default'
111
+ end
112
+
113
+ private
114
+
115
+ def find_version
116
+ DEFAULT_VERSION
117
+ end
118
+ end
119
+
120
+ def self.supported_versions
121
+ KNOWN_RUBIES
122
+ end
123
+
124
+ SOURCES = [RuboCopConfig, RubyVersionFile, BundlerLockFile, Default].freeze
125
+ private_constant :SOURCES
126
+
127
+ def initialize(config)
128
+ @config = config
129
+ end
130
+
131
+ def source
132
+ @source ||= SOURCES.each.lazy.map { |c| c.new(@config) }.detect(&:version)
133
+ end
134
+
135
+ def version
136
+ source.version
137
+ end
138
+
139
+ def supported?
140
+ KNOWN_RUBIES.include?(version)
141
+ end
142
+
143
+ def rubocop_version_with_support
144
+ if supported?
145
+ RuboCop::Version.version
146
+ else
147
+ OBSOLETE_RUBIES[version]
148
+ end
149
+ end
150
+ end
151
+ end
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  # This module holds the RuboCop version information.
5
5
  module Version
6
- STRING = '0.75.1'
6
+ STRING = '0.80.0'
7
7
 
8
8
  MSG = '%<version>s (using Parser %<parser_version>s, running on ' \
9
9
  '%<ruby_engine>s %<ruby_version>s %<ruby_platform>s)'
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: 0.75.1
4
+ version: 0.80.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: 2019-10-14 00:00:00.000000000 Z
13
+ date: 2020-02-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: jaro_winkler
@@ -46,14 +46,14 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: '2.6'
49
+ version: 2.7.0.1
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: '2.6'
56
+ version: 2.7.0.1
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: rainbow
59
59
  requirement: !ruby/object:Gem::Requirement
@@ -74,6 +74,20 @@ dependencies:
74
74
  - - "<"
75
75
  - !ruby/object:Gem::Version
76
76
  version: '4.0'
77
+ - !ruby/object:Gem::Dependency
78
+ name: rexml
79
+ requirement: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ type: :runtime
85
+ prerelease: false
86
+ version_requirements: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
77
91
  - !ruby/object:Gem::Dependency
78
92
  name: ruby-progressbar
79
93
  requirement: !ruby/object:Gem::Requirement
@@ -163,6 +177,7 @@ files:
163
177
  - lib/rubocop/ast/node/ensure_node.rb
164
178
  - lib/rubocop/ast/node/float_node.rb
165
179
  - lib/rubocop/ast/node/for_node.rb
180
+ - lib/rubocop/ast/node/forward_args_node.rb
166
181
  - lib/rubocop/ast/node/hash_node.rb
167
182
  - lib/rubocop/ast/node/if_node.rb
168
183
  - lib/rubocop/ast/node/int_node.rb
@@ -185,6 +200,7 @@ files:
185
200
  - lib/rubocop/ast/node/regexp_node.rb
186
201
  - lib/rubocop/ast/node/resbody_node.rb
187
202
  - lib/rubocop/ast/node/retry_node.rb
203
+ - lib/rubocop/ast/node/return_node.rb
188
204
  - lib/rubocop/ast/node/self_class_node.rb
189
205
  - lib/rubocop/ast/node/send_node.rb
190
206
  - lib/rubocop/ast/node/str_node.rb
@@ -198,6 +214,14 @@ files:
198
214
  - lib/rubocop/ast/traversal.rb
199
215
  - lib/rubocop/cached_data.rb
200
216
  - lib/rubocop/cli.rb
217
+ - lib/rubocop/cli/command.rb
218
+ - lib/rubocop/cli/command/auto_genenerate_config.rb
219
+ - lib/rubocop/cli/command/base.rb
220
+ - lib/rubocop/cli/command/execute_runner.rb
221
+ - lib/rubocop/cli/command/init_dotfile.rb
222
+ - lib/rubocop/cli/command/show_cops.rb
223
+ - lib/rubocop/cli/command/version.rb
224
+ - lib/rubocop/cli/environment.rb
201
225
  - lib/rubocop/comment_config.rb
202
226
  - lib/rubocop/config.rb
203
227
  - lib/rubocop/config_loader.rb
@@ -239,6 +263,7 @@ files:
239
263
  - lib/rubocop/cop/generator/require_file_injector.rb
240
264
  - lib/rubocop/cop/ignored_node.rb
241
265
  - lib/rubocop/cop/internal_affairs.rb
266
+ - lib/rubocop/cop/internal_affairs/method_name_equal.rb
242
267
  - lib/rubocop/cop/internal_affairs/node_destructuring.rb
243
268
  - lib/rubocop/cop/internal_affairs/node_type_predicate.rb
244
269
  - lib/rubocop/cop/internal_affairs/offense_location_keyword.rb
@@ -246,10 +271,9 @@ files:
246
271
  - lib/rubocop/cop/internal_affairs/redundant_message_argument.rb
247
272
  - lib/rubocop/cop/internal_affairs/useless_message_assertion.rb
248
273
  - lib/rubocop/cop/layout/access_modifier_indentation.rb
249
- - lib/rubocop/cop/layout/align_arguments.rb
250
- - lib/rubocop/cop/layout/align_array.rb
251
- - lib/rubocop/cop/layout/align_hash.rb
252
- - lib/rubocop/cop/layout/align_parameters.rb
274
+ - lib/rubocop/cop/layout/argument_alignment.rb
275
+ - lib/rubocop/cop/layout/array_alignment.rb
276
+ - lib/rubocop/cop/layout/assignment_indentation.rb
253
277
  - lib/rubocop/cop/layout/block_alignment.rb
254
278
  - lib/rubocop/cop/layout/block_end_newline.rb
255
279
  - lib/rubocop/cop/layout/case_indentation.rb
@@ -277,22 +301,23 @@ files:
277
301
  - lib/rubocop/cop/layout/end_alignment.rb
278
302
  - lib/rubocop/cop/layout/end_of_line.rb
279
303
  - lib/rubocop/cop/layout/extra_spacing.rb
304
+ - lib/rubocop/cop/layout/first_argument_indentation.rb
305
+ - lib/rubocop/cop/layout/first_array_element_indentation.rb
280
306
  - lib/rubocop/cop/layout/first_array_element_line_break.rb
307
+ - lib/rubocop/cop/layout/first_hash_element_indentation.rb
281
308
  - lib/rubocop/cop/layout/first_hash_element_line_break.rb
282
309
  - lib/rubocop/cop/layout/first_method_argument_line_break.rb
283
310
  - lib/rubocop/cop/layout/first_method_parameter_line_break.rb
311
+ - lib/rubocop/cop/layout/first_parameter_indentation.rb
312
+ - lib/rubocop/cop/layout/hash_alignment.rb
284
313
  - lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb
285
- - lib/rubocop/cop/layout/indent_assignment.rb
286
- - lib/rubocop/cop/layout/indent_first_argument.rb
287
- - lib/rubocop/cop/layout/indent_first_array_element.rb
288
- - lib/rubocop/cop/layout/indent_first_hash_element.rb
289
- - lib/rubocop/cop/layout/indent_first_parameter.rb
290
- - lib/rubocop/cop/layout/indent_heredoc.rb
314
+ - lib/rubocop/cop/layout/heredoc_indentation.rb
291
315
  - lib/rubocop/cop/layout/indentation_consistency.rb
292
316
  - lib/rubocop/cop/layout/indentation_width.rb
293
317
  - lib/rubocop/cop/layout/initial_indentation.rb
294
- - lib/rubocop/cop/layout/leading_blank_lines.rb
295
318
  - lib/rubocop/cop/layout/leading_comment_space.rb
319
+ - lib/rubocop/cop/layout/leading_empty_lines.rb
320
+ - lib/rubocop/cop/layout/line_length.rb
296
321
  - lib/rubocop/cop/layout/multiline_array_brace_layout.rb
297
322
  - lib/rubocop/cop/layout/multiline_array_line_breaks.rb
298
323
  - lib/rubocop/cop/layout/multiline_assignment_layout.rb
@@ -304,6 +329,7 @@ files:
304
329
  - lib/rubocop/cop/layout/multiline_method_call_indentation.rb
305
330
  - lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb
306
331
  - lib/rubocop/cop/layout/multiline_operation_indentation.rb
332
+ - lib/rubocop/cop/layout/parameter_alignment.rb
307
333
  - lib/rubocop/cop/layout/rescue_ensure_alignment.rb
308
334
  - lib/rubocop/cop/layout/space_after_colon.rb
309
335
  - lib/rubocop/cop/layout/space_after_comma.rb
@@ -330,7 +356,7 @@ files:
330
356
  - lib/rubocop/cop/layout/space_inside_reference_brackets.rb
331
357
  - lib/rubocop/cop/layout/space_inside_string_interpolation.rb
332
358
  - lib/rubocop/cop/layout/tab.rb
333
- - lib/rubocop/cop/layout/trailing_blank_lines.rb
359
+ - lib/rubocop/cop/layout/trailing_empty_lines.rb
334
360
  - lib/rubocop/cop/layout/trailing_whitespace.rb
335
361
  - lib/rubocop/cop/lint/ambiguous_block_association.rb
336
362
  - lib/rubocop/cop/lint/ambiguous_operator.rb
@@ -343,8 +369,8 @@ files:
343
369
  - lib/rubocop/cop/lint/deprecated_class_methods.rb
344
370
  - lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb
345
371
  - lib/rubocop/cop/lint/duplicate_case_condition.rb
372
+ - lib/rubocop/cop/lint/duplicate_hash_key.rb
346
373
  - lib/rubocop/cop/lint/duplicate_methods.rb
347
- - lib/rubocop/cop/lint/duplicated_key.rb
348
374
  - lib/rubocop/cop/lint/each_with_object_argument.rb
349
375
  - lib/rubocop/cop/lint/else_layout.rb
350
376
  - lib/rubocop/cop/lint/empty_ensure.rb
@@ -357,7 +383,6 @@ files:
357
383
  - lib/rubocop/cop/lint/flip_flop.rb
358
384
  - lib/rubocop/cop/lint/float_out_of_range.rb
359
385
  - lib/rubocop/cop/lint/format_parameter_mismatch.rb
360
- - lib/rubocop/cop/lint/handle_exceptions.rb
361
386
  - lib/rubocop/cop/lint/heredoc_method_call_position.rb
362
387
  - lib/rubocop/cop/lint/implicit_string_concatenation.rb
363
388
  - lib/rubocop/cop/lint/ineffective_access_modifier.rb
@@ -367,10 +392,11 @@ files:
367
392
  - lib/rubocop/cop/lint/literal_in_interpolation.rb
368
393
  - lib/rubocop/cop/lint/loop.rb
369
394
  - lib/rubocop/cop/lint/missing_cop_enable_directive.rb
370
- - lib/rubocop/cop/lint/multiple_compare.rb
395
+ - lib/rubocop/cop/lint/multiple_comparison.rb
371
396
  - lib/rubocop/cop/lint/nested_method_definition.rb
372
397
  - lib/rubocop/cop/lint/nested_percent_literal.rb
373
398
  - lib/rubocop/cop/lint/next_without_accumulator.rb
399
+ - lib/rubocop/cop/lint/non_deterministic_require_order.rb
374
400
  - lib/rubocop/cop/lint/non_local_exit_from_iterator.rb
375
401
  - lib/rubocop/cop/lint/number_conversion.rb
376
402
  - lib/rubocop/cop/lint/ordered_magic_comments.rb
@@ -378,6 +404,11 @@ files:
378
404
  - lib/rubocop/cop/lint/percent_string_array.rb
379
405
  - lib/rubocop/cop/lint/percent_symbol_array.rb
380
406
  - lib/rubocop/cop/lint/rand_one.rb
407
+ - lib/rubocop/cop/lint/redundant_cop_disable_directive.rb
408
+ - lib/rubocop/cop/lint/redundant_cop_enable_directive.rb
409
+ - lib/rubocop/cop/lint/redundant_require_statement.rb
410
+ - lib/rubocop/cop/lint/redundant_splat_expansion.rb
411
+ - lib/rubocop/cop/lint/redundant_string_coercion.rb
381
412
  - lib/rubocop/cop/lint/redundant_with_index.rb
382
413
  - lib/rubocop/cop/lint/redundant_with_object.rb
383
414
  - lib/rubocop/cop/lint/regexp_as_condition.rb
@@ -393,15 +424,11 @@ files:
393
424
  - lib/rubocop/cop/lint/shadowed_argument.rb
394
425
  - lib/rubocop/cop/lint/shadowed_exception.rb
395
426
  - lib/rubocop/cop/lint/shadowing_outer_local_variable.rb
396
- - lib/rubocop/cop/lint/string_conversion_in_interpolation.rb
427
+ - lib/rubocop/cop/lint/suppressed_exception.rb
397
428
  - lib/rubocop/cop/lint/syntax.rb
398
429
  - lib/rubocop/cop/lint/to_json.rb
399
430
  - lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb
400
431
  - lib/rubocop/cop/lint/unified_integer.rb
401
- - lib/rubocop/cop/lint/unneeded_cop_disable_directive.rb
402
- - lib/rubocop/cop/lint/unneeded_cop_enable_directive.rb
403
- - lib/rubocop/cop/lint/unneeded_require_statement.rb
404
- - lib/rubocop/cop/lint/unneeded_splat_expansion.rb
405
432
  - lib/rubocop/cop/lint/unreachable_code.rb
406
433
  - lib/rubocop/cop/lint/unused_block_argument.rb
407
434
  - lib/rubocop/cop/lint/unused_method_argument.rb
@@ -419,7 +446,6 @@ files:
419
446
  - lib/rubocop/cop/metrics/block_nesting.rb
420
447
  - lib/rubocop/cop/metrics/class_length.rb
421
448
  - lib/rubocop/cop/metrics/cyclomatic_complexity.rb
422
- - lib/rubocop/cop/metrics/line_length.rb
423
449
  - lib/rubocop/cop/metrics/method_length.rb
424
450
  - lib/rubocop/cop/metrics/module_length.rb
425
451
  - lib/rubocop/cop/metrics/parameter_lists.rb
@@ -448,12 +474,14 @@ files:
448
474
  - lib/rubocop/cop/mixin/enforce_superclass.rb
449
475
  - lib/rubocop/cop/mixin/first_element_line_break.rb
450
476
  - lib/rubocop/cop/mixin/frozen_string_literal.rb
451
- - lib/rubocop/cop/mixin/hash_alignment.rb
477
+ - lib/rubocop/cop/mixin/hash_alignment_styles.rb
478
+ - lib/rubocop/cop/mixin/hash_transform_method.rb
452
479
  - lib/rubocop/cop/mixin/heredoc.rb
453
480
  - lib/rubocop/cop/mixin/ignored_methods.rb
454
481
  - lib/rubocop/cop/mixin/ignored_pattern.rb
455
482
  - lib/rubocop/cop/mixin/integer_node.rb
456
483
  - lib/rubocop/cop/mixin/interpolation.rb
484
+ - lib/rubocop/cop/mixin/line_length_help.rb
457
485
  - lib/rubocop/cop/mixin/match_range.rb
458
486
  - lib/rubocop/cop/mixin/method_complexity.rb
459
487
  - lib/rubocop/cop/mixin/method_preference.rb
@@ -473,9 +501,9 @@ files:
473
501
  - lib/rubocop/cop/mixin/preceding_following_alignment.rb
474
502
  - lib/rubocop/cop/mixin/preferred_delimiters.rb
475
503
  - lib/rubocop/cop/mixin/range_help.rb
504
+ - lib/rubocop/cop/mixin/rational_literal.rb
476
505
  - lib/rubocop/cop/mixin/rescue_node.rb
477
506
  - lib/rubocop/cop/mixin/safe_assignment.rb
478
- - lib/rubocop/cop/mixin/safe_mode.rb
479
507
  - lib/rubocop/cop/mixin/space_after_punctuation.rb
480
508
  - lib/rubocop/cop/mixin/space_before_punctuation.rb
481
509
  - lib/rubocop/cop/mixin/statement_modifier.rb
@@ -491,6 +519,7 @@ files:
491
519
  - lib/rubocop/cop/naming/accessor_method_name.rb
492
520
  - lib/rubocop/cop/naming/ascii_identifiers.rb
493
521
  - lib/rubocop/cop/naming/binary_operator_parameter_name.rb
522
+ - lib/rubocop/cop/naming/block_parameter_name.rb
494
523
  - lib/rubocop/cop/naming/class_and_module_camel_case.rb
495
524
  - lib/rubocop/cop/naming/constant_name.rb
496
525
  - lib/rubocop/cop/naming/file_name.rb
@@ -498,10 +527,9 @@ files:
498
527
  - lib/rubocop/cop/naming/heredoc_delimiter_naming.rb
499
528
  - lib/rubocop/cop/naming/memoized_instance_variable_name.rb
500
529
  - lib/rubocop/cop/naming/method_name.rb
530
+ - lib/rubocop/cop/naming/method_parameter_name.rb
501
531
  - lib/rubocop/cop/naming/predicate_name.rb
502
532
  - lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb
503
- - lib/rubocop/cop/naming/uncommunicative_block_param_name.rb
504
- - lib/rubocop/cop/naming/uncommunicative_method_param_name.rb
505
533
  - lib/rubocop/cop/naming/variable_name.rb
506
534
  - lib/rubocop/cop/naming/variable_number.rb
507
535
  - lib/rubocop/cop/offense.rb
@@ -523,7 +551,6 @@ files:
523
551
  - lib/rubocop/cop/style/begin_block.rb
524
552
  - lib/rubocop/cop/style/block_comments.rb
525
553
  - lib/rubocop/cop/style/block_delimiters.rb
526
- - lib/rubocop/cop/style/braces_around_hash_parameters.rb
527
554
  - lib/rubocop/cop/style/case_equality.rb
528
555
  - lib/rubocop/cop/style/character_literal.rb
529
556
  - lib/rubocop/cop/style/class_and_module_children.rb
@@ -566,7 +593,10 @@ files:
566
593
  - lib/rubocop/cop/style/frozen_string_literal_comment.rb
567
594
  - lib/rubocop/cop/style/global_vars.rb
568
595
  - lib/rubocop/cop/style/guard_clause.rb
596
+ - lib/rubocop/cop/style/hash_each_methods.rb
569
597
  - lib/rubocop/cop/style/hash_syntax.rb
598
+ - lib/rubocop/cop/style/hash_transform_keys.rb
599
+ - lib/rubocop/cop/style/hash_transform_values.rb
570
600
  - lib/rubocop/cop/style/identical_conditional_branches.rb
571
601
  - lib/rubocop/cop/style/if_inside_else.rb
572
602
  - lib/rubocop/cop/style/if_unless_modifier.rb
@@ -581,6 +611,8 @@ files:
581
611
  - lib/rubocop/cop/style/lambda_call.rb
582
612
  - lib/rubocop/cop/style/line_end_concatenation.rb
583
613
  - lib/rubocop/cop/style/method_call_with_args_parentheses.rb
614
+ - lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb
615
+ - lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb
584
616
  - lib/rubocop/cop/style/method_call_without_args_parentheses.rb
585
617
  - lib/rubocop/cop/style/method_called_on_do_end_block.rb
586
618
  - lib/rubocop/cop/style/method_def_parentheses.rb
@@ -627,12 +659,17 @@ files:
627
659
  - lib/rubocop/cop/style/raise_args.rb
628
660
  - lib/rubocop/cop/style/random_with_offset.rb
629
661
  - lib/rubocop/cop/style/redundant_begin.rb
662
+ - lib/rubocop/cop/style/redundant_capital_w.rb
663
+ - lib/rubocop/cop/style/redundant_condition.rb
630
664
  - lib/rubocop/cop/style/redundant_conditional.rb
631
665
  - lib/rubocop/cop/style/redundant_exception.rb
632
666
  - lib/rubocop/cop/style/redundant_freeze.rb
667
+ - lib/rubocop/cop/style/redundant_interpolation.rb
633
668
  - lib/rubocop/cop/style/redundant_parentheses.rb
669
+ - lib/rubocop/cop/style/redundant_percent_q.rb
634
670
  - lib/rubocop/cop/style/redundant_return.rb
635
671
  - lib/rubocop/cop/style/redundant_self.rb
672
+ - lib/rubocop/cop/style/redundant_sort.rb
636
673
  - lib/rubocop/cop/style/redundant_sort_by.rb
637
674
  - lib/rubocop/cop/style/regexp_literal.rb
638
675
  - lib/rubocop/cop/style/rescue_modifier.rb
@@ -669,11 +706,6 @@ files:
669
706
  - lib/rubocop/cop/style/trailing_underscore_variable.rb
670
707
  - lib/rubocop/cop/style/trivial_accessors.rb
671
708
  - lib/rubocop/cop/style/unless_else.rb
672
- - lib/rubocop/cop/style/unneeded_capital_w.rb
673
- - lib/rubocop/cop/style/unneeded_condition.rb
674
- - lib/rubocop/cop/style/unneeded_interpolation.rb
675
- - lib/rubocop/cop/style/unneeded_percent_q.rb
676
- - lib/rubocop/cop/style/unneeded_sort.rb
677
709
  - lib/rubocop/cop/style/unpack_first.rb
678
710
  - lib/rubocop/cop/style/variable_interpolation.rb
679
711
  - lib/rubocop/cop/style/when_then.rb
@@ -708,6 +740,7 @@ files:
708
740
  - lib/rubocop/formatter/fuubar_style_formatter.rb
709
741
  - lib/rubocop/formatter/html_formatter.rb
710
742
  - lib/rubocop/formatter/json_formatter.rb
743
+ - lib/rubocop/formatter/junit_formatter.rb
711
744
  - lib/rubocop/formatter/offense_count_formatter.rb
712
745
  - lib/rubocop/formatter/pacman_formatter.rb
713
746
  - lib/rubocop/formatter/progress_formatter.rb
@@ -735,6 +768,7 @@ files:
735
768
  - lib/rubocop/string_interpreter.rb
736
769
  - lib/rubocop/string_util.rb
737
770
  - lib/rubocop/target_finder.rb
771
+ - lib/rubocop/target_ruby.rb
738
772
  - lib/rubocop/token.rb
739
773
  - lib/rubocop/version.rb
740
774
  - lib/rubocop/warning.rb