rubocop 1.69.2 → 1.71.2

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 (253) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +2 -2
  4. data/config/default.yml +36 -2
  5. data/lib/rubocop/cli/command/execute_runner.rb +3 -3
  6. data/lib/rubocop/cli/command/show_cops.rb +24 -2
  7. data/lib/rubocop/comment_config.rb +1 -1
  8. data/lib/rubocop/config.rb +13 -4
  9. data/lib/rubocop/config_loader.rb +4 -0
  10. data/lib/rubocop/config_loader_resolver.rb +14 -3
  11. data/lib/rubocop/config_validator.rb +18 -8
  12. data/lib/rubocop/cop/autocorrect_logic.rb +1 -1
  13. data/lib/rubocop/cop/base.rb +6 -0
  14. data/lib/rubocop/cop/bundler/duplicated_gem.rb +1 -1
  15. data/lib/rubocop/cop/bundler/gem_comment.rb +1 -1
  16. data/lib/rubocop/cop/internal_affairs/cop_enabled.rb +85 -0
  17. data/lib/rubocop/cop/internal_affairs/location_expression.rb +2 -1
  18. data/lib/rubocop/cop/internal_affairs/node_first_or_last_argument.rb +3 -2
  19. data/lib/rubocop/cop/internal_affairs/node_matcher_directive.rb +1 -1
  20. data/lib/rubocop/cop/internal_affairs/node_pattern_groups/ast_processor.rb +63 -0
  21. data/lib/rubocop/cop/internal_affairs/node_pattern_groups/ast_walker.rb +131 -0
  22. data/lib/rubocop/cop/internal_affairs/node_pattern_groups.rb +229 -0
  23. data/lib/rubocop/cop/internal_affairs/node_type_multiple_predicates.rb +126 -0
  24. data/lib/rubocop/cop/internal_affairs/node_type_predicate.rb +4 -3
  25. data/lib/rubocop/cop/internal_affairs/on_send_without_on_csend.rb +90 -0
  26. data/lib/rubocop/cop/internal_affairs/redundant_source_range.rb +3 -1
  27. data/lib/rubocop/cop/internal_affairs/single_line_comparison.rb +5 -4
  28. data/lib/rubocop/cop/internal_affairs.rb +4 -0
  29. data/lib/rubocop/cop/layout/access_modifier_indentation.rb +1 -1
  30. data/lib/rubocop/cop/layout/argument_alignment.rb +2 -8
  31. data/lib/rubocop/cop/layout/block_alignment.rb +1 -1
  32. data/lib/rubocop/cop/layout/class_structure.rb +9 -9
  33. data/lib/rubocop/cop/layout/dot_position.rb +1 -1
  34. data/lib/rubocop/cop/layout/else_alignment.rb +1 -1
  35. data/lib/rubocop/cop/layout/empty_line_between_defs.rb +7 -11
  36. data/lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb +1 -0
  37. data/lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb +1 -1
  38. data/lib/rubocop/cop/layout/end_alignment.rb +1 -1
  39. data/lib/rubocop/cop/layout/extra_spacing.rb +1 -1
  40. data/lib/rubocop/cop/layout/first_argument_indentation.rb +3 -8
  41. data/lib/rubocop/cop/layout/first_array_element_indentation.rb +2 -7
  42. data/lib/rubocop/cop/layout/first_hash_element_indentation.rb +2 -7
  43. data/lib/rubocop/cop/layout/first_hash_element_line_break.rb +1 -1
  44. data/lib/rubocop/cop/layout/first_parameter_indentation.rb +2 -2
  45. data/lib/rubocop/cop/layout/hash_alignment.rb +6 -4
  46. data/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +1 -0
  47. data/lib/rubocop/cop/layout/line_continuation_spacing.rb +7 -1
  48. data/lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb +2 -2
  49. data/lib/rubocop/cop/layout/line_length.rb +1 -0
  50. data/lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb +1 -1
  51. data/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb +25 -0
  52. data/lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb +1 -0
  53. data/lib/rubocop/cop/layout/multiline_method_call_indentation.rb +2 -2
  54. data/lib/rubocop/cop/layout/redundant_line_break.rb +7 -6
  55. data/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +1 -1
  56. data/lib/rubocop/cop/layout/single_line_block_chain.rb +1 -1
  57. data/lib/rubocop/cop/layout/space_after_colon.rb +2 -2
  58. data/lib/rubocop/cop/layout/space_after_comma.rb +1 -1
  59. data/lib/rubocop/cop/layout/space_after_method_name.rb +1 -1
  60. data/lib/rubocop/cop/layout/space_after_semicolon.rb +1 -1
  61. data/lib/rubocop/cop/layout/space_around_keyword.rb +1 -0
  62. data/lib/rubocop/cop/layout/space_around_operators.rb +3 -3
  63. data/lib/rubocop/cop/layout/space_before_comma.rb +1 -1
  64. data/lib/rubocop/cop/layout/space_before_semicolon.rb +1 -1
  65. data/lib/rubocop/cop/layout/trailing_whitespace.rb +5 -3
  66. data/lib/rubocop/cop/lint/ambiguous_block_association.rb +1 -1
  67. data/lib/rubocop/cop/lint/array_literal_in_regexp.rb +119 -0
  68. data/lib/rubocop/cop/lint/assignment_in_condition.rb +1 -3
  69. data/lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb +1 -1
  70. data/lib/rubocop/cop/lint/constant_definition_in_block.rb +3 -3
  71. data/lib/rubocop/cop/lint/constant_reassignment.rb +148 -0
  72. data/lib/rubocop/cop/lint/debugger.rb +1 -1
  73. data/lib/rubocop/cop/lint/duplicate_match_pattern.rb +1 -1
  74. data/lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb +1 -1
  75. data/lib/rubocop/cop/lint/duplicate_set_element.rb +20 -7
  76. data/lib/rubocop/cop/lint/empty_expression.rb +0 -2
  77. data/lib/rubocop/cop/lint/float_comparison.rb +5 -2
  78. data/lib/rubocop/cop/lint/float_out_of_range.rb +1 -1
  79. data/lib/rubocop/cop/lint/format_parameter_mismatch.rb +1 -1
  80. data/lib/rubocop/cop/lint/implicit_string_concatenation.rb +1 -1
  81. data/lib/rubocop/cop/lint/literal_in_interpolation.rb +24 -6
  82. data/lib/rubocop/cop/lint/missing_super.rb +2 -2
  83. data/lib/rubocop/cop/lint/mixed_case_range.rb +1 -1
  84. data/lib/rubocop/cop/lint/mixed_regexp_capture_types.rb +1 -1
  85. data/lib/rubocop/cop/lint/nested_method_definition.rb +8 -4
  86. data/lib/rubocop/cop/lint/next_without_accumulator.rb +1 -1
  87. data/lib/rubocop/cop/lint/non_atomic_file_operation.rb +4 -3
  88. data/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb +1 -1
  89. data/lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb +18 -31
  90. data/lib/rubocop/cop/lint/out_of_range_regexp_ref.rb +2 -1
  91. data/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +1 -5
  92. data/lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb +1 -1
  93. data/lib/rubocop/cop/lint/redundant_string_coercion.rb +2 -2
  94. data/lib/rubocop/cop/lint/rescue_exception.rb +1 -1
  95. data/lib/rubocop/cop/lint/safe_navigation_chain.rb +8 -1
  96. data/lib/rubocop/cop/lint/shared_mutable_default.rb +65 -0
  97. data/lib/rubocop/cop/lint/suppressed_exception.rb +1 -1
  98. data/lib/rubocop/cop/lint/symbol_conversion.rb +1 -1
  99. data/lib/rubocop/cop/lint/syntax.rb +4 -1
  100. data/lib/rubocop/cop/lint/unescaped_bracket_in_regexp.rb +1 -4
  101. data/lib/rubocop/cop/lint/unexpected_block_arity.rb +1 -1
  102. data/lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb +1 -1
  103. data/lib/rubocop/cop/lint/unreachable_code.rb +1 -1
  104. data/lib/rubocop/cop/lint/unreachable_loop.rb +1 -1
  105. data/lib/rubocop/cop/lint/useless_access_modifier.rb +4 -4
  106. data/lib/rubocop/cop/lint/useless_assignment.rb +1 -1
  107. data/lib/rubocop/cop/lint/useless_method_definition.rb +1 -1
  108. data/lib/rubocop/cop/lint/useless_numeric_operation.rb +2 -1
  109. data/lib/rubocop/cop/lint/useless_ruby2_keywords.rb +2 -2
  110. data/lib/rubocop/cop/lint/void.rb +5 -9
  111. data/lib/rubocop/cop/metrics/block_nesting.rb +1 -1
  112. data/lib/rubocop/cop/metrics/collection_literal_length.rb +7 -0
  113. data/lib/rubocop/cop/metrics/cyclomatic_complexity.rb +1 -1
  114. data/lib/rubocop/cop/metrics/method_length.rb +8 -1
  115. data/lib/rubocop/cop/metrics/module_length.rb +1 -1
  116. data/lib/rubocop/cop/metrics/perceived_complexity.rb +1 -1
  117. data/lib/rubocop/cop/mixin/check_line_breakable.rb +11 -11
  118. data/lib/rubocop/cop/mixin/comments_help.rb +3 -1
  119. data/lib/rubocop/cop/mixin/dig_help.rb +1 -1
  120. data/lib/rubocop/cop/mixin/frozen_string_literal.rb +1 -1
  121. data/lib/rubocop/cop/mixin/hash_shorthand_syntax.rb +4 -4
  122. data/lib/rubocop/cop/mixin/hash_subset.rb +188 -0
  123. data/lib/rubocop/cop/mixin/method_complexity.rb +1 -1
  124. data/lib/rubocop/cop/mixin/preceding_following_alignment.rb +48 -24
  125. data/lib/rubocop/cop/mixin/space_before_punctuation.rb +1 -1
  126. data/lib/rubocop/cop/mixin/statement_modifier.rb +8 -3
  127. data/lib/rubocop/cop/mixin/string_help.rb +1 -1
  128. data/lib/rubocop/cop/mixin/string_literals_help.rb +1 -1
  129. data/lib/rubocop/cop/mixin/trailing_comma.rb +3 -3
  130. data/lib/rubocop/cop/naming/block_forwarding.rb +19 -15
  131. data/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb +3 -3
  132. data/lib/rubocop/cop/security/compound_hash.rb +1 -0
  133. data/lib/rubocop/cop/style/access_modifier_declarations.rb +34 -5
  134. data/lib/rubocop/cop/style/and_or.rb +1 -1
  135. data/lib/rubocop/cop/style/arguments_forwarding.rb +39 -23
  136. data/lib/rubocop/cop/style/array_first_last.rb +18 -2
  137. data/lib/rubocop/cop/style/block_delimiters.rb +7 -20
  138. data/lib/rubocop/cop/style/class_and_module_children.rb +6 -3
  139. data/lib/rubocop/cop/style/collection_methods.rb +1 -1
  140. data/lib/rubocop/cop/style/combinable_defined.rb +1 -1
  141. data/lib/rubocop/cop/style/combinable_loops.rb +2 -2
  142. data/lib/rubocop/cop/style/concat_array_literals.rb +1 -1
  143. data/lib/rubocop/cop/style/conditional_assignment.rb +6 -4
  144. data/lib/rubocop/cop/style/documentation.rb +1 -1
  145. data/lib/rubocop/cop/style/double_negation.rb +3 -3
  146. data/lib/rubocop/cop/style/each_for_simple_loop.rb +4 -7
  147. data/lib/rubocop/cop/style/each_with_object.rb +2 -3
  148. data/lib/rubocop/cop/style/empty_else.rb +4 -2
  149. data/lib/rubocop/cop/style/empty_literal.rb +1 -1
  150. data/lib/rubocop/cop/style/empty_method.rb +1 -1
  151. data/lib/rubocop/cop/style/eval_with_location.rb +1 -1
  152. data/lib/rubocop/cop/style/exact_regexp_match.rb +3 -10
  153. data/lib/rubocop/cop/style/explicit_block_argument.rb +15 -2
  154. data/lib/rubocop/cop/style/exponential_notation.rb +1 -1
  155. data/lib/rubocop/cop/style/fetch_env_var.rb +1 -1
  156. data/lib/rubocop/cop/style/float_division.rb +8 -4
  157. data/lib/rubocop/cop/style/frozen_string_literal_comment.rb +1 -1
  158. data/lib/rubocop/cop/style/hash_each_methods.rb +3 -6
  159. data/lib/rubocop/cop/style/hash_except.rb +24 -148
  160. data/lib/rubocop/cop/style/hash_slice.rb +80 -0
  161. data/lib/rubocop/cop/style/hash_syntax.rb +6 -3
  162. data/lib/rubocop/cop/style/identical_conditional_branches.rb +22 -3
  163. data/lib/rubocop/cop/style/if_unless_modifier.rb +3 -3
  164. data/lib/rubocop/cop/style/if_with_boolean_literal_branches.rb +1 -1
  165. data/lib/rubocop/cop/style/if_with_semicolon.rb +2 -2
  166. data/lib/rubocop/cop/style/infinite_loop.rb +1 -1
  167. data/lib/rubocop/cop/style/inverse_methods.rb +6 -6
  168. data/lib/rubocop/cop/style/it_assignment.rb +36 -0
  169. data/lib/rubocop/cop/style/keyword_parameters_order.rb +1 -1
  170. data/lib/rubocop/cop/style/map_into_array.rb +1 -1
  171. data/lib/rubocop/cop/style/map_to_hash.rb +1 -1
  172. data/lib/rubocop/cop/style/map_to_set.rb +3 -2
  173. data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +19 -12
  174. data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +2 -0
  175. data/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +2 -1
  176. data/lib/rubocop/cop/style/method_called_on_do_end_block.rb +2 -4
  177. data/lib/rubocop/cop/style/method_def_parentheses.rb +1 -1
  178. data/lib/rubocop/cop/style/missing_else.rb +2 -0
  179. data/lib/rubocop/cop/style/multiline_block_chain.rb +1 -1
  180. data/lib/rubocop/cop/style/multiple_comparison.rb +26 -20
  181. data/lib/rubocop/cop/style/mutable_constant.rb +3 -3
  182. data/lib/rubocop/cop/style/negated_if_else_condition.rb +1 -1
  183. data/lib/rubocop/cop/style/nested_parenthesized_calls.rb +1 -1
  184. data/lib/rubocop/cop/style/object_then.rb +13 -15
  185. data/lib/rubocop/cop/style/open_struct_use.rb +5 -5
  186. data/lib/rubocop/cop/style/parallel_assignment.rb +1 -5
  187. data/lib/rubocop/cop/style/parentheses_around_condition.rb +2 -2
  188. data/lib/rubocop/cop/style/percent_literal_delimiters.rb +1 -1
  189. data/lib/rubocop/cop/style/proc.rb +1 -2
  190. data/lib/rubocop/cop/style/quoted_symbols.rb +1 -1
  191. data/lib/rubocop/cop/style/raise_args.rb +6 -4
  192. data/lib/rubocop/cop/style/random_with_offset.rb +3 -3
  193. data/lib/rubocop/cop/style/redundant_begin.rb +1 -1
  194. data/lib/rubocop/cop/style/redundant_condition.rb +2 -2
  195. data/lib/rubocop/cop/style/redundant_current_directory_in_path.rb +2 -1
  196. data/lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb +6 -10
  197. data/lib/rubocop/cop/style/redundant_each.rb +1 -1
  198. data/lib/rubocop/cop/style/redundant_exception.rb +2 -2
  199. data/lib/rubocop/cop/style/redundant_freeze.rb +2 -2
  200. data/lib/rubocop/cop/style/redundant_initialize.rb +12 -3
  201. data/lib/rubocop/cop/style/redundant_line_continuation.rb +34 -13
  202. data/lib/rubocop/cop/style/redundant_parentheses.rb +10 -10
  203. data/lib/rubocop/cop/style/redundant_regexp_argument.rb +3 -0
  204. data/lib/rubocop/cop/style/redundant_regexp_character_class.rb +1 -1
  205. data/lib/rubocop/cop/style/redundant_regexp_escape.rb +1 -1
  206. data/lib/rubocop/cop/style/redundant_self_assignment.rb +14 -28
  207. data/lib/rubocop/cop/style/redundant_sort.rb +2 -2
  208. data/lib/rubocop/cop/style/redundant_string_escape.rb +2 -2
  209. data/lib/rubocop/cop/style/return_nil.rb +1 -1
  210. data/lib/rubocop/cop/style/safe_navigation.rb +2 -2
  211. data/lib/rubocop/cop/style/semicolon.rb +1 -1
  212. data/lib/rubocop/cop/style/send_with_literal_method_name.rb +2 -1
  213. data/lib/rubocop/cop/style/single_line_block_params.rb +1 -1
  214. data/lib/rubocop/cop/style/single_line_do_end_block.rb +1 -2
  215. data/lib/rubocop/cop/style/single_line_methods.rb +3 -4
  216. data/lib/rubocop/cop/style/slicing_with_range.rb +40 -11
  217. data/lib/rubocop/cop/style/sole_nested_conditional.rb +2 -2
  218. data/lib/rubocop/cop/style/string_concatenation.rb +1 -1
  219. data/lib/rubocop/cop/style/string_literals.rb +1 -1
  220. data/lib/rubocop/cop/style/string_methods.rb +1 -1
  221. data/lib/rubocop/cop/style/super_arguments.rb +65 -17
  222. data/lib/rubocop/cop/style/ternary_parentheses.rb +1 -1
  223. data/lib/rubocop/cop/style/top_level_method_definition.rb +1 -1
  224. data/lib/rubocop/cop/style/trailing_comma_in_arguments.rb +4 -1
  225. data/lib/rubocop/cop/style/while_until_modifier.rb +0 -1
  226. data/lib/rubocop/cop/style/yoda_condition.rb +8 -4
  227. data/lib/rubocop/cop/style/yoda_expression.rb +2 -1
  228. data/lib/rubocop/cop/util.rb +11 -4
  229. data/lib/rubocop/cop/variable_force/variable.rb +14 -2
  230. data/lib/rubocop/cop/variable_force/variable_table.rb +3 -3
  231. data/lib/rubocop/cops_documentation_generator.rb +13 -13
  232. data/lib/rubocop/directive_comment.rb +9 -8
  233. data/lib/rubocop/formatter/formatter_set.rb +1 -1
  234. data/lib/rubocop/lsp/diagnostic.rb +189 -0
  235. data/lib/rubocop/lsp/logger.rb +2 -2
  236. data/lib/rubocop/lsp/routes.rb +7 -23
  237. data/lib/rubocop/lsp/runtime.rb +15 -49
  238. data/lib/rubocop/lsp/stdin_runner.rb +83 -0
  239. data/lib/rubocop/options.rb +2 -1
  240. data/lib/rubocop/path_util.rb +11 -8
  241. data/lib/rubocop/result_cache.rb +13 -13
  242. data/lib/rubocop/rspec/expect_offense.rb +6 -2
  243. data/lib/rubocop/rspec/shared_contexts.rb +4 -1
  244. data/lib/rubocop/rspec/support.rb +1 -2
  245. data/lib/rubocop/runner.rb +5 -6
  246. data/lib/rubocop/target_finder.rb +1 -0
  247. data/lib/rubocop/target_ruby.rb +15 -0
  248. data/lib/rubocop/version.rb +1 -1
  249. data/lib/rubocop.rb +6 -0
  250. data/lib/ruby_lsp/rubocop/addon.rb +78 -0
  251. data/lib/ruby_lsp/rubocop/wraps_built_in_lsp_runtime.rb +50 -0
  252. metadata +23 -11
  253. data/lib/rubocop/rspec/host_environment_simulation_helper.rb +0 -28
