rubocop 1.80.2 → 1.86.1

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 (310) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +2 -2
  4. data/config/default.yml +170 -19
  5. data/config/obsoletion.yml +9 -0
  6. data/lib/rubocop/cache_config.rb +29 -0
  7. data/lib/rubocop/cli/command/auto_generate_config.rb +3 -3
  8. data/lib/rubocop/cli/command/lsp.rb +1 -1
  9. data/lib/rubocop/cli/command/mcp.rb +19 -0
  10. data/lib/rubocop/cli/command/show_cops.rb +2 -2
  11. data/lib/rubocop/cli/command/show_docs_url.rb +1 -1
  12. data/lib/rubocop/cli.rb +28 -6
  13. data/lib/rubocop/comment_config.rb +62 -17
  14. data/lib/rubocop/config.rb +14 -10
  15. data/lib/rubocop/config_finder.rb +1 -1
  16. data/lib/rubocop/config_loader.rb +20 -21
  17. data/lib/rubocop/config_loader_resolver.rb +9 -7
  18. data/lib/rubocop/config_obsoletion/extracted_cop.rb +4 -2
  19. data/lib/rubocop/config_store.rb +6 -1
  20. data/lib/rubocop/config_validator.rb +1 -1
  21. data/lib/rubocop/cop/autocorrect_logic.rb +8 -4
  22. data/lib/rubocop/cop/bundler/gem_version.rb +28 -28
  23. data/lib/rubocop/cop/bundler/ordered_gems.rb +1 -2
  24. data/lib/rubocop/cop/correctors/alignment_corrector.rb +22 -6
  25. data/lib/rubocop/cop/correctors/condition_corrector.rb +1 -1
  26. data/lib/rubocop/cop/correctors/percent_literal_corrector.rb +2 -2
  27. data/lib/rubocop/cop/documentation.rb +2 -3
  28. data/lib/rubocop/cop/gemspec/ordered_dependencies.rb +1 -2
  29. data/lib/rubocop/cop/gemspec/require_mfa.rb +1 -1
  30. data/lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb +10 -5
  31. data/lib/rubocop/cop/internal_affairs/example_heredoc_delimiter.rb +8 -8
  32. data/lib/rubocop/cop/internal_affairs/itblock_handler.rb +69 -0
  33. data/lib/rubocop/cop/internal_affairs/location_exists.rb +28 -2
  34. data/lib/rubocop/cop/internal_affairs/node_matcher_directive.rb +9 -9
  35. data/lib/rubocop/cop/internal_affairs/node_pattern_groups/ast_processor.rb +1 -1
  36. data/lib/rubocop/cop/internal_affairs/node_pattern_groups.rb +3 -1
  37. data/lib/rubocop/cop/internal_affairs/on_send_without_on_csend.rb +1 -1
  38. data/lib/rubocop/cop/internal_affairs/useless_message_assertion.rb +4 -4
  39. data/lib/rubocop/cop/internal_affairs.rb +1 -0
  40. data/lib/rubocop/cop/layout/argument_alignment.rb +2 -2
  41. data/lib/rubocop/cop/layout/array_alignment.rb +1 -1
  42. data/lib/rubocop/cop/layout/case_indentation.rb +3 -1
  43. data/lib/rubocop/cop/layout/class_structure.rb +13 -6
  44. data/lib/rubocop/cop/layout/dot_position.rb +2 -2
  45. data/lib/rubocop/cop/layout/empty_line_after_guard_clause.rb +12 -2
  46. data/lib/rubocop/cop/layout/empty_line_between_defs.rb +31 -13
  47. data/lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb +1 -1
  48. data/lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb +1 -0
  49. data/lib/rubocop/cop/layout/empty_lines_around_block_body.rb +12 -2
  50. data/lib/rubocop/cop/layout/empty_lines_around_class_body.rb +16 -2
  51. data/lib/rubocop/cop/layout/empty_lines_around_module_body.rb +16 -2
  52. data/lib/rubocop/cop/layout/end_alignment.rb +8 -1
  53. data/lib/rubocop/cop/layout/first_argument_indentation.rb +34 -1
  54. data/lib/rubocop/cop/layout/first_array_element_line_break.rb +26 -0
  55. data/lib/rubocop/cop/layout/first_hash_element_indentation.rb +7 -1
  56. data/lib/rubocop/cop/layout/first_hash_element_line_break.rb +25 -25
  57. data/lib/rubocop/cop/layout/hash_alignment.rb +3 -6
  58. data/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +2 -2
  59. data/lib/rubocop/cop/layout/heredoc_indentation.rb +33 -3
  60. data/lib/rubocop/cop/layout/indentation_style.rb +1 -1
  61. data/lib/rubocop/cop/layout/indentation_width.rb +111 -7
  62. data/lib/rubocop/cop/layout/line_continuation_spacing.rb +1 -1
  63. data/lib/rubocop/cop/layout/line_length.rb +26 -9
  64. data/lib/rubocop/cop/layout/multiline_array_brace_layout.rb +57 -57
  65. data/lib/rubocop/cop/layout/multiline_assignment_layout.rb +9 -2
  66. data/lib/rubocop/cop/layout/multiline_block_layout.rb +2 -0
  67. data/lib/rubocop/cop/layout/multiline_hash_brace_layout.rb +56 -56
  68. data/lib/rubocop/cop/layout/multiline_method_call_indentation.rb +204 -39
  69. data/lib/rubocop/cop/layout/multiline_operation_indentation.rb +6 -4
  70. data/lib/rubocop/cop/layout/parameter_alignment.rb +1 -1
  71. data/lib/rubocop/cop/layout/redundant_line_break.rb +1 -1
  72. data/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +13 -3
  73. data/lib/rubocop/cop/layout/space_after_comma.rb +2 -10
  74. data/lib/rubocop/cop/layout/space_after_semicolon.rb +1 -1
  75. data/lib/rubocop/cop/layout/space_around_block_parameters.rb +1 -1
  76. data/lib/rubocop/cop/layout/space_around_keyword.rb +4 -2
  77. data/lib/rubocop/cop/layout/space_in_lambda_literal.rb +9 -8
  78. data/lib/rubocop/cop/layout/trailing_whitespace.rb +1 -1
  79. data/lib/rubocop/cop/lint/circular_argument_reference.rb +47 -3
  80. data/lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb +3 -2
  81. data/lib/rubocop/cop/lint/constant_reassignment.rb +59 -9
  82. data/lib/rubocop/cop/lint/constant_resolution.rb +1 -1
  83. data/lib/rubocop/cop/lint/cop_directive_syntax.rb +14 -8
  84. data/lib/rubocop/cop/lint/data_define_override.rb +63 -0
  85. data/lib/rubocop/cop/lint/debugger.rb +0 -2
  86. data/lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb +4 -1
  87. data/lib/rubocop/cop/lint/duplicate_match_pattern.rb +4 -4
  88. data/lib/rubocop/cop/lint/duplicate_methods.rb +111 -12
  89. data/lib/rubocop/cop/lint/else_layout.rb +19 -0
  90. data/lib/rubocop/cop/lint/empty_block.rb +1 -1
  91. data/lib/rubocop/cop/lint/empty_conditional_body.rb +6 -1
  92. data/lib/rubocop/cop/lint/empty_in_pattern.rb +8 -1
  93. data/lib/rubocop/cop/lint/empty_interpolation.rb +11 -0
  94. data/lib/rubocop/cop/lint/empty_when.rb +8 -1
  95. data/lib/rubocop/cop/lint/float_comparison.rb +1 -1
  96. data/lib/rubocop/cop/lint/interpolation_check.rb +7 -2
  97. data/lib/rubocop/cop/lint/literal_as_condition.rb +5 -1
  98. data/lib/rubocop/cop/lint/literal_in_interpolation.rb +1 -1
  99. data/lib/rubocop/cop/lint/missing_cop_enable_directive.rb +16 -6
  100. data/lib/rubocop/cop/lint/next_without_accumulator.rb +2 -0
  101. data/lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb +4 -0
  102. data/lib/rubocop/cop/lint/non_deterministic_require_order.rb +3 -1
  103. data/lib/rubocop/cop/lint/number_conversion.rb +1 -1
  104. data/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb +23 -9
  105. data/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb +0 -9
  106. data/lib/rubocop/cop/lint/redundant_require_statement.rb +4 -2
  107. data/lib/rubocop/cop/lint/redundant_safe_navigation.rb +23 -6
  108. data/lib/rubocop/cop/lint/redundant_splat_expansion.rb +8 -2
  109. data/lib/rubocop/cop/lint/rescue_exception.rb +1 -4
  110. data/lib/rubocop/cop/lint/safe_navigation_chain.rb +17 -0
  111. data/lib/rubocop/cop/lint/safe_navigation_consistency.rb +7 -1
  112. data/lib/rubocop/cop/lint/self_assignment.rb +10 -2
  113. data/lib/rubocop/cop/lint/shadowed_argument.rb +7 -7
  114. data/lib/rubocop/cop/lint/struct_new_override.rb +17 -1
  115. data/lib/rubocop/cop/lint/syntax.rb +25 -1
  116. data/lib/rubocop/cop/lint/to_json.rb +12 -16
  117. data/lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb +1 -0
  118. data/lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb +1 -0
  119. data/lib/rubocop/cop/lint/unreachable_code.rb +5 -3
  120. data/lib/rubocop/cop/lint/unreachable_pattern_branch.rb +113 -0
  121. data/lib/rubocop/cop/lint/unused_method_argument.rb +10 -0
  122. data/lib/rubocop/cop/lint/useless_assignment.rb +45 -17
  123. data/lib/rubocop/cop/lint/useless_constant_scoping.rb +4 -4
  124. data/lib/rubocop/cop/lint/useless_default_value_argument.rb +2 -0
  125. data/lib/rubocop/cop/lint/useless_or.rb +15 -2
  126. data/lib/rubocop/cop/lint/utils/nil_receiver_checker.rb +24 -9
  127. data/lib/rubocop/cop/lint/void.rb +39 -12
  128. data/lib/rubocop/cop/message_annotator.rb +1 -1
  129. data/lib/rubocop/cop/metrics/block_nesting.rb +23 -0
  130. data/lib/rubocop/cop/metrics/utils/abc_size_calculator.rb +4 -3
  131. data/lib/rubocop/cop/migration/department_name.rb +12 -1
  132. data/lib/rubocop/cop/mixin/check_line_breakable.rb +2 -2
  133. data/lib/rubocop/cop/mixin/check_single_line_suitability.rb +4 -6
  134. data/lib/rubocop/cop/mixin/code_length.rb +1 -1
  135. data/lib/rubocop/cop/mixin/hash_shorthand_syntax.rb +5 -5
  136. data/lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb +63 -0
  137. data/lib/rubocop/cop/mixin/hash_transform_method.rb +10 -60
  138. data/lib/rubocop/cop/mixin/line_length_help.rb +21 -2
  139. data/lib/rubocop/cop/mixin/method_complexity.rb +1 -1
  140. data/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +1 -1
  141. data/lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb +1 -1
  142. data/lib/rubocop/cop/mixin/space_after_punctuation.rb +5 -4
  143. data/lib/rubocop/cop/mixin/statement_modifier.rb +0 -6
  144. data/lib/rubocop/cop/mixin/trailing_comma.rb +8 -5
  145. data/lib/rubocop/cop/naming/block_parameter_name.rb +1 -1
  146. data/lib/rubocop/cop/naming/method_name.rb +4 -2
  147. data/lib/rubocop/cop/naming/predicate_method.rb +27 -4
  148. data/lib/rubocop/cop/naming/predicate_prefix.rb +11 -11
  149. data/lib/rubocop/cop/offense.rb +9 -1
  150. data/lib/rubocop/cop/registry.rb +20 -13
  151. data/lib/rubocop/cop/security/eval.rb +15 -2
  152. data/lib/rubocop/cop/security/json_load.rb +33 -11
  153. data/lib/rubocop/cop/style/access_modifier_declarations.rb +15 -4
  154. data/lib/rubocop/cop/style/accessor_grouping.rb +4 -2
  155. data/lib/rubocop/cop/style/alias.rb +4 -1
  156. data/lib/rubocop/cop/style/and_or.rb +1 -0
  157. data/lib/rubocop/cop/style/arguments_forwarding.rb +25 -7
  158. data/lib/rubocop/cop/style/array_intersect.rb +2 -2
  159. data/lib/rubocop/cop/style/array_intersect_with_single_element.rb +47 -0
  160. data/lib/rubocop/cop/style/array_join.rb +4 -2
  161. data/lib/rubocop/cop/style/ascii_comments.rb +6 -3
  162. data/lib/rubocop/cop/style/attr.rb +5 -2
  163. data/lib/rubocop/cop/style/bare_percent_literals.rb +4 -3
  164. data/lib/rubocop/cop/style/begin_block.rb +3 -1
  165. data/lib/rubocop/cop/style/block_delimiters.rb +27 -34
  166. data/lib/rubocop/cop/style/case_equality.rb +15 -13
  167. data/lib/rubocop/cop/style/class_and_module_children.rb +11 -2
  168. data/lib/rubocop/cop/style/collection_compact.rb +36 -16
  169. data/lib/rubocop/cop/style/colon_method_call.rb +3 -1
  170. data/lib/rubocop/cop/style/concat_array_literals.rb +2 -0
  171. data/lib/rubocop/cop/style/conditional_assignment.rb +8 -18
  172. data/lib/rubocop/cop/style/constant_visibility.rb +17 -12
  173. data/lib/rubocop/cop/style/copyright.rb +1 -1
  174. data/lib/rubocop/cop/style/documentation.rb +6 -6
  175. data/lib/rubocop/cop/style/documentation_method.rb +8 -8
  176. data/lib/rubocop/cop/style/double_negation.rb +1 -1
  177. data/lib/rubocop/cop/style/each_for_simple_loop.rb +1 -1
  178. data/lib/rubocop/cop/style/each_with_object.rb +2 -0
  179. data/lib/rubocop/cop/style/empty_block_parameter.rb +1 -1
  180. data/lib/rubocop/cop/style/empty_class_definition.rb +119 -0
  181. data/lib/rubocop/cop/style/empty_lambda_parameter.rb +1 -1
  182. data/lib/rubocop/cop/style/empty_method.rb +0 -6
  183. data/lib/rubocop/cop/style/encoding.rb +7 -1
  184. data/lib/rubocop/cop/style/end_block.rb +3 -1
  185. data/lib/rubocop/cop/style/endless_method.rb +23 -5
  186. data/lib/rubocop/cop/style/explicit_block_argument.rb +1 -1
  187. data/lib/rubocop/cop/style/file_open.rb +84 -0
  188. data/lib/rubocop/cop/style/float_division.rb +15 -1
  189. data/lib/rubocop/cop/style/for.rb +3 -0
  190. data/lib/rubocop/cop/style/format_string_token.rb +49 -5
  191. data/lib/rubocop/cop/style/global_vars.rb +5 -2
  192. data/lib/rubocop/cop/style/guard_clause.rb +27 -22
  193. data/lib/rubocop/cop/style/hash_as_last_array_item.rb +27 -9
  194. data/lib/rubocop/cop/style/hash_lookup_method.rb +101 -0
  195. data/lib/rubocop/cop/style/hash_syntax.rb +1 -1
  196. data/lib/rubocop/cop/style/hash_transform_keys.rb +17 -7
  197. data/lib/rubocop/cop/style/hash_transform_values.rb +17 -7
  198. data/lib/rubocop/cop/style/if_inside_else.rb +1 -5
  199. data/lib/rubocop/cop/style/if_unless_modifier.rb +57 -17
  200. data/lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb +12 -12
  201. data/lib/rubocop/cop/style/if_with_boolean_literal_branches.rb +4 -1
  202. data/lib/rubocop/cop/style/if_with_semicolon.rb +7 -5
  203. data/lib/rubocop/cop/style/inline_comment.rb +4 -1
  204. data/lib/rubocop/cop/style/ip_addresses.rb +1 -2
  205. data/lib/rubocop/cop/style/lambda_call.rb +8 -8
  206. data/lib/rubocop/cop/style/magic_comment_format.rb +2 -2
  207. data/lib/rubocop/cop/style/map_join.rb +123 -0
  208. data/lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb +15 -2
  209. data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +17 -4
  210. data/lib/rubocop/cop/style/method_def_parentheses.rb +2 -4
  211. data/lib/rubocop/cop/style/module_member_existence_check.rb +107 -0
  212. data/lib/rubocop/cop/style/multiline_if_then.rb +4 -4
  213. data/lib/rubocop/cop/style/multiline_method_signature.rb +2 -4
  214. data/lib/rubocop/cop/style/mutable_constant.rb +1 -1
  215. data/lib/rubocop/cop/style/negative_array_index.rb +220 -0
  216. data/lib/rubocop/cop/style/nil_comparison.rb +11 -10
  217. data/lib/rubocop/cop/style/nil_lambda.rb +1 -1
  218. data/lib/rubocop/cop/style/non_nil_check.rb +5 -11
  219. data/lib/rubocop/cop/style/not.rb +2 -0
  220. data/lib/rubocop/cop/style/numeric_literals.rb +3 -2
  221. data/lib/rubocop/cop/style/one_class_per_file.rb +115 -0
  222. data/lib/rubocop/cop/style/one_line_conditional.rb +21 -12
  223. data/lib/rubocop/cop/style/operator_method_call.rb +11 -2
  224. data/lib/rubocop/cop/style/parallel_assignment.rb +6 -2
  225. data/lib/rubocop/cop/style/partition_instead_of_double_select.rb +270 -0
  226. data/lib/rubocop/cop/style/percent_literal_delimiters.rb +2 -0
  227. data/lib/rubocop/cop/style/predicate_with_kind.rb +84 -0
  228. data/lib/rubocop/cop/style/preferred_hash_methods.rb +12 -12
  229. data/lib/rubocop/cop/style/proc.rb +3 -2
  230. data/lib/rubocop/cop/style/raise_args.rb +1 -1
  231. data/lib/rubocop/cop/style/reduce_to_hash.rb +184 -0
  232. data/lib/rubocop/cop/style/redundant_argument.rb +2 -0
  233. data/lib/rubocop/cop/style/redundant_begin.rb +3 -3
  234. data/lib/rubocop/cop/style/redundant_condition.rb +5 -2
  235. data/lib/rubocop/cop/style/redundant_each.rb +3 -3
  236. data/lib/rubocop/cop/style/redundant_exception.rb +1 -1
  237. data/lib/rubocop/cop/style/redundant_fetch_block.rb +1 -1
  238. data/lib/rubocop/cop/style/redundant_format.rb +26 -5
  239. data/lib/rubocop/cop/style/redundant_interpolation.rb +11 -2
  240. data/lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb +26 -10
  241. data/lib/rubocop/cop/style/redundant_line_continuation.rb +16 -0
  242. data/lib/rubocop/cop/style/redundant_min_max_by.rb +93 -0
  243. data/lib/rubocop/cop/style/redundant_parentheses.rb +26 -22
  244. data/lib/rubocop/cop/style/redundant_percent_q.rb +5 -3
  245. data/lib/rubocop/cop/style/redundant_regexp_argument.rb +9 -0
  246. data/lib/rubocop/cop/style/redundant_regexp_escape.rb +8 -0
  247. data/lib/rubocop/cop/style/redundant_return.rb +3 -1
  248. data/lib/rubocop/cop/style/redundant_self_assignment_branch.rb +0 -5
  249. data/lib/rubocop/cop/style/redundant_sort.rb +7 -7
  250. data/lib/rubocop/cop/style/redundant_struct_keyword_init.rb +114 -0
  251. data/lib/rubocop/cop/style/reverse_find.rb +51 -0
  252. data/lib/rubocop/cop/style/safe_navigation.rb +7 -7
  253. data/lib/rubocop/cop/style/select_by_kind.rb +158 -0
  254. data/lib/rubocop/cop/style/select_by_range.rb +197 -0
  255. data/lib/rubocop/cop/style/select_by_regexp.rb +51 -21
  256. data/lib/rubocop/cop/style/semicolon.rb +25 -7
  257. data/lib/rubocop/cop/style/single_line_block_params.rb +2 -2
  258. data/lib/rubocop/cop/style/single_line_do_end_block.rb +1 -1
  259. data/lib/rubocop/cop/style/single_line_methods.rb +3 -1
  260. data/lib/rubocop/cop/style/sole_nested_conditional.rb +8 -1
  261. data/lib/rubocop/cop/style/special_global_vars.rb +6 -1
  262. data/lib/rubocop/cop/style/super_arguments.rb +2 -2
  263. data/lib/rubocop/cop/style/symbol_proc.rb +4 -3
  264. data/lib/rubocop/cop/style/tally_method.rb +181 -0
  265. data/lib/rubocop/cop/style/trailing_comma_in_arguments.rb +45 -0
  266. data/lib/rubocop/cop/style/trailing_comma_in_block_args.rb +1 -1
  267. data/lib/rubocop/cop/style/trailing_method_end_statement.rb +1 -0
  268. data/lib/rubocop/cop/style/trailing_underscore_variable.rb +11 -11
  269. data/lib/rubocop/cop/style/unless_else.rb +10 -9
  270. data/lib/rubocop/cop/style/yoda_expression.rb +1 -1
  271. data/lib/rubocop/cop/team.rb +4 -4
  272. data/lib/rubocop/cop/util.rb +2 -3
  273. data/lib/rubocop/cop/utils/format_string.rb +10 -0
  274. data/lib/rubocop/cop/variable_force/branch.rb +30 -6
  275. data/lib/rubocop/cops_documentation_generator.rb +4 -4
  276. data/lib/rubocop/directive_comment.rb +48 -4
  277. data/lib/rubocop/formatter/clang_style_formatter.rb +5 -2
  278. data/lib/rubocop/formatter/disabled_config_formatter.rb +2 -1
  279. data/lib/rubocop/formatter/formatter_set.rb +2 -2
  280. data/lib/rubocop/formatter/junit_formatter.rb +1 -1
  281. data/lib/rubocop/formatter/simple_text_formatter.rb +0 -2
  282. data/lib/rubocop/formatter/tap_formatter.rb +5 -2
  283. data/lib/rubocop/formatter/worst_offenders_formatter.rb +1 -1
  284. data/lib/rubocop/formatter.rb +22 -21
  285. data/lib/rubocop/lsp/diagnostic.rb +18 -33
  286. data/lib/rubocop/lsp/disable_comment_edits.rb +135 -0
  287. data/lib/rubocop/lsp/routes.rb +12 -5
  288. data/lib/rubocop/lsp/runtime.rb +13 -3
  289. data/lib/rubocop/lsp/stdin_runner.rb +8 -17
  290. data/lib/rubocop/magic_comment.rb +20 -0
  291. data/lib/rubocop/mcp/server.rb +200 -0
  292. data/lib/rubocop/options.rb +10 -1
  293. data/lib/rubocop/path_util.rb +14 -2
  294. data/lib/rubocop/plugin/loader.rb +1 -1
  295. data/lib/rubocop/rake_task.rb +1 -1
  296. data/lib/rubocop/remote_config.rb +10 -8
  297. data/lib/rubocop/result_cache.rb +60 -37
  298. data/lib/rubocop/rspec/cop_helper.rb +8 -0
  299. data/lib/rubocop/rspec/shared_contexts.rb +18 -5
  300. data/lib/rubocop/rspec/support.rb +2 -1
  301. data/lib/rubocop/runner.rb +12 -3
  302. data/lib/rubocop/server/cache.rb +6 -29
  303. data/lib/rubocop/server/core.rb +2 -0
  304. data/lib/rubocop/target_finder.rb +1 -1
  305. data/lib/rubocop/target_ruby.rb +31 -14
  306. data/lib/rubocop/version.rb +2 -2
  307. data/lib/rubocop.rb +20 -0
  308. data/lib/ruby_lsp/rubocop/addon.rb +23 -8
  309. data/lib/ruby_lsp/rubocop/runtime_adapter.rb +49 -15
  310. metadata +33 -9
data/lib/rubocop.rb CHANGED
@@ -309,6 +309,7 @@ require_relative 'rubocop/cop/lint/constant_overwritten_in_rescue'
309
309
  require_relative 'rubocop/cop/lint/constant_reassignment'
310
310
  require_relative 'rubocop/cop/lint/constant_resolution'
311
311
  require_relative 'rubocop/cop/lint/cop_directive_syntax'
312
+ require_relative 'rubocop/cop/lint/data_define_override'
312
313
  require_relative 'rubocop/cop/lint/debugger'
313
314
  require_relative 'rubocop/cop/lint/deprecated_class_methods'
314
315
  require_relative 'rubocop/cop/lint/deprecated_constants'
@@ -426,6 +427,7 @@ require_relative 'rubocop/cop/lint/unified_integer'
426
427
  require_relative 'rubocop/cop/lint/unmodified_reduce_accumulator'
427
428
  require_relative 'rubocop/cop/lint/unreachable_code'
428
429
  require_relative 'rubocop/cop/lint/unreachable_loop'
430
+ require_relative 'rubocop/cop/lint/unreachable_pattern_branch'
429
431
  require_relative 'rubocop/cop/lint/unused_block_argument'
430
432
  require_relative 'rubocop/cop/lint/unused_method_argument'