metadata CHANGED
@@ -1,16 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.69.2
4
+ version: 1.71.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
8
8
  - Jonas Arvidsson
9
9
  - Yuji Nakayama
10
- autorequire:
11
10
  bindir: exe
12
11
  cert_chain: []
13
- date: 2024-12-12 00:00:00.000000000 Z
12
+ date: 2025-02-04 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: json
@@ -114,7 +113,7 @@ dependencies:
114
113
  requirements:
115
114
  - - ">="
116
115
  - !ruby/object:Gem::Version
117
- version: 1.36.2
116
+ version: 1.38.0
118
117
  - - "<"
119
118
  - !ruby/object:Gem::Version
120
119
  version: '2.0'
@@ -124,7 +123,7 @@ dependencies:
124
123
  requirements:
125
124
  - - ">="
126
125
  - !ruby/object:Gem::Version
127
- version: 1.36.2
126
+ version: 1.38.0
128
127
  - - "<"
129
128
  - !ruby/object:Gem::Version
130
129
  version: '2.0'
@@ -266,6 +265,7 @@ files:
266
265
  - lib/rubocop/cop/ignored_node.rb
267
266
  - lib/rubocop/cop/internal_affairs.rb
268
267
  - lib/rubocop/cop/internal_affairs/cop_description.rb
268
+ - lib/rubocop/cop/internal_affairs/cop_enabled.rb
269
269
  - lib/rubocop/cop/internal_affairs/create_empty_file.rb
270
270
  - lib/rubocop/cop/internal_affairs/empty_line_between_expect_offense_and_correction.rb
271
271
  - lib/rubocop/cop/internal_affairs/example_description.rb
@@ -279,9 +279,14 @@ files:
279
279
  - lib/rubocop/cop/internal_affairs/node_destructuring.rb
280
280
  - lib/rubocop/cop/internal_affairs/node_first_or_last_argument.rb
281
281
  - lib/rubocop/cop/internal_affairs/node_matcher_directive.rb
282
+ - lib/rubocop/cop/internal_affairs/node_pattern_groups.rb
283
+ - lib/rubocop/cop/internal_affairs/node_pattern_groups/ast_processor.rb
284
+ - lib/rubocop/cop/internal_affairs/node_pattern_groups/ast_walker.rb
285
+ - lib/rubocop/cop/internal_affairs/node_type_multiple_predicates.rb
282
286
  - lib/rubocop/cop/internal_affairs/node_type_predicate.rb
283
287
  - lib/rubocop/cop/internal_affairs/numblock_handler.rb
284
288
  - lib/rubocop/cop/internal_affairs/offense_location_keyword.rb