431
433
  require_relative 'rubocop/cop/lint/uri_escape_unescape'
@@ -489,6 +491,7 @@ require_relative 'rubocop/cop/style/arguments_forwarding'
489
491
  require_relative 'rubocop/cop/style/array_coercion'
490
492
  require_relative 'rubocop/cop/style/array_first_last'
491
493
  require_relative 'rubocop/cop/style/array_intersect'
494
+ require_relative 'rubocop/cop/style/array_intersect_with_single_element'
492
495
  require_relative 'rubocop/cop/style/array_join'
493
496
  require_relative 'rubocop/cop/style/ascii_comments'
494
497
  require_relative 'rubocop/cop/style/attr'
@@ -540,6 +543,7 @@ require_relative 'rubocop/cop/style/each_for_simple_loop'
540
543
  require_relative 'rubocop/cop/style/each_with_object'
541
544
  require_relative 'rubocop/cop/style/empty_block_parameter'
542
545
  require_relative 'rubocop/cop/style/empty_case_condition'
546
+ require_relative 'rubocop/cop/style/empty_class_definition'
543
547
  require_relative 'rubocop/cop/style/empty_else'
544
548
  require_relative 'rubocop/cop/style/empty_heredoc'
545
549
  require_relative 'rubocop/cop/style/empty_lambda_parameter'
@@ -559,6 +563,7 @@ require_relative 'rubocop/cop/style/exponential_notation'
559
563
  require_relative 'rubocop/cop/style/fetch_env_var'
560
564
  require_relative 'rubocop/cop/style/file_empty'
561
565
  require_relative 'rubocop/cop/style/file_null'
566
+ require_relative 'rubocop/cop/style/file_open'
562
567
  require_relative 'rubocop/cop/style/file_read'
563
568
  require_relative 'rubocop/cop/style/file_touch'
564
569
  require_relative 'rubocop/cop/style/file_write'
@@ -576,6 +581,7 @@ require_relative 'rubocop/cop/style/hash_each_methods'
576
581
  require_relative 'rubocop/cop/style/hash_except'
577
582
  require_relative 'rubocop/cop/style/hash_fetch_chain'
578
583
  require_relative 'rubocop/cop/style/hash_like_case'
584
+ require_relative 'rubocop/cop/style/hash_lookup_method'
579
585
  require_relative 'rubocop/cop/style/hash_slice'
580
586
  require_relative 'rubocop/cop/style/hash_syntax'
581
587
  require_relative 'rubocop/cop/style/hash_transform_keys'
@@ -589,6 +595,7 @@ require_relative 'rubocop/cop/style/if_with_semicolon'
589
595
  require_relative 'rubocop/cop/style/implicit_runtime_error'