289
+ - lib/rubocop/cop/internal_affairs/on_send_without_on_csend.rb
285
290
  - lib/rubocop/cop/internal_affairs/operator_keyword.rb
286
291
  - lib/rubocop/cop/internal_affairs/processed_source_buffer_name.rb
287
292
  - lib/rubocop/cop/internal_affairs/redundant_context_config_parameter.rb
@@ -404,6 +409,7 @@ files:
404
409
  - lib/rubocop/cop/lint/ambiguous_operator_precedence.rb
405
410
  - lib/rubocop/cop/lint/ambiguous_range.rb
406
411
  - lib/rubocop/cop/lint/ambiguous_regexp_literal.rb
412
+ - lib/rubocop/cop/lint/array_literal_in_regexp.rb
407
413
  - lib/rubocop/cop/lint/assignment_in_condition.rb
408
414
  - lib/rubocop/cop/lint/big_decimal_new.rb
409
415
  - lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb
@@ -411,6 +417,7 @@ files:
411
417
  - lib/rubocop/cop/lint/circular_argument_reference.rb
412
418
  - lib/rubocop/cop/lint/constant_definition_in_block.rb
413
419
  - lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb
420
+ - lib/rubocop/cop/lint/constant_reassignment.rb
414
421
  - lib/rubocop/cop/lint/constant_resolution.rb