590
596
  require_relative 'rubocop/cop/style/in_pattern_then'
591
597
  require_relative 'rubocop/cop/style/infinite_loop'
598
+ require_relative 'rubocop/cop/style/reduce_to_hash'
592
599
  require_relative 'rubocop/cop/style/inverse_methods'
593
600
  require_relative 'rubocop/cop/style/inline_comment'
594
601
  require_relative 'rubocop/cop/style/invertible_unless_condition'
@@ -602,15 +609,19 @@ require_relative 'rubocop/cop/style/lambda_call'
602
609
  require_relative 'rubocop/cop/style/line_end_concatenation'
603
610
  require_relative 'rubocop/cop/style/magic_comment_format'
604
611
  require_relative 'rubocop/cop/style/map_into_array'
612
+ require_relative 'rubocop/cop/style/map_join'
605
613
  require_relative 'rubocop/cop/style/map_to_hash'
606
614
  require_relative 'rubocop/cop/style/map_to_set'
607
615
  require_relative 'rubocop/cop/style/method_call_without_args_parentheses'
608
616
  require_relative 'rubocop/cop/style/method_call_with_args_parentheses'
609
617
  require_relative 'rubocop/cop/style/min_max_comparison'
618
+ require_relative 'rubocop/cop/style/module_member_existence_check'
610
619
  require_relative 'rubocop/cop/style/multiline_in_pattern_then'
611
620
  require_relative 'rubocop/cop/style/numbered_parameters'
621
+ require_relative 'rubocop/cop/style/one_class_per_file'
612
622
  require_relative 'rubocop/cop/style/open_struct_use'
613
623
  require_relative 'rubocop/cop/style/operator_method_call'
624
+ require_relative 'rubocop/cop/style/partition_instead_of_double_select'
614
625
  require_relative 'rubocop/cop/style/redundant_array_constructor'
615
626
  require_relative 'rubocop/cop/style/redundant_array_flatten'
616
627
  require_relative 'rubocop/cop/style/redundant_assignment'
@@ -626,11 +637,14 @@ require_relative 'rubocop/cop/style/redundant_heredoc_delimiter_quotes'
626
637
  require_relative 'rubocop/cop/style/redundant_initialize'
627
638
  require_relative 'rubocop/cop/style/redundant_interpolation_unfreeze'
628
639
  require_relative 'rubocop/cop/style/redundant_line_continuation'
640
+ require_relative 'rubocop/cop/style/redundant_min_max_by'
629
641
  require_relative 'rubocop/cop/style/redundant_regexp_argument'
630
642
  require_relative 'rubocop/cop/style/redundant_regexp_constructor'
631
643
  require_relative 'rubocop/cop/style/redundant_self_assignment'
632
644
  require_relative 'rubocop/cop/style/redundant_self_assignment_branch'
645
+ require_relative 'rubocop/cop/style/redundant_struct_keyword_init'
633
646
  require_relative 'rubocop/cop/style/require_order'
647
+ require_relative 'rubocop/cop/style/reverse_find'
634
648
  require_relative 'rubocop/cop/style/safe_navigation_chain_length'
635
649
  require_relative 'rubocop/cop/style/single_line_do_end_block'
636
650
  require_relative 'rubocop/cop/style/sole_nested_conditional'
@@ -657,6 +671,7 @@ require_relative 'rubocop/cop/style/negated_if'
657
671
  require_relative 'rubocop/cop/style/negated_if_else_condition'
658
672
  require_relative 'rubocop/cop/style/negated_unless'
659
673
  require_relative 'rubocop/cop/style/negated_while'
674
+ require_relative 'rubocop/cop/style/negative_array_index'
660
675
  require_relative 'rubocop/cop/style/nested_file_dirname'
661
676
  require_relative 'rubocop/cop/style/nested_modifier'
662
677
  require_relative 'rubocop/cop/style/nested_parenthesized_calls'
@@ -681,6 +696,7 @@ require_relative 'rubocop/cop/style/parentheses_around_condition'
681
696
  require_relative 'rubocop/cop/style/percent_literal_delimiters'
682
697
  require_relative 'rubocop/cop/style/percent_q_literals'
683
698
  require_relative 'rubocop/cop/style/perl_backrefs'
699
+ require_relative 'rubocop/cop/style/predicate_with_kind'
684
700
  require_relative 'rubocop/cop/style/preferred_hash_methods'
685
701
  require_relative 'rubocop/cop/style/proc'
686
702
  require_relative 'rubocop/cop/style/quoted_symbols'
@@ -710,6 +726,8 @@ require_relative 'rubocop/cop/style/return_nil'
710
726
  require_relative 'rubocop/cop/style/return_nil_in_predicate_method_definition'
711
727
  require_relative 'rubocop/cop/style/safe_navigation'
712
728
  require_relative 'rubocop/cop/style/sample'
729
+ require_relative 'rubocop/cop/style/select_by_kind'
730
+ require_relative 'rubocop/cop/style/select_by_range'
713
731
  require_relative 'rubocop/cop/style/select_by_regexp'
714
732
  require_relative 'rubocop/cop/style/self_assignment'
715
733
  require_relative 'rubocop/cop/style/semicolon'
@@ -737,6 +755,7 @@ require_relative 'rubocop/cop/style/swap_values'
737
755
  require_relative 'rubocop/cop/style/symbol_array'
738
756
  require_relative 'rubocop/cop/style/symbol_literal'
739
757
  require_relative 'rubocop/cop/style/symbol_proc'
758
+ require_relative 'rubocop/cop/style/tally_method'
740
759
  require_relative 'rubocop/cop/style/ternary_parentheses'
741
760
  require_relative 'rubocop/cop/style/top_level_method_definition'
742
761
  require_relative 'rubocop/cop/style/trailing_body_on_class'
@@ -805,6 +824,7 @@ require_relative 'rubocop/cli/command/auto_generate_config'
805
824
  require_relative 'rubocop/cli/command/execute_runner'
806
825
  require_relative 'rubocop/cli/command/init_dotfile'
807
826
  require_relative 'rubocop/cli/command/lsp'
827
+ require_relative 'rubocop/cli/command/mcp'
808
828
  require_relative 'rubocop/cli/command/show_cops'