415
422
  - lib/rubocop/cop/lint/debugger.rb
416
423
  - lib/rubocop/cop/lint/deprecated_class_methods.rb
@@ -510,6 +517,7 @@ files:
510
517
  - lib/rubocop/cop/lint/shadowed_argument.rb
511
518
  - lib/rubocop/cop/lint/shadowed_exception.rb
512
519
  - lib/rubocop/cop/lint/shadowing_outer_local_variable.rb
520
+ - lib/rubocop/cop/lint/shared_mutable_default.rb
513
521
  - lib/rubocop/cop/lint/struct_new_override.rb
514
522
  - lib/rubocop/cop/lint/suppressed_exception.rb
515
523
  - lib/rubocop/cop/lint/symbol_conversion.rb
@@ -592,6 +600,7 @@ files:
592
600
  - lib/rubocop/cop/mixin/gemspec_help.rb
593
601
  - lib/rubocop/cop/mixin/hash_alignment_styles.rb
594
602
  - lib/rubocop/cop/mixin/hash_shorthand_syntax.rb
603
+ - lib/rubocop/cop/mixin/hash_subset.rb
595
604
  - lib/rubocop/cop/mixin/hash_transform_method.rb
596
605
  - lib/rubocop/cop/mixin/heredoc.rb
597
606
  - lib/rubocop/cop/mixin/integer_node.rb