809
829
  require_relative 'rubocop/cli/command/show_docs_url'
810
830
  require_relative 'rubocop/cli/command/suggest_extensions'
@@ -8,7 +8,10 @@ module RubyLsp
8
8
  module RuboCop
9
9
  # A Ruby LSP add-on for RuboCop.
10
10
  class Addon < RubyLsp::Addon
11
- def initializer
11
+ RESTART_WATCHERS = %w[.rubocop.yml .rubocop_todo.yml .rubocop].freeze
12
+
13
+ def initialize
14
+ super
12
15
  @runtime_adapter = nil
13
16
  end
14
17
 
@@ -16,12 +19,16 @@ module RubyLsp
16
19
  'RuboCop'
17
20
  end
18
21
 
22
+ def version
23
+ ::RuboCop::Version::STRING
24
+ end
25
+
19
26
  def activate(global_state, message_queue)
20
27
  ::RuboCop::LSP::Logger.log(
21
28
  "Activating RuboCop LSP addon #{::RuboCop::Version::STRING}.", prefix: '[RuboCop]'
22
29
  )
23
30
 
24
- @runtime_adapter = RuntimeAdapter.new
31
+ @runtime_adapter = RuntimeAdapter.new(message_queue)
25
32
  global_state.register_formatter('rubocop', @runtime_adapter)
26
33
  register_additional_file_watchers(global_state, message_queue)
27
34
 