@@ -754,6 +763,7 @@ files:
754
763
  - lib/rubocop/cop/style/hash_each_methods.rb
755
764
  - lib/rubocop/cop/style/hash_except.rb
756
765
  - lib/rubocop/cop/style/hash_like_case.rb
766
+ - lib/rubocop/cop/style/hash_slice.rb
757
767
  - lib/rubocop/cop/style/hash_syntax.rb
758
768
  - lib/rubocop/cop/style/hash_transform_keys.rb
759
769
  - lib/rubocop/cop/style/hash_transform_values.rb
@@ -770,6 +780,7 @@ files:
770
780
  - lib/rubocop/cop/style/inverse_methods.rb
771
781
  - lib/rubocop/cop/style/invertible_unless_condition.rb
772
782
  - lib/rubocop/cop/style/ip_addresses.rb
783
+ - lib/rubocop/cop/style/it_assignment.rb
773
784
  - lib/rubocop/cop/style/keyword_arguments_merging.rb
774
785
  - lib/rubocop/cop/style/keyword_parameters_order.rb
775
786
  - lib/rubocop/cop/style/lambda.rb
@@ -985,11 +996,13 @@ files:
985
996
  - lib/rubocop/formatter/worst_offenders_formatter.rb
986
997
  - lib/rubocop/lockfile.rb
987
998
  - lib/rubocop/lsp.rb
999
+ - lib/rubocop/lsp/diagnostic.rb
988
1000
  - lib/rubocop/lsp/logger.rb
989
1001
  - lib/rubocop/lsp/routes.rb
990
1002
  - lib/rubocop/lsp/runtime.rb
991
1003
  - lib/rubocop/lsp/server.rb
992
1004
  - lib/rubocop/lsp/severity.rb
1005
+ - lib/rubocop/lsp/stdin_runner.rb
993
1006
  - lib/rubocop/magic_comment.rb
994
1007
  - lib/rubocop/name_similarity.rb
995
1008
  - lib/rubocop/options.rb
@@ -1000,7 +1013,6 @@ files:
1000
1013
  - lib/rubocop/result_cache.rb
1001
1014
  - lib/rubocop/rspec/cop_helper.rb
1002
1015
  - lib/rubocop/rspec/expect_offense.rb
1003
- - lib/rubocop/rspec/host_environment_simulation_helper.rb
1004
1016
  - lib/rubocop/rspec/parallel_formatter.rb
1005
1017
  - lib/rubocop/rspec/shared_contexts.rb
1006
1018
  - lib/rubocop/rspec/support.rb
@@ -1030,17 +1042,18 @@ files:
1030
1042
  - lib/rubocop/version.rb
1031
1043
  - lib/rubocop/warning.rb
1032
1044
  - lib/rubocop/yaml_duplication_checker.rb
1045
+ - lib/ruby_lsp/rubocop/addon.rb
1046
+ - lib/ruby_lsp/rubocop/wraps_built_in_lsp_runtime.rb
1033
1047
  homepage: https://github.com/rubocop/rubocop
1034
1048
  licenses:
1035
1049
  - MIT
1036
1050
  metadata:
1037
1051
  homepage_uri: https://rubocop.org/
1038
- changelog_uri: https://github.com/rubocop/rubocop/releases/tag/v1.69.2
1052
+ changelog_uri: https://github.com/rubocop/rubocop/releases/tag/v1.71.2
1039
1053
  source_code_uri: https://github.com/rubocop/rubocop/
1040
- documentation_uri: https://docs.rubocop.org/rubocop/1.69/
1054
+ documentation_uri: https://docs.rubocop.org/rubocop/1.71/
1041
1055
  bug_tracker_uri: https://github.com/rubocop/rubocop/issues
1042
1056
  rubygems_mfa_required: 'true'
1043
- post_install_message:
1044
1057
  rdoc_options: []
1045
1058
  require_paths:
1046
1059
  - lib
@@ -1055,8 +1068,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1055
1068
  - !ruby/object:Gem::Version
1056
1069
  version: '0'
1057
1070
  requirements: []
1058
- rubygems_version: 3.4.22
1059
- signing_key:
1071
+ rubygems_version: 3.6.2
1060
1072
  specification_version: 4
1061
1073
  summary: Automatic Ruby code style checking tool.
1062
1074
  test_files: []
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # RuboCop can be run in contexts where unexpected other libraries are included,
4
- # which may interfere with its normal behavior. In order to test those
5
- # situations, it may be necessary to require another library for the duration
6
- # of one spec
7
- module HostEnvironmentSimulatorHelper
8
- def in_its_own_process_with(*files)
9
- if ::Process.respond_to?(:fork)
10
- pid = ::Process.fork do
11
- # Need to write coverage result under different name
12
- if defined?(SimpleCov)
13
- SimpleCov.command_name "rspec-fork-#{Process.pid}"
14
- SimpleCov.pid = Process.pid
15
- end
16
-
17
- files.each { |file| require file }
18
- yield
19
- end
20
- ::Process.wait(pid)
21
-
22
- # assert that the block did not fail
23
- expect($CHILD_STATUS).to be_success
24
- else
25
- warn 'Process.fork is not available.'
26
- end
27
- end
28
- end