@@ -49,7 +56,7 @@ module RubyLsp
49
56
  register_options: Interface::DidChangeWatchedFilesRegistrationOptions.new(
50
57
  watchers: [
51
58
  Interface::FileSystemWatcher.new(
52
- glob_pattern: '**/.rubocop{,_todo}.yml',
59
+ glob_pattern: "**/{#{RESTART_WATCHERS.join(',')}}",
53
60
  kind: Constant::WatchKind::CREATE | Constant::WatchKind::CHANGE | Constant::WatchKind::DELETE
54
61
  )
55
62
  ]
@@ -62,13 +69,21 @@ module RubyLsp
62
69
  # rubocop:enable Metrics/MethodLength
63
70
 
64
71
  def workspace_did_change_watched_files(changes)
65
- return unless changes.any? { |change| change[:uri].end_with?('.rubocop.yml') }
72
+ if (changed_config_file = changed_config_file(changes))
73
+ @runtime_adapter.reload_config
74
+
75
+ ::RuboCop::LSP::Logger.log(<<~MESSAGE, prefix: '[RuboCop]')
76
+ Re-initialized RuboCop LSP addon #{::RuboCop::Version::STRING} due to #{changed_config_file} change.
77
+ MESSAGE
78
+ end
79
+ end
66
80
 
67
- @runtime_adapter = RuntimeAdapter.new
81
+ private
68
82
 
69
- ::RuboCop::LSP::Logger.log(<<~MESSAGE, prefix: '[RuboCop]')
70
- Re-initialized RuboCop LSP addon #{::RuboCop::Version::STRING} due to .rubocop.yml file change.
71
- MESSAGE
83
+ def changed_config_file(changes)
84
+ RESTART_WATCHERS.find do |file_name|
85
+ changes.any? { |change| change[:uri].end_with?(file_name) }
86
+ end
72
87
  end
73
88
  end
74
89
  end
@@ -7,30 +7,45 @@ module RubyLsp
7
7
  # Provides an adapter to bridge RuboCop's built-in LSP runtime with Ruby LSP's add-on.
8
8
  # @api private
9
9
  class RuntimeAdapter
10
- include RubyLsp::Requests::Support::Formatter
10
+ def initialize(message_queue)
11
+ @message_queue = message_queue
12
+ reload_config
13
+ end
11
14
 
12
- def initialize
13
- config_store = ::RuboCop::ConfigStore.new
15
+ def reload_config
16
+ @runtime = nil
17
+ options, _paths = ::RuboCop::Options.new.parse([])
14
18
 
19
+ config_store = ::RuboCop::ConfigStore.new
20
+ config_store.apply_options!(options)
15
21
  @runtime = ::RuboCop::LSP::Runtime.new(config_store)
22
+ rescue ::RuboCop::Error => e
23
+ @message_queue << Notification.window_show_message(
24
+ "RuboCop configuration error: #{e.message}. Formatting will not be available.",
25
+ type: Constant::MessageType::ERROR
26
+ )
16
27
  end
17
28
 
18
29
  def run_diagnostic(uri, document)
19
- @runtime.offenses(
20
- uri_to_path(uri),
21
- document.source,
22
- document.encoding,
23
- prism_result: prism_result(document)
24
- )
30
+ with_error_handling do
31
+ @runtime.offenses(
32
+ uri_to_path(uri),
33
+ document.source,
34
+ document.encoding,
35
+ prism_result: prism_result(document)
36
+ )
37
+ end
25
38
  end
26
39
 
27
40
  def run_formatting(uri, document)
28
- @runtime.format(
29
- uri_to_path(uri),
30
- document.source,
31
- command: 'rubocop.formatAutocorrects',
32
- prism_result: prism_result(document)
33
- )
41
+ with_error_handling do
42
+ @runtime.format(
43
+ uri_to_path(uri),
44
+ document.source,
45
+ command: 'rubocop.formatAutocorrects',
46
+ prism_result: prism_result(document)
47
+ )
48
+ end
34
49
  end
35
50
 
36
51
  def run_range_formatting(_uri, _partial_source, _base_indentation)
@@ -43,6 +58,25 @@ module RubyLsp
43
58
 
44
59
  private
45
60
 
61
+ def with_error_handling
62
+ return unless @runtime
63
+
64
+ yield
65
+ rescue StandardError => e
66
+ ::RuboCop::LSP::Logger.log(e.full_message, prefix: '[RuboCop]')
67
+
68
+ message = if e.is_a?(::RuboCop::ErrorWithAnalyzedFileLocation)
69
+ "for the #{e.cop.name} cop"
70
+ else
71
+ "- #{e.message}"
72
+ end
73
+ raise Requests::Formatting::Error, <<~MSG
74
+ An internal error occurred #{message}.
75
+ Updating to a newer version of RuboCop may solve this.
76
+ For more details, run RuboCop on the command line.
77
+ MSG
78
+ end
79
+
46
80
  # duplicated from: lib/standard/lsp/routes.rb
47
81
  # modified to incorporate Ruby LSP's to_standardized_path method
48
82
  def uri_to_path(uri)
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.80.2
4
+ version: 1.86.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
@@ -9,7 +9,7 @@ authors:
9
9
  - Yuji Nakayama
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2025-09-03 00:00:00.000000000 Z
12
+ date: 1980-01-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -57,14 +57,14 @@ dependencies:
57
57
  name: parallel
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '1.10'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '1.10'
70
70
  - !ruby/object:Gem::Dependency
@@ -127,7 +127,7 @@ dependencies:
127
127
  requirements:
128
128
  - - ">="
129
129
  - !ruby/object:Gem::Version
130
- version: 1.46.0
130
+ version: 1.49.0
131
131
  - - "<"
132
132
  - !ruby/object:Gem::Version
133
133
  version: '2.0'
@@ -137,7 +137,7 @@ dependencies:
137
137
  requirements:
138
138
  - - ">="
139
139
  - !ruby/object:Gem::Version
140
- version: 1.46.0
140
+ version: 1.49.0
141
141
  - - "<"
142
142
  - !ruby/object:Gem::Version
143
143
  version: '2.0'
@@ -208,6 +208,7 @@ files:
208
208
  - lib/rubocop/cli/command/execute_runner.rb
209
209
  - lib/rubocop/cli/command/init_dotfile.rb
210
210
  - lib/rubocop/cli/command/lsp.rb
211
+ - lib/rubocop/cli/command/mcp.rb
211
212
  - lib/rubocop/cli/command/show_cops.rb
212
213
  - lib/rubocop/cli/command/show_docs_url.rb
213
214
  - lib/rubocop/cli/command/suggest_extensions.rb
@@ -286,6 +287,7 @@ files:
286
287
  - lib/rubocop/cop/internal_affairs/example_description.rb
287
288
  - lib/rubocop/cop/internal_affairs/example_heredoc_delimiter.rb
288
289
  - lib/rubocop/cop/internal_affairs/inherit_deprecated_cop_class.rb
290
+ - lib/rubocop/cop/internal_affairs/itblock_handler.rb
289
291
  - lib/rubocop/cop/internal_affairs/lambda_or_proc.rb
290
292
  - lib/rubocop/cop/internal_affairs/location_exists.rb
291
293
  - lib/rubocop/cop/internal_affairs/location_expression.rb
@@ -439,6 +441,7 @@ files:
439
441
  - lib/rubocop/cop/lint/constant_reassignment.rb
440
442
  - lib/rubocop/cop/lint/constant_resolution.rb
441
443
  - lib/rubocop/cop/lint/cop_directive_syntax.rb
444
+ - lib/rubocop/cop/lint/data_define_override.rb
442
445
  - lib/rubocop/cop/lint/debugger.rb
443
446
  - lib/rubocop/cop/lint/deprecated_class_methods.rb
444
447
  - lib/rubocop/cop/lint/deprecated_constants.rb
@@ -556,6 +559,7 @@ files:
556
559
  - lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb
557
560
  - lib/rubocop/cop/lint/unreachable_code.rb
558
561
  - lib/rubocop/cop/lint/unreachable_loop.rb
562
+ - lib/rubocop/cop/lint/unreachable_pattern_branch.rb
559
563
  - lib/rubocop/cop/lint/unused_block_argument.rb
560
564
  - lib/rubocop/cop/lint/unused_method_argument.rb
561
565
  - lib/rubocop/cop/lint/uri_escape_unescape.rb
@@ -630,6 +634,7 @@ files:
630
634
  - lib/rubocop/cop/mixin/hash_shorthand_syntax.rb
631
635
  - lib/rubocop/cop/mixin/hash_subset.rb
632
636
  - lib/rubocop/cop/mixin/hash_transform_method.rb
637
+ - lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb
633
638
  - lib/rubocop/cop/mixin/heredoc.rb
634
639
  - lib/rubocop/cop/mixin/integer_node.rb
635
640
  - lib/rubocop/cop/mixin/interpolation.rb
@@ -708,6 +713,7 @@ files:
708
713
  - lib/rubocop/cop/style/array_coercion.rb
709
714
  - lib/rubocop/cop/style/array_first_last.rb
710
715
  - lib/rubocop/cop/style/array_intersect.rb
716
+ - lib/rubocop/cop/style/array_intersect_with_single_element.rb
711
717
  - lib/rubocop/cop/style/array_join.rb
712
718
  - lib/rubocop/cop/style/ascii_comments.rb
713
719
  - lib/rubocop/cop/style/attr.rb
@@ -760,6 +766,7 @@ files:
760
766
  - lib/rubocop/cop/style/each_with_object.rb
761
767
  - lib/rubocop/cop/style/empty_block_parameter.rb
762
768
  - lib/rubocop/cop/style/empty_case_condition.rb
769
+ - lib/rubocop/cop/style/empty_class_definition.rb
763
770
  - lib/rubocop/cop/style/empty_else.rb
764
771
  - lib/rubocop/cop/style/empty_heredoc.rb
765
772
  - lib/rubocop/cop/style/empty_lambda_parameter.rb
@@ -779,6 +786,7 @@ files:
779
786
  - lib/rubocop/cop/style/fetch_env_var.rb
780
787
  - lib/rubocop/cop/style/file_empty.rb
781
788
  - lib/rubocop/cop/style/file_null.rb
789
+ - lib/rubocop/cop/style/file_open.rb
782
790
  - lib/rubocop/cop/style/file_read.rb
783
791
  - lib/rubocop/cop/style/file_touch.rb
784
792
  - lib/rubocop/cop/style/file_write.rb
@@ -796,6 +804,7 @@ files:
796
804
  - lib/rubocop/cop/style/hash_except.rb
797
805
  - lib/rubocop/cop/style/hash_fetch_chain.rb
798
806
  - lib/rubocop/cop/style/hash_like_case.rb
807
+ - lib/rubocop/cop/style/hash_lookup_method.rb
799
808
  - lib/rubocop/cop/style/hash_slice.rb
800
809
  - lib/rubocop/cop/style/hash_syntax.rb
801
810
  - lib/rubocop/cop/style/hash_transform_keys.rb
@@ -823,6 +832,7 @@ files:
823
832
  - lib/rubocop/cop/style/magic_comment_format.rb
824
833
  - lib/rubocop/cop/style/map_compact_with_conditional_block.rb
825
834
  - lib/rubocop/cop/style/map_into_array.rb
835
+ - lib/rubocop/cop/style/map_join.rb
826
836
  - lib/rubocop/cop/style/map_to_hash.rb
827
837
  - lib/rubocop/cop/style/map_to_set.rb
828
838
  - lib/rubocop/cop/style/method_call_with_args_parentheses.rb
@@ -838,6 +848,7 @@ files:
838
848
  - lib/rubocop/cop/style/mixin_grouping.rb
839
849
  - lib/rubocop/cop/style/mixin_usage.rb
840
850
  - lib/rubocop/cop/style/module_function.rb
851
+ - lib/rubocop/cop/style/module_member_existence_check.rb
841
852
  - lib/rubocop/cop/style/multiline_block_chain.rb
842
853
  - lib/rubocop/cop/style/multiline_if_modifier.rb
843
854
  - lib/rubocop/cop/style/multiline_if_then.rb
@@ -852,6 +863,7 @@ files:
852
863
  - lib/rubocop/cop/style/negated_if_else_condition.rb
853
864
  - lib/rubocop/cop/style/negated_unless.rb
854
865
  - lib/rubocop/cop/style/negated_while.rb
866
+ - lib/rubocop/cop/style/negative_array_index.rb
855
867
  - lib/rubocop/cop/style/nested_file_dirname.rb
856
868
  - lib/rubocop/cop/style/nested_modifier.rb
857
869
  - lib/rubocop/cop/style/nested_parenthesized_calls.rb
@@ -867,6 +879,7 @@ files:
867
879
  - lib/rubocop/cop/style/numeric_literals.rb
868
880
  - lib/rubocop/cop/style/numeric_predicate.rb
869
881
  - lib/rubocop/cop/style/object_then.rb
882
+ - lib/rubocop/cop/style/one_class_per_file.rb
870
883
  - lib/rubocop/cop/style/one_line_conditional.rb
871
884
  - lib/rubocop/cop/style/open_struct_use.rb
872
885
  - lib/rubocop/cop/style/operator_method_call.rb
@@ -876,14 +889,17 @@ files:
876
889
  - lib/rubocop/cop/style/or_assignment.rb
877
890
  - lib/rubocop/cop/style/parallel_assignment.rb
878
891
  - lib/rubocop/cop/style/parentheses_around_condition.rb
892
+ - lib/rubocop/cop/style/partition_instead_of_double_select.rb
879
893
  - lib/rubocop/cop/style/percent_literal_delimiters.rb
880
894
  - lib/rubocop/cop/style/percent_q_literals.rb
881
895
  - lib/rubocop/cop/style/perl_backrefs.rb
896
+ - lib/rubocop/cop/style/predicate_with_kind.rb
882
897
  - lib/rubocop/cop/style/preferred_hash_methods.rb
883
898
  - lib/rubocop/cop/style/proc.rb
884
899
  - lib/rubocop/cop/style/quoted_symbols.rb
885
900
  - lib/rubocop/cop/style/raise_args.rb
886
901
  - lib/rubocop/cop/style/random_with_offset.rb
902
+ - lib/rubocop/cop/style/reduce_to_hash.rb
887
903
  - lib/rubocop/cop/style/redundant_argument.rb
888
904
  - lib/rubocop/cop/style/redundant_array_constructor.rb
889
905
  - lib/rubocop/cop/style/redundant_array_flatten.rb
@@ -907,6 +923,7 @@ files:
907
923
  - lib/rubocop/cop/style/redundant_interpolation.rb
908
924
  - lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb
909
925
  - lib/rubocop/cop/style/redundant_line_continuation.rb
926
+ - lib/rubocop/cop/style/redundant_min_max_by.rb
910
927
  - lib/rubocop/cop/style/redundant_parentheses.rb
911
928
  - lib/rubocop/cop/style/redundant_percent_q.rb
912
929
  - lib/rubocop/cop/style/redundant_regexp_argument.rb
@@ -920,15 +937,19 @@ files:
920
937
  - lib/rubocop/cop/style/redundant_sort.rb
921
938
  - lib/rubocop/cop/style/redundant_sort_by.rb
922
939
  - lib/rubocop/cop/style/redundant_string_escape.rb
940
+ - lib/rubocop/cop/style/redundant_struct_keyword_init.rb
923
941
  - lib/rubocop/cop/style/regexp_literal.rb
924
942
  - lib/rubocop/cop/style/require_order.rb
925
943
  - lib/rubocop/cop/style/rescue_modifier.rb
926
944
  - lib/rubocop/cop/style/rescue_standard_error.rb
927
945
  - lib/rubocop/cop/style/return_nil.rb
928
946
  - lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb
947
+ - lib/rubocop/cop/style/reverse_find.rb
929
948
  - lib/rubocop/cop/style/safe_navigation.rb
930
949
  - lib/rubocop/cop/style/safe_navigation_chain_length.rb
931
950
  - lib/rubocop/cop/style/sample.rb
951
+ - lib/rubocop/cop/style/select_by_kind.rb
952
+ - lib/rubocop/cop/style/select_by_range.rb
932
953
  - lib/rubocop/cop/style/select_by_regexp.rb
933
954
  - lib/rubocop/cop/style/self_assignment.rb
934
955
  - lib/rubocop/cop/style/semicolon.rb
@@ -959,6 +980,7 @@ files:
959
980
  - lib/rubocop/cop/style/symbol_array.rb
960
981
  - lib/rubocop/cop/style/symbol_literal.rb
961
982
  - lib/rubocop/cop/style/symbol_proc.rb
983
+ - lib/rubocop/cop/style/tally_method.rb
962
984
  - lib/rubocop/cop/style/ternary_parentheses.rb
963
985
  - lib/rubocop/cop/style/top_level_method_definition.rb
964
986
  - lib/rubocop/cop/style/trailing_body_on_class.rb
@@ -1032,6 +1054,7 @@ files:
1032
1054
  - lib/rubocop/lockfile.rb
1033
1055
  - lib/rubocop/lsp.rb
1034
1056
  - lib/rubocop/lsp/diagnostic.rb
1057
+ - lib/rubocop/lsp/disable_comment_edits.rb
1035
1058
  - lib/rubocop/lsp/logger.rb
1036
1059
  - lib/rubocop/lsp/routes.rb
1037
1060
  - lib/rubocop/lsp/runtime.rb
@@ -1039,6 +1062,7 @@ files:
1039
1062
  - lib/rubocop/lsp/severity.rb
1040
1063
  - lib/rubocop/lsp/stdin_runner.rb
1041
1064
  - lib/rubocop/magic_comment.rb
1065
+ - lib/rubocop/mcp/server.rb
1042
1066
  - lib/rubocop/name_similarity.rb
1043
1067
  - lib/rubocop/options.rb
1044
1068
  - lib/rubocop/path_util.rb
@@ -1090,9 +1114,9 @@ licenses:
1090
1114
  - MIT
1091
1115
  metadata:
1092
1116
  homepage_uri: https://rubocop.org/
1093
- changelog_uri: https://github.com/rubocop/rubocop/releases/tag/v1.80.2
1117
+ changelog_uri: https://github.com/rubocop/rubocop/releases/tag/v1.86.1
1094
1118
  source_code_uri: https://github.com/rubocop/rubocop/
1095
- documentation_uri: https://docs.rubocop.org/rubocop/1.80/
1119
+ documentation_uri: https://docs.rubocop.org/rubocop/1.86/
1096
1120
  bug_tracker_uri: https://github.com/rubocop/rubocop/issues
1097
1121
  rubygems_mfa_required: 'true'
1098
1122
  rdoc_options: []
@@ -1109,7 +1133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1109
1133
  - !ruby/object:Gem::Version
1110
1134
  version: '0'
1111
1135
  requirements: []
1112
- rubygems_version: 3.6.2
1136
+ rubygems_version: 3.6.9
1113
1137
  specification_version: 4
1114
1138
  summary: Automatic Ruby code style checking tool.
1115
1139
  test_files: []