rubocop 0.66.0 → 1.25.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (861) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +70 -43
  4. data/assets/output.html.erb +1 -1
  5. data/config/default.yml +1936 -1212
  6. data/config/obsoletion.yml +200 -0
  7. data/exe/rubocop +2 -4
  8. data/lib/rubocop/ast_aliases.rb +8 -0
  9. data/lib/rubocop/cached_data.rb +6 -6
  10. data/lib/rubocop/cli/command/auto_genenerate_config.rb +132 -0
  11. data/lib/rubocop/cli/command/base.rb +35 -0
  12. data/lib/rubocop/cli/command/execute_runner.rb +100 -0
  13. data/lib/rubocop/cli/command/init_dotfile.rb +44 -0
  14. data/lib/rubocop/cli/command/show_cops.rb +74 -0
  15. data/lib/rubocop/cli/command/show_docs_url.rb +48 -0
  16. data/lib/rubocop/cli/command/suggest_extensions.rb +81 -0
  17. data/lib/rubocop/cli/command/version.rb +18 -0
  18. data/lib/rubocop/cli/command.rb +22 -0
  19. data/lib/rubocop/cli/environment.rb +22 -0
  20. data/lib/rubocop/cli.rb +45 -200
  21. data/lib/rubocop/comment_config.rb +56 -99
  22. data/lib/rubocop/config.rb +92 -510
  23. data/lib/rubocop/config_loader.rb +150 -85
  24. data/lib/rubocop/config_loader_resolver.rb +129 -46
  25. data/lib/rubocop/config_obsoletion/changed_enforced_styles.rb +33 -0
  26. data/lib/rubocop/config_obsoletion/changed_parameter.rb +21 -0
  27. data/lib/rubocop/config_obsoletion/cop_rule.rb +33 -0
  28. data/lib/rubocop/config_obsoletion/extracted_cop.rb +44 -0
  29. data/lib/rubocop/config_obsoletion/parameter_rule.rb +44 -0
  30. data/lib/rubocop/config_obsoletion/removed_cop.rb +41 -0
  31. data/lib/rubocop/config_obsoletion/renamed_cop.rb +34 -0
  32. data/lib/rubocop/config_obsoletion/rule.rb +41 -0
  33. data/lib/rubocop/config_obsoletion/split_cop.rb +27 -0
  34. data/lib/rubocop/config_obsoletion.rb +103 -0
  35. data/lib/rubocop/config_regeneration.rb +33 -0
  36. data/lib/rubocop/config_store.rb +31 -7
  37. data/lib/rubocop/config_validator.rb +255 -0
  38. data/lib/rubocop/cop/autocorrect_logic.rb +78 -6
  39. data/lib/rubocop/cop/badge.rb +16 -32
  40. data/lib/rubocop/cop/base.rb +450 -0
  41. data/lib/rubocop/cop/bundler/duplicated_gem.rb +31 -7
  42. data/lib/rubocop/cop/bundler/gem_comment.rb +122 -15
  43. data/lib/rubocop/cop/bundler/gem_filename.rb +103 -0
  44. data/lib/rubocop/cop/bundler/gem_version.rb +133 -0
  45. data/lib/rubocop/cop/bundler/insecure_protocol_source.rb +47 -30
  46. data/lib/rubocop/cop/bundler/ordered_gems.rb +7 -18
  47. data/lib/rubocop/cop/commissioner.rb +103 -53
  48. data/lib/rubocop/cop/cop.rb +93 -191
  49. data/lib/rubocop/cop/corrector.rb +68 -122
  50. data/lib/rubocop/cop/correctors/alignment_corrector.rb +48 -32
  51. data/lib/rubocop/cop/correctors/condition_corrector.rb +3 -6
  52. data/lib/rubocop/cop/correctors/each_to_for_corrector.rb +4 -6
  53. data/lib/rubocop/cop/correctors/empty_line_corrector.rb +9 -10
  54. data/lib/rubocop/cop/correctors/for_to_each_corrector.rb +2 -3
  55. data/lib/rubocop/cop/correctors/if_then_corrector.rb +55 -0
  56. data/lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb +11 -11
  57. data/lib/rubocop/cop/correctors/line_break_corrector.rb +9 -12
  58. data/lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb +37 -8
  59. data/lib/rubocop/cop/correctors/ordered_gem_corrector.rb +11 -12
  60. data/lib/rubocop/cop/correctors/parentheses_corrector.rb +6 -9
  61. data/lib/rubocop/cop/correctors/percent_literal_corrector.rb +11 -22
  62. data/lib/rubocop/cop/correctors/punctuation_corrector.rb +8 -10
  63. data/lib/rubocop/cop/correctors/require_library_corrector.rb +23 -0
  64. data/lib/rubocop/cop/correctors/space_corrector.rb +2 -5
  65. data/lib/rubocop/cop/correctors/string_literal_corrector.rb +6 -8
  66. data/lib/rubocop/cop/correctors/unused_arg_corrector.rb +17 -8
  67. data/lib/rubocop/cop/documentation.rb +39 -0
  68. data/lib/rubocop/cop/exclude_limit.rb +26 -0
  69. data/lib/rubocop/cop/force.rb +2 -1
  70. data/lib/rubocop/cop/gemspec/date_assignment.rb +49 -0
  71. data/lib/rubocop/cop/gemspec/duplicated_assignment.rb +8 -16
  72. data/lib/rubocop/cop/gemspec/ordered_dependencies.rb +8 -22
  73. data/lib/rubocop/cop/gemspec/require_mfa.rb +144 -0
  74. data/lib/rubocop/cop/gemspec/required_ruby_version.rb +74 -32
  75. data/lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb +50 -0
  76. data/lib/rubocop/cop/generator/configuration_injector.rb +15 -11
  77. data/lib/rubocop/cop/generator/require_file_injector.rb +3 -6
  78. data/lib/rubocop/cop/generator.rb +43 -41
  79. data/lib/rubocop/cop/ignored_node.rb +1 -3
  80. data/lib/rubocop/cop/internal_affairs/empty_line_between_expect_offense_and_correction.rb +68 -0
  81. data/lib/rubocop/cop/internal_affairs/example_description.rb +92 -0
  82. data/lib/rubocop/cop/internal_affairs/inherit_deprecated_cop_class.rb +34 -0
  83. data/lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb +60 -0
  84. data/lib/rubocop/cop/internal_affairs/method_name_equal.rb +50 -0
  85. data/lib/rubocop/cop/internal_affairs/node_destructuring.rb +15 -17
  86. data/lib/rubocop/cop/internal_affairs/node_matcher_directive.rb +151 -0
  87. data/lib/rubocop/cop/internal_affairs/node_type_predicate.rb +13 -16
  88. data/lib/rubocop/cop/internal_affairs/offense_location_keyword.rb +14 -12
  89. data/lib/rubocop/cop/internal_affairs/redundant_described_class_as_subject.rb +62 -0
  90. data/lib/rubocop/cop/internal_affairs/redundant_let_rubocop_config_new.rb +65 -0
  91. data/lib/rubocop/cop/internal_affairs/redundant_location_argument.rb +15 -23
  92. data/lib/rubocop/cop/internal_affairs/redundant_message_argument.rb +14 -11
  93. data/lib/rubocop/cop/internal_affairs/redundant_method_dispatch_node.rb +47 -0
  94. data/lib/rubocop/cop/internal_affairs/style_detected_api_use.rb +148 -0
  95. data/lib/rubocop/cop/internal_affairs/undefined_config.rb +73 -0
  96. data/lib/rubocop/cop/internal_affairs/useless_message_assertion.rb +9 -9
  97. data/lib/rubocop/cop/internal_affairs.rb +12 -1
  98. data/lib/rubocop/cop/layout/access_modifier_indentation.rb +20 -29
  99. data/lib/rubocop/cop/layout/argument_alignment.rb +137 -0
  100. data/lib/rubocop/cop/layout/array_alignment.rb +84 -0
  101. data/lib/rubocop/cop/layout/{indent_assignment.rb → assignment_indentation.rb} +17 -7
  102. data/lib/rubocop/cop/layout/begin_end_alignment.rb +74 -0
  103. data/lib/rubocop/cop/layout/block_alignment.rb +43 -51
  104. data/lib/rubocop/cop/layout/block_end_newline.rb +9 -12
  105. data/lib/rubocop/cop/layout/case_indentation.rb +72 -30
  106. data/lib/rubocop/cop/layout/class_structure.rb +67 -78
  107. data/lib/rubocop/cop/layout/closing_heredoc_indentation.rb +8 -10
  108. data/lib/rubocop/cop/layout/closing_parenthesis_indentation.rb +28 -34
  109. data/lib/rubocop/cop/layout/comment_indentation.rb +61 -39
  110. data/lib/rubocop/cop/layout/condition_position.rb +17 -9
  111. data/lib/rubocop/cop/layout/def_end_alignment.rb +10 -11
  112. data/lib/rubocop/cop/layout/dot_position.rb +64 -26
  113. data/lib/rubocop/cop/layout/else_alignment.rb +30 -8
  114. data/lib/rubocop/cop/layout/empty_comment.rb +34 -43
  115. data/lib/rubocop/cop/layout/empty_line_after_guard_clause.rb +74 -35
  116. data/lib/rubocop/cop/layout/empty_line_after_magic_comment.rb +16 -16
  117. data/lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb +136 -0
  118. data/lib/rubocop/cop/layout/empty_line_between_defs.rb +161 -39
  119. data/lib/rubocop/cop/layout/empty_lines.rb +8 -13
  120. data/lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb +98 -38
  121. data/lib/rubocop/cop/layout/empty_lines_around_arguments.rb +14 -10
  122. data/lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb +118 -0
  123. data/lib/rubocop/cop/layout/empty_lines_around_begin_body.rb +3 -6
  124. data/lib/rubocop/cop/layout/empty_lines_around_block_body.rb +5 -6
  125. data/lib/rubocop/cop/layout/empty_lines_around_class_body.rb +8 -14
  126. data/lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb +16 -19
  127. data/lib/rubocop/cop/layout/empty_lines_around_method_body.rb +3 -6
  128. data/lib/rubocop/cop/layout/empty_lines_around_module_body.rb +4 -8
  129. data/lib/rubocop/cop/layout/end_alignment.rb +25 -24
  130. data/lib/rubocop/cop/layout/end_of_line.rb +18 -13
  131. data/lib/rubocop/cop/layout/extra_spacing.rb +39 -103
  132. data/lib/rubocop/cop/layout/first_argument_indentation.rb +276 -0
  133. data/lib/rubocop/cop/layout/{indent_array.rb → first_array_element_indentation.rb} +30 -24
  134. data/lib/rubocop/cop/layout/first_array_element_line_break.rb +4 -8
  135. data/lib/rubocop/cop/layout/{indent_hash.rb → first_hash_element_indentation.rb} +42 -26
  136. data/lib/rubocop/cop/layout/first_hash_element_line_break.rb +3 -7
  137. data/lib/rubocop/cop/layout/first_method_argument_line_break.rb +7 -13
  138. data/lib/rubocop/cop/layout/first_method_parameter_line_break.rb +3 -7
  139. data/lib/rubocop/cop/layout/first_parameter_indentation.rb +53 -196
  140. data/lib/rubocop/cop/layout/{align_hash.rb → hash_alignment.rb} +139 -60
  141. data/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +305 -0
  142. data/lib/rubocop/cop/layout/heredoc_indentation.rb +165 -0
  143. data/lib/rubocop/cop/layout/indentation_consistency.rb +23 -19
  144. data/lib/rubocop/cop/layout/indentation_style.rb +110 -0
  145. data/lib/rubocop/cop/layout/indentation_width.rb +66 -47
  146. data/lib/rubocop/cop/layout/initial_indentation.rb +8 -12
  147. data/lib/rubocop/cop/layout/leading_comment_space.rb +74 -13
  148. data/lib/rubocop/cop/layout/{leading_blank_lines.rb → leading_empty_lines.rb} +7 -12
  149. data/lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb +141 -0
  150. data/lib/rubocop/cop/layout/line_length.rb +269 -0
  151. data/lib/rubocop/cop/layout/multiline_array_brace_layout.rb +8 -11
  152. data/lib/rubocop/cop/layout/multiline_array_line_breaks.rb +35 -0
  153. data/lib/rubocop/cop/layout/multiline_assignment_layout.rb +40 -18
  154. data/lib/rubocop/cop/layout/multiline_block_layout.rb +68 -33
  155. data/lib/rubocop/cop/layout/multiline_hash_brace_layout.rb +8 -15
  156. data/lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb +46 -0
  157. data/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb +50 -0
  158. data/lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb +8 -11
  159. data/lib/rubocop/cop/layout/multiline_method_call_indentation.rb +34 -25
  160. data/lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb +8 -11
  161. data/lib/rubocop/cop/layout/multiline_operation_indentation.rb +26 -12
  162. data/lib/rubocop/cop/layout/parameter_alignment.rb +119 -0
  163. data/lib/rubocop/cop/layout/redundant_line_break.rb +140 -0
  164. data/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +75 -39
  165. data/lib/rubocop/cop/layout/single_line_block_chain.rb +64 -0
  166. data/lib/rubocop/cop/layout/space_after_colon.rb +12 -10
  167. data/lib/rubocop/cop/layout/space_after_comma.rb +2 -5
  168. data/lib/rubocop/cop/layout/space_after_method_name.rb +8 -11
  169. data/lib/rubocop/cop/layout/space_after_not.rb +11 -12
  170. data/lib/rubocop/cop/layout/space_after_semicolon.rb +2 -5
  171. data/lib/rubocop/cop/layout/space_around_block_parameters.rb +50 -53
  172. data/lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb +21 -24
  173. data/lib/rubocop/cop/layout/space_around_keyword.rb +69 -33
  174. data/lib/rubocop/cop/layout/space_around_method_call_operator.rb +98 -0
  175. data/lib/rubocop/cop/layout/space_around_operators.rb +148 -53
  176. data/lib/rubocop/cop/layout/space_before_block_braces.rb +55 -22
  177. data/lib/rubocop/cop/layout/space_before_brackets.rb +66 -0
  178. data/lib/rubocop/cop/layout/space_before_comma.rb +3 -5
  179. data/lib/rubocop/cop/layout/space_before_comment.rb +11 -12
  180. data/lib/rubocop/cop/layout/space_before_first_arg.rb +21 -15
  181. data/lib/rubocop/cop/layout/space_before_semicolon.rb +2 -5
  182. data/lib/rubocop/cop/layout/space_in_lambda_literal.rb +23 -39
  183. data/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb +39 -45
  184. data/lib/rubocop/cop/layout/space_inside_array_percent_literal.rb +6 -16
  185. data/lib/rubocop/cop/layout/space_inside_block_braces.rb +53 -39
  186. data/lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb +23 -49
  187. data/lib/rubocop/cop/layout/space_inside_parens.rb +96 -33
  188. data/lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb +6 -11
  189. data/lib/rubocop/cop/layout/space_inside_range_literal.rb +10 -19
  190. data/lib/rubocop/cop/layout/space_inside_reference_brackets.rb +20 -32
  191. data/lib/rubocop/cop/layout/space_inside_string_interpolation.rb +25 -42
  192. data/lib/rubocop/cop/layout/{trailing_blank_lines.rb → trailing_empty_lines.rb} +11 -16
  193. data/lib/rubocop/cop/layout/trailing_whitespace.rb +79 -16
  194. data/lib/rubocop/cop/legacy/corrections_proxy.rb +43 -0
  195. data/lib/rubocop/cop/legacy/corrector.rb +27 -0
  196. data/lib/rubocop/cop/lint/ambiguous_assignment.rb +54 -0
  197. data/lib/rubocop/cop/lint/ambiguous_block_association.rb +22 -10
  198. data/lib/rubocop/cop/lint/ambiguous_operator.rb +59 -11
  199. data/lib/rubocop/cop/lint/ambiguous_operator_precedence.rb +111 -0
  200. data/lib/rubocop/cop/lint/ambiguous_range.rb +105 -0
  201. data/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb +44 -7
  202. data/lib/rubocop/cop/lint/assignment_in_condition.rb +28 -13
  203. data/lib/rubocop/cop/lint/big_decimal_new.rb +12 -12
  204. data/lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb +68 -0
  205. data/lib/rubocop/cop/lint/boolean_symbol.rb +29 -4
  206. data/lib/rubocop/cop/lint/circular_argument_reference.rb +2 -2
  207. data/lib/rubocop/cop/lint/constant_definition_in_block.rb +100 -0
  208. data/lib/rubocop/cop/lint/constant_resolution.rb +89 -0
  209. data/lib/rubocop/cop/lint/debugger.rb +61 -25
  210. data/lib/rubocop/cop/lint/deprecated_class_methods.rb +98 -47
  211. data/lib/rubocop/cop/lint/deprecated_constants.rb +81 -0
  212. data/lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb +154 -0
  213. data/lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb +34 -5
  214. data/lib/rubocop/cop/lint/duplicate_branch.rb +155 -0
  215. data/lib/rubocop/cop/lint/duplicate_case_condition.rb +4 -14
  216. data/lib/rubocop/cop/lint/duplicate_elsif_condition.rb +39 -0
  217. data/lib/rubocop/cop/lint/{duplicated_key.rb → duplicate_hash_key.rb} +3 -5
  218. data/lib/rubocop/cop/lint/duplicate_methods.rb +28 -31
  219. data/lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb +77 -0
  220. data/lib/rubocop/cop/lint/duplicate_require.rb +47 -0
  221. data/lib/rubocop/cop/lint/duplicate_rescue_exception.rb +47 -0
  222. data/lib/rubocop/cop/lint/each_with_object_argument.rb +6 -4
  223. data/lib/rubocop/cop/lint/else_layout.rb +38 -10
  224. data/lib/rubocop/cop/lint/empty_block.rb +98 -0
  225. data/lib/rubocop/cop/lint/empty_class.rb +93 -0
  226. data/lib/rubocop/cop/lint/empty_conditional_body.rb +67 -0
  227. data/lib/rubocop/cop/lint/empty_ensure.rb +6 -8
  228. data/lib/rubocop/cop/lint/empty_expression.rb +3 -3
  229. data/lib/rubocop/cop/lint/empty_file.rb +48 -0
  230. data/lib/rubocop/cop/lint/empty_in_pattern.rb +62 -0
  231. data/lib/rubocop/cop/lint/empty_interpolation.rb +8 -11
  232. data/lib/rubocop/cop/lint/empty_when.rb +32 -9
  233. data/lib/rubocop/cop/lint/ensure_return.rb +30 -17
  234. data/lib/rubocop/cop/lint/erb_new_arguments.rb +65 -10
  235. data/lib/rubocop/cop/lint/flip_flop.rb +10 -4
  236. data/lib/rubocop/cop/lint/float_comparison.rb +93 -0
  237. data/lib/rubocop/cop/lint/float_out_of_range.rb +3 -4
  238. data/lib/rubocop/cop/lint/format_parameter_mismatch.rb +63 -59
  239. data/lib/rubocop/cop/lint/hash_compare_by_identity.rb +47 -0
  240. data/lib/rubocop/cop/lint/heredoc_method_call_position.rb +154 -0
  241. data/lib/rubocop/cop/lint/identity_comparison.rb +51 -0
  242. data/lib/rubocop/cop/lint/implicit_string_concatenation.rb +12 -12
  243. data/lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb +72 -0
  244. data/lib/rubocop/cop/lint/ineffective_access_modifier.rb +18 -24
  245. data/lib/rubocop/cop/lint/inherit_exception.rb +33 -8
  246. data/lib/rubocop/cop/lint/interpolation_check.rb +26 -8
  247. data/lib/rubocop/cop/lint/lambda_without_literal_block.rb +44 -0
  248. data/lib/rubocop/cop/lint/literal_as_condition.rb +38 -17
  249. data/lib/rubocop/cop/lint/literal_in_interpolation.rb +65 -20
  250. data/lib/rubocop/cop/lint/loop.rb +32 -9
  251. data/lib/rubocop/cop/lint/missing_cop_enable_directive.rb +36 -24
  252. data/lib/rubocop/cop/lint/missing_super.rb +101 -0
  253. data/lib/rubocop/cop/lint/mixed_regexp_capture_types.rb +36 -0
  254. data/lib/rubocop/cop/lint/multiple_comparison.rb +48 -0
  255. data/lib/rubocop/cop/lint/nested_method_definition.rb +24 -28
  256. data/lib/rubocop/cop/lint/nested_percent_literal.rb +18 -6
  257. data/lib/rubocop/cop/lint/next_without_accumulator.rb +4 -3
  258. data/lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb +58 -0
  259. data/lib/rubocop/cop/lint/non_deterministic_require_order.rb +173 -0
  260. data/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb +17 -16
  261. data/lib/rubocop/cop/lint/number_conversion.rb +122 -12
  262. data/lib/rubocop/cop/lint/numbered_parameter_assignment.rb +47 -0
  263. data/lib/rubocop/cop/lint/or_assignment_to_constant.rb +41 -0
  264. data/lib/rubocop/cop/lint/ordered_magic_comments.rb +12 -15
  265. data/lib/rubocop/cop/lint/out_of_range_regexp_ref.rb +113 -0
  266. data/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +36 -14
  267. data/lib/rubocop/cop/lint/percent_string_array.rb +17 -12
  268. data/lib/rubocop/cop/lint/percent_symbol_array.rb +13 -14
  269. data/lib/rubocop/cop/lint/raise_exception.rb +91 -0
  270. data/lib/rubocop/cop/lint/rand_one.rb +6 -5
  271. data/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb +290 -0
  272. data/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb +133 -0
  273. data/lib/rubocop/cop/lint/redundant_dir_glob_sort.rb +50 -0
  274. data/lib/rubocop/cop/lint/{unneeded_require_statement.rb → redundant_require_statement.rb} +11 -12
  275. data/lib/rubocop/cop/lint/redundant_safe_navigation.rb +78 -0
  276. data/lib/rubocop/cop/lint/{unneeded_splat_expansion.rb → redundant_splat_expansion.rb} +88 -46
  277. data/lib/rubocop/cop/lint/{string_conversion_in_interpolation.rb → redundant_string_coercion.rb} +14 -21
  278. data/lib/rubocop/cop/lint/redundant_with_index.rb +17 -22
  279. data/lib/rubocop/cop/lint/redundant_with_object.rb +17 -22
  280. data/lib/rubocop/cop/lint/regexp_as_condition.rb +5 -3
  281. data/lib/rubocop/cop/lint/require_parentheses.rb +4 -6
  282. data/lib/rubocop/cop/lint/require_relative_self_path.rb +50 -0
  283. data/lib/rubocop/cop/lint/rescue_exception.rb +3 -4
  284. data/lib/rubocop/cop/lint/rescue_type.rb +11 -17
  285. data/lib/rubocop/cop/lint/return_in_void_context.rb +5 -8
  286. data/lib/rubocop/cop/lint/safe_navigation_chain.rb +13 -20
  287. data/lib/rubocop/cop/lint/safe_navigation_consistency.rb +16 -18
  288. data/lib/rubocop/cop/lint/safe_navigation_with_empty.rb +13 -5
  289. data/lib/rubocop/cop/lint/script_permission.rb +12 -9
  290. data/lib/rubocop/cop/lint/self_assignment.rb +78 -0
  291. data/lib/rubocop/cop/lint/send_with_mixin_argument.rb +83 -0
  292. data/lib/rubocop/cop/lint/shadowed_argument.rb +9 -15
  293. data/lib/rubocop/cop/lint/shadowed_exception.rb +19 -31
  294. data/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +22 -8
  295. data/lib/rubocop/cop/lint/struct_new_override.rb +59 -0
  296. data/lib/rubocop/cop/lint/suppressed_exception.rb +132 -0
  297. data/lib/rubocop/cop/lint/symbol_conversion.rb +178 -0
  298. data/lib/rubocop/cop/lint/syntax.rb +11 -30
  299. data/lib/rubocop/cop/lint/to_enum_arguments.rb +89 -0
  300. data/lib/rubocop/cop/lint/to_json.rb +25 -14
  301. data/lib/rubocop/cop/lint/top_level_return_with_argument.rb +34 -0
  302. data/lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb +55 -0
  303. data/lib/rubocop/cop/lint/triple_quotes.rb +71 -0
  304. data/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb +31 -13
  305. data/lib/rubocop/cop/lint/unexpected_block_arity.rb +90 -0
  306. data/lib/rubocop/cop/lint/unified_integer.rb +7 -8
  307. data/lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb +204 -0
  308. data/lib/rubocop/cop/lint/unreachable_code.rb +7 -9
  309. data/lib/rubocop/cop/lint/unreachable_loop.rb +196 -0
  310. data/lib/rubocop/cop/lint/unused_block_argument.rb +40 -17
  311. data/lib/rubocop/cop/lint/unused_method_argument.rb +65 -17
  312. data/lib/rubocop/cop/lint/uri_escape_unescape.rb +7 -4
  313. data/lib/rubocop/cop/lint/uri_regexp.rb +12 -47
  314. data/lib/rubocop/cop/lint/useless_access_modifier.rb +101 -51
  315. data/lib/rubocop/cop/lint/useless_assignment.rb +13 -21
  316. data/lib/rubocop/cop/lint/useless_else_without_rescue.rb +10 -11
  317. data/lib/rubocop/cop/lint/useless_method_definition.rb +69 -0
  318. data/lib/rubocop/cop/lint/useless_ruby2_keywords.rb +117 -0
  319. data/lib/rubocop/cop/lint/useless_setter_call.rb +21 -13
  320. data/lib/rubocop/cop/lint/useless_times.rb +110 -0
  321. data/lib/rubocop/cop/lint/void.rb +20 -50
  322. data/lib/rubocop/cop/message_annotator.rb +21 -10
  323. data/lib/rubocop/cop/metrics/abc_size.rb +33 -3
  324. data/lib/rubocop/cop/metrics/block_length.rb +43 -12
  325. data/lib/rubocop/cop/metrics/block_nesting.rb +5 -10
  326. data/lib/rubocop/cop/metrics/class_length.rb +40 -11
  327. data/lib/rubocop/cop/metrics/cyclomatic_complexity.rb +29 -6
  328. data/lib/rubocop/cop/metrics/method_length.rb +35 -6
  329. data/lib/rubocop/cop/metrics/module_length.rb +30 -10
  330. data/lib/rubocop/cop/metrics/parameter_lists.rb +79 -13
  331. data/lib/rubocop/cop/metrics/perceived_complexity.rb +8 -11
  332. data/lib/rubocop/cop/metrics/utils/abc_size_calculator.rb +96 -18
  333. data/lib/rubocop/cop/metrics/utils/code_length_calculator.rb +160 -0
  334. data/lib/rubocop/cop/metrics/utils/iterating_block.rb +61 -0
  335. data/lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb +143 -0
  336. data/lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb +42 -0
  337. data/lib/rubocop/cop/migration/department_name.rb +81 -0
  338. data/lib/rubocop/cop/mixin/alignment.rb +20 -13
  339. data/lib/rubocop/cop/mixin/allowed_identifiers.rb +18 -0
  340. data/lib/rubocop/cop/mixin/allowed_methods.rb +21 -0
  341. data/lib/rubocop/cop/mixin/annotation_comment.rb +57 -29
  342. data/lib/rubocop/cop/mixin/array_min_size.rb +2 -4
  343. data/lib/rubocop/cop/mixin/auto_corrector.rb +12 -0
  344. data/lib/rubocop/cop/mixin/check_assignment.rb +1 -1
  345. data/lib/rubocop/cop/mixin/check_line_breakable.rb +223 -0
  346. data/lib/rubocop/cop/mixin/code_length.rb +30 -9
  347. data/lib/rubocop/cop/mixin/comments_help.rb +42 -0
  348. data/lib/rubocop/cop/mixin/configurable_enforced_style.rb +7 -5
  349. data/lib/rubocop/cop/mixin/configurable_formatting.rb +4 -11
  350. data/lib/rubocop/cop/mixin/configurable_max.rb +1 -0
  351. data/lib/rubocop/cop/mixin/configurable_naming.rb +2 -2
  352. data/lib/rubocop/cop/mixin/configurable_numbering.rb +4 -3
  353. data/lib/rubocop/cop/mixin/def_node.rb +4 -6
  354. data/lib/rubocop/cop/mixin/documentation_comment.rb +9 -11
  355. data/lib/rubocop/cop/mixin/empty_lines_around_body.rb +15 -15
  356. data/lib/rubocop/cop/mixin/empty_parameter.rb +3 -2
  357. data/lib/rubocop/cop/mixin/end_keyword_alignment.rb +18 -5
  358. data/lib/rubocop/cop/mixin/enforce_superclass.rb +24 -11
  359. data/lib/rubocop/cop/mixin/first_element_line_break.rb +3 -3
  360. data/lib/rubocop/cop/mixin/frozen_string_literal.rb +43 -13
  361. data/lib/rubocop/cop/mixin/gem_declaration.rb +13 -0
  362. data/lib/rubocop/cop/mixin/gemspec_help.rb +30 -0
  363. data/lib/rubocop/cop/mixin/{hash_alignment.rb → hash_alignment_styles.rb} +25 -12
  364. data/lib/rubocop/cop/mixin/hash_shorthand_syntax.rb +82 -0
  365. data/lib/rubocop/cop/mixin/hash_transform_method.rb +188 -0
  366. data/lib/rubocop/cop/mixin/heredoc.rb +5 -0
  367. data/lib/rubocop/cop/mixin/ignored_methods.rb +36 -3
  368. data/lib/rubocop/cop/mixin/ignored_pattern.rb +1 -1
  369. data/lib/rubocop/cop/mixin/interpolation.rb +25 -0
  370. data/lib/rubocop/cop/mixin/line_length_help.rb +90 -0
  371. data/lib/rubocop/cop/mixin/match_range.rb +2 -5
  372. data/lib/rubocop/cop/mixin/method_complexity.rb +29 -8
  373. data/lib/rubocop/cop/mixin/method_preference.rb +1 -2
  374. data/lib/rubocop/cop/mixin/min_body_length.rb +1 -1
  375. data/lib/rubocop/cop/mixin/{array_hash_indentation.rb → multiline_element_indentation.rb} +8 -6
  376. data/lib/rubocop/cop/mixin/multiline_element_line_breaks.rb +33 -0
  377. data/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +18 -47
  378. data/lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb +15 -15
  379. data/lib/rubocop/cop/mixin/negative_conditional.rb +6 -4
  380. data/lib/rubocop/cop/mixin/nil_methods.rb +4 -6
  381. data/lib/rubocop/cop/mixin/ordered_gem_node.rb +16 -6
  382. data/lib/rubocop/cop/mixin/parentheses.rb +1 -2
  383. data/lib/rubocop/cop/mixin/percent_array.rb +31 -15
  384. data/lib/rubocop/cop/mixin/percent_literal.rb +0 -6
  385. data/lib/rubocop/cop/mixin/preceding_following_alignment.rb +94 -5
  386. data/lib/rubocop/cop/mixin/preferred_delimiters.rb +6 -9
  387. data/lib/rubocop/cop/mixin/range_help.rb +25 -14
  388. data/lib/rubocop/cop/mixin/rational_literal.rb +19 -0
  389. data/lib/rubocop/cop/mixin/require_library.rb +59 -0
  390. data/lib/rubocop/cop/mixin/rescue_node.rb +13 -8
  391. data/lib/rubocop/cop/mixin/safe_assignment.rb +6 -2
  392. data/lib/rubocop/cop/mixin/space_after_punctuation.rb +7 -8
  393. data/lib/rubocop/cop/mixin/space_before_punctuation.rb +8 -8
  394. data/lib/rubocop/cop/mixin/statement_modifier.rb +49 -23
  395. data/lib/rubocop/cop/mixin/string_help.rb +4 -1
  396. data/lib/rubocop/cop/mixin/string_literals_help.rb +3 -5
  397. data/lib/rubocop/cop/mixin/surrounding_space.rb +22 -36
  398. data/lib/rubocop/cop/mixin/symbol_help.rb +13 -0
  399. data/lib/rubocop/cop/mixin/target_ruby_version.rb +5 -1
  400. data/lib/rubocop/cop/mixin/trailing_body.rb +2 -3
  401. data/lib/rubocop/cop/mixin/trailing_comma.rb +27 -34
  402. data/lib/rubocop/cop/mixin/uncommunicative_name.rb +31 -33
  403. data/lib/rubocop/cop/mixin/unused_argument.rb +5 -9
  404. data/lib/rubocop/cop/mixin/visibility_help.rb +37 -0
  405. data/lib/rubocop/cop/naming/accessor_method_name.rb +21 -5
  406. data/lib/rubocop/cop/naming/ascii_identifiers.rb +29 -11
  407. data/lib/rubocop/cop/naming/binary_operator_parameter_name.rb +18 -8
  408. data/lib/rubocop/cop/naming/block_forwarding.rb +121 -0
  409. data/lib/rubocop/cop/naming/{uncommunicative_block_param_name.rb → block_parameter_name.rb} +4 -4
  410. data/lib/rubocop/cop/naming/class_and_module_camel_case.rb +14 -4
  411. data/lib/rubocop/cop/naming/constant_name.rb +12 -9
  412. data/lib/rubocop/cop/naming/file_name.rb +81 -39
  413. data/lib/rubocop/cop/naming/heredoc_delimiter_case.rb +13 -7
  414. data/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb +9 -9
  415. data/lib/rubocop/cop/naming/inclusive_language.rb +266 -0
  416. data/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +136 -27
  417. data/lib/rubocop/cop/naming/method_name.rb +42 -3
  418. data/lib/rubocop/cop/naming/{uncommunicative_method_param_name.rb → method_parameter_name.rb} +4 -4
  419. data/lib/rubocop/cop/naming/predicate_name.rb +14 -17
  420. data/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb +163 -0
  421. data/lib/rubocop/cop/naming/variable_name.rb +5 -2
  422. data/lib/rubocop/cop/naming/variable_number.rb +94 -9
  423. data/lib/rubocop/cop/offense.rb +64 -19
  424. data/lib/rubocop/cop/registry.rb +122 -25
  425. data/lib/rubocop/cop/security/eval.rb +6 -4
  426. data/lib/rubocop/cop/security/io_methods.rb +49 -0
  427. data/lib/rubocop/cop/security/json_load.rb +18 -17
  428. data/lib/rubocop/cop/security/marshal_load.rb +6 -6
  429. data/lib/rubocop/cop/security/open.rb +30 -12
  430. data/lib/rubocop/cop/security/yaml_load.rb +14 -8
  431. data/lib/rubocop/cop/severity.rb +4 -14
  432. data/lib/rubocop/cop/style/access_modifier_declarations.rb +37 -12
  433. data/lib/rubocop/cop/style/accessor_grouping.rb +150 -0
  434. data/lib/rubocop/cop/style/alias.rb +52 -45
  435. data/lib/rubocop/cop/style/and_or.rb +36 -24
  436. data/lib/rubocop/cop/style/arguments_forwarding.rb +154 -0
  437. data/lib/rubocop/cop/style/array_coercion.rb +87 -0
  438. data/lib/rubocop/cop/style/array_join.rb +10 -10
  439. data/lib/rubocop/cop/style/ascii_comments.rb +7 -11
  440. data/lib/rubocop/cop/style/attr.rb +22 -14
  441. data/lib/rubocop/cop/style/auto_resource_cleanup.rb +10 -13
  442. data/lib/rubocop/cop/style/bare_percent_literals.rb +13 -15
  443. data/lib/rubocop/cop/style/begin_block.rb +3 -3
  444. data/lib/rubocop/cop/style/bisected_attr_accessor/macro.rb +60 -0
  445. data/lib/rubocop/cop/style/bisected_attr_accessor.rb +125 -0
  446. data/lib/rubocop/cop/style/block_comments.rb +24 -20
  447. data/lib/rubocop/cop/style/block_delimiters.rb +145 -30
  448. data/lib/rubocop/cop/style/case_equality.rb +54 -6
  449. data/lib/rubocop/cop/style/case_like_if.rb +263 -0
  450. data/lib/rubocop/cop/style/character_literal.rb +20 -16
  451. data/lib/rubocop/cop/style/class_and_module_children.rb +84 -44
  452. data/lib/rubocop/cop/style/class_check.rb +7 -12
  453. data/lib/rubocop/cop/style/class_equality_comparison.rb +67 -0
  454. data/lib/rubocop/cop/style/class_methods.rb +16 -30
  455. data/lib/rubocop/cop/style/class_methods_definitions.rb +157 -0
  456. data/lib/rubocop/cop/style/class_vars.rb +23 -7
  457. data/lib/rubocop/cop/style/collection_compact.rb +111 -0
  458. data/lib/rubocop/cop/style/collection_methods.rb +32 -21
  459. data/lib/rubocop/cop/style/colon_method_call.rb +9 -11
  460. data/lib/rubocop/cop/style/colon_method_definition.rb +7 -7
  461. data/lib/rubocop/cop/style/combinable_loops.rb +93 -0
  462. data/lib/rubocop/cop/style/command_literal.rb +24 -30
  463. data/lib/rubocop/cop/style/comment_annotation.rb +68 -35
  464. data/lib/rubocop/cop/style/commented_keyword.rb +39 -34
  465. data/lib/rubocop/cop/style/conditional_assignment.rb +123 -155
  466. data/lib/rubocop/cop/style/constant_visibility.rb +46 -6
  467. data/lib/rubocop/cop/style/copyright.rb +28 -27
  468. data/lib/rubocop/cop/style/date_time.rb +26 -10
  469. data/lib/rubocop/cop/style/def_with_parentheses.rb +9 -12
  470. data/lib/rubocop/cop/style/dir.rb +12 -13
  471. data/lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb +87 -0
  472. data/lib/rubocop/cop/style/document_dynamic_eval_definition.rb +169 -0
  473. data/lib/rubocop/cop/style/documentation.rb +113 -28
  474. data/lib/rubocop/cop/style/documentation_method.rb +48 -3
  475. data/lib/rubocop/cop/style/double_cop_disable_directive.rb +46 -0
  476. data/lib/rubocop/cop/style/double_negation.rb +76 -11
  477. data/lib/rubocop/cop/style/each_for_simple_loop.rb +8 -11
  478. data/lib/rubocop/cop/style/each_with_object.rb +21 -23
  479. data/lib/rubocop/cop/style/empty_block_parameter.rb +10 -11
  480. data/lib/rubocop/cop/style/empty_case_condition.rb +33 -27
  481. data/lib/rubocop/cop/style/empty_else.rb +16 -24
  482. data/lib/rubocop/cop/style/empty_lambda_parameter.rb +10 -11
  483. data/lib/rubocop/cop/style/empty_literal.rb +48 -33
  484. data/lib/rubocop/cop/style/empty_method.rb +15 -26
  485. data/lib/rubocop/cop/style/encoding.rb +30 -23
  486. data/lib/rubocop/cop/style/end_block.rb +7 -4
  487. data/lib/rubocop/cop/style/endless_method.rb +101 -0
  488. data/lib/rubocop/cop/style/eval_with_location.rb +146 -57
  489. data/lib/rubocop/cop/style/even_odd.rb +12 -14
  490. data/lib/rubocop/cop/style/expand_path_arguments.rb +34 -32
  491. data/lib/rubocop/cop/style/explicit_block_argument.rb +149 -0
  492. data/lib/rubocop/cop/style/exponential_notation.rb +116 -0
  493. data/lib/rubocop/cop/style/file_read.rb +112 -0
  494. data/lib/rubocop/cop/style/file_write.rb +124 -0
  495. data/lib/rubocop/cop/style/float_division.rb +151 -0
  496. data/lib/rubocop/cop/style/for.rb +9 -15
  497. data/lib/rubocop/cop/style/format_string.rb +58 -48
  498. data/lib/rubocop/cop/style/format_string_token.rb +85 -77
  499. data/lib/rubocop/cop/style/frozen_string_literal_comment.rb +118 -83
  500. data/lib/rubocop/cop/style/global_std_stream.rb +70 -0
  501. data/lib/rubocop/cop/style/global_vars.rb +3 -3
  502. data/lib/rubocop/cop/style/guard_clause.rb +65 -16
  503. data/lib/rubocop/cop/style/hash_as_last_array_item.rb +99 -0
  504. data/lib/rubocop/cop/style/hash_conversion.rb +134 -0
  505. data/lib/rubocop/cop/style/hash_each_methods.rb +108 -0
  506. data/lib/rubocop/cop/style/hash_except.rb +97 -0
  507. data/lib/rubocop/cop/style/hash_like_case.rb +77 -0
  508. data/lib/rubocop/cop/style/hash_syntax.rb +91 -50
  509. data/lib/rubocop/cop/style/hash_transform_keys.rb +90 -0
  510. data/lib/rubocop/cop/style/hash_transform_values.rb +90 -0
  511. data/lib/rubocop/cop/style/identical_conditional_branches.rb +92 -12
  512. data/lib/rubocop/cop/style/if_inside_else.rb +109 -4
  513. data/lib/rubocop/cop/style/if_unless_modifier.rb +148 -41
  514. data/lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb +12 -4
  515. data/lib/rubocop/cop/style/if_with_boolean_literal_branches.rb +136 -0
  516. data/lib/rubocop/cop/style/if_with_semicolon.rb +52 -4
  517. data/lib/rubocop/cop/style/implicit_runtime_error.rb +4 -2
  518. data/lib/rubocop/cop/style/in_pattern_then.rb +56 -0
  519. data/lib/rubocop/cop/style/infinite_loop.rb +33 -30
  520. data/lib/rubocop/cop/style/inline_comment.rb +5 -5
  521. data/lib/rubocop/cop/style/inverse_methods.rb +71 -46
  522. data/lib/rubocop/cop/style/ip_addresses.rb +8 -9
  523. data/lib/rubocop/cop/style/keyword_parameters_order.rb +75 -0
  524. data/lib/rubocop/cop/style/lambda.rb +21 -25
  525. data/lib/rubocop/cop/style/lambda_call.rb +18 -35
  526. data/lib/rubocop/cop/style/line_end_concatenation.rb +50 -37
  527. data/lib/rubocop/cop/style/map_to_hash.rb +68 -0
  528. data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +210 -0
  529. data/lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb +44 -0
  530. data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +95 -222
  531. data/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +19 -12
  532. data/lib/rubocop/cop/style/method_called_on_do_end_block.rb +15 -8
  533. data/lib/rubocop/cop/style/method_def_parentheses.rb +42 -27
  534. data/lib/rubocop/cop/style/min_max.rb +12 -16
  535. data/lib/rubocop/cop/style/missing_else.rb +21 -26
  536. data/lib/rubocop/cop/style/missing_respond_to_missing.rb +11 -5
  537. data/lib/rubocop/cop/style/mixin_grouping.rb +34 -49
  538. data/lib/rubocop/cop/style/mixin_usage.rb +15 -23
  539. data/lib/rubocop/cop/style/module_function.rb +76 -33
  540. data/lib/rubocop/cop/style/multiline_block_chain.rb +15 -7
  541. data/lib/rubocop/cop/style/multiline_if_modifier.rb +5 -12
  542. data/lib/rubocop/cop/style/multiline_if_then.rb +6 -12
  543. data/lib/rubocop/cop/style/multiline_in_pattern_then.rb +62 -0
  544. data/lib/rubocop/cop/style/multiline_memoization.rb +16 -14
  545. data/lib/rubocop/cop/style/multiline_method_signature.rb +34 -4
  546. data/lib/rubocop/cop/style/multiline_ternary_operator.rb +32 -11
  547. data/lib/rubocop/cop/style/multiline_when_then.rb +66 -0
  548. data/lib/rubocop/cop/style/multiple_comparison.rb +77 -12
  549. data/lib/rubocop/cop/style/mutable_constant.rb +120 -47
  550. data/lib/rubocop/cop/style/negated_if.rb +11 -12
  551. data/lib/rubocop/cop/style/negated_if_else_condition.rb +128 -0
  552. data/lib/rubocop/cop/style/negated_unless.rb +88 -0
  553. data/lib/rubocop/cop/style/negated_while.rb +7 -15
  554. data/lib/rubocop/cop/style/nested_modifier.rb +34 -23
  555. data/lib/rubocop/cop/style/nested_parenthesized_calls.rb +26 -23
  556. data/lib/rubocop/cop/style/nested_ternary_operator.rb +30 -4
  557. data/lib/rubocop/cop/style/next.rb +42 -51
  558. data/lib/rubocop/cop/style/nil_comparison.rb +21 -13
  559. data/lib/rubocop/cop/style/nil_lambda.rb +70 -0
  560. data/lib/rubocop/cop/style/non_nil_check.rb +76 -42
  561. data/lib/rubocop/cop/style/not.rb +23 -29
  562. data/lib/rubocop/cop/style/numbered_parameters.rb +46 -0
  563. data/lib/rubocop/cop/style/numbered_parameters_limit.rb +50 -0
  564. data/lib/rubocop/cop/style/numeric_literal_prefix.rb +11 -16
  565. data/lib/rubocop/cop/style/numeric_literals.rb +36 -32
  566. data/lib/rubocop/cop/style/numeric_predicate.rb +27 -37
  567. data/lib/rubocop/cop/style/one_line_conditional.rb +61 -34
  568. data/lib/rubocop/cop/style/open_struct_use.rb +69 -0
  569. data/lib/rubocop/cop/style/option_hash.rb +8 -9
  570. data/lib/rubocop/cop/style/optional_arguments.rb +8 -10
  571. data/lib/rubocop/cop/style/optional_boolean_parameter.rb +63 -0
  572. data/lib/rubocop/cop/style/or_assignment.rb +23 -16
  573. data/lib/rubocop/cop/style/parallel_assignment.rb +30 -27
  574. data/lib/rubocop/cop/style/parentheses_around_condition.rb +34 -9
  575. data/lib/rubocop/cop/style/percent_literal_delimiters.rb +22 -30
  576. data/lib/rubocop/cop/style/percent_q_literals.rb +12 -15
  577. data/lib/rubocop/cop/style/perl_backrefs.rb +84 -16
  578. data/lib/rubocop/cop/style/preferred_hash_methods.rb +22 -23
  579. data/lib/rubocop/cop/style/proc.rb +9 -9
  580. data/lib/rubocop/cop/style/quoted_symbols.rb +124 -0
  581. data/lib/rubocop/cop/style/raise_args.rb +41 -37
  582. data/lib/rubocop/cop/style/random_with_offset.rb +70 -78
  583. data/lib/rubocop/cop/style/redundant_argument.rb +95 -0
  584. data/lib/rubocop/cop/style/redundant_assignment.rb +106 -0
  585. data/lib/rubocop/cop/style/redundant_begin.rb +101 -14
  586. data/lib/rubocop/cop/style/{unneeded_capital_w.rb → redundant_capital_w.rb} +7 -11
  587. data/lib/rubocop/cop/style/redundant_condition.rb +136 -0
  588. data/lib/rubocop/cop/style/redundant_conditional.rb +16 -17
  589. data/lib/rubocop/cop/style/redundant_exception.rb +25 -20
  590. data/lib/rubocop/cop/style/redundant_fetch_block.rb +119 -0
  591. data/lib/rubocop/cop/style/redundant_file_extension_in_require.rb +61 -0
  592. data/lib/rubocop/cop/style/redundant_freeze.rb +17 -15
  593. data/lib/rubocop/cop/style/redundant_interpolation.rb +117 -0
  594. data/lib/rubocop/cop/style/redundant_parentheses.rb +71 -49
  595. data/lib/rubocop/cop/style/{unneeded_percent_q.rb → redundant_percent_q.rb} +22 -26
  596. data/lib/rubocop/cop/style/redundant_regexp_character_class.rb +108 -0
  597. data/lib/rubocop/cop/style/redundant_regexp_escape.rb +118 -0
  598. data/lib/rubocop/cop/style/redundant_return.rb +64 -62
  599. data/lib/rubocop/cop/style/redundant_self.rb +71 -24
  600. data/lib/rubocop/cop/style/redundant_self_assignment.rb +119 -0
  601. data/lib/rubocop/cop/style/redundant_self_assignment_branch.rb +83 -0
  602. data/lib/rubocop/cop/{performance/unneeded_sort.rb → style/redundant_sort.rb} +67 -39
  603. data/lib/rubocop/cop/{performance → style}/redundant_sort_by.rb +9 -12
  604. data/lib/rubocop/cop/style/regexp_literal.rb +27 -33
  605. data/lib/rubocop/cop/style/rescue_modifier.rb +64 -13
  606. data/lib/rubocop/cop/style/rescue_standard_error.rb +27 -25
  607. data/lib/rubocop/cop/style/return_nil.rb +17 -11
  608. data/lib/rubocop/cop/style/safe_navigation.rb +78 -44
  609. data/lib/rubocop/cop/{performance → style}/sample.rb +22 -22
  610. data/lib/rubocop/cop/style/select_by_regexp.rb +139 -0
  611. data/lib/rubocop/cop/style/self_assignment.rb +27 -23
  612. data/lib/rubocop/cop/style/semicolon.rb +50 -31
  613. data/lib/rubocop/cop/style/send.rb +5 -7
  614. data/lib/rubocop/cop/style/signal_exception.rb +33 -28
  615. data/lib/rubocop/cop/style/single_argument_dig.rb +60 -0
  616. data/lib/rubocop/cop/style/single_line_block_params.rb +38 -14
  617. data/lib/rubocop/cop/style/single_line_methods.rb +90 -21
  618. data/lib/rubocop/cop/style/slicing_with_range.rb +51 -0
  619. data/lib/rubocop/cop/style/sole_nested_conditional.rb +182 -0
  620. data/lib/rubocop/cop/style/special_global_vars.rb +52 -62
  621. data/lib/rubocop/cop/style/stabby_lambda_parentheses.rb +19 -26
  622. data/lib/rubocop/cop/style/static_class.rb +97 -0
  623. data/lib/rubocop/cop/style/stderr_puts.rb +15 -14
  624. data/lib/rubocop/cop/style/string_chars.rb +41 -0
  625. data/lib/rubocop/cop/style/string_concatenation.rb +173 -0
  626. data/lib/rubocop/cop/style/string_hash_keys.rb +16 -10
  627. data/lib/rubocop/cop/style/string_literals.rb +20 -16
  628. data/lib/rubocop/cop/style/string_literals_in_interpolation.rb +5 -3
  629. data/lib/rubocop/cop/style/string_methods.rb +8 -18
  630. data/lib/rubocop/cop/style/strip.rb +42 -0
  631. data/lib/rubocop/cop/style/struct_inheritance.rb +49 -9
  632. data/lib/rubocop/cop/style/swap_values.rb +112 -0
  633. data/lib/rubocop/cop/style/symbol_array.rb +15 -26
  634. data/lib/rubocop/cop/style/symbol_literal.rb +6 -10
  635. data/lib/rubocop/cop/style/symbol_proc.rb +81 -57
  636. data/lib/rubocop/cop/style/ternary_parentheses.rb +77 -39
  637. data/lib/rubocop/cop/style/top_level_method_definition.rb +83 -0
  638. data/lib/rubocop/cop/style/trailing_body_on_class.rb +4 -7
  639. data/lib/rubocop/cop/style/trailing_body_on_method_definition.rb +10 -9
  640. data/lib/rubocop/cop/style/trailing_body_on_module.rb +4 -7
  641. data/lib/rubocop/cop/style/trailing_comma_in_arguments.rb +39 -25
  642. data/lib/rubocop/cop/style/trailing_comma_in_array_literal.rb +43 -5
  643. data/lib/rubocop/cop/style/trailing_comma_in_block_args.rb +105 -0
  644. data/lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb +46 -5
  645. data/lib/rubocop/cop/style/trailing_method_end_statement.rb +12 -40
  646. data/lib/rubocop/cop/style/trailing_underscore_variable.rb +24 -33
  647. data/lib/rubocop/cop/style/trivial_accessors.rb +105 -44
  648. data/lib/rubocop/cop/style/unless_else.rb +8 -13
  649. data/lib/rubocop/cop/style/unless_logical_operators.rb +105 -0
  650. data/lib/rubocop/cop/style/unpack_first.rb +7 -13
  651. data/lib/rubocop/cop/style/variable_interpolation.rb +12 -25
  652. data/lib/rubocop/cop/style/when_then.rb +7 -7
  653. data/lib/rubocop/cop/style/while_until_do.rb +7 -17
  654. data/lib/rubocop/cop/style/while_until_modifier.rb +17 -25
  655. data/lib/rubocop/cop/style/word_array.rb +27 -28
  656. data/lib/rubocop/cop/style/yoda_condition.rb +63 -31
  657. data/lib/rubocop/cop/style/zero_length_predicate.rb +38 -30
  658. data/lib/rubocop/cop/team.rb +160 -91
  659. data/lib/rubocop/cop/util.rb +71 -33
  660. data/lib/rubocop/cop/utils/format_string.rb +133 -0
  661. data/lib/rubocop/cop/variable_force/assignment.rb +2 -2
  662. data/lib/rubocop/cop/variable_force/branch.rb +18 -9
  663. data/lib/rubocop/cop/variable_force/reference.rb +1 -3
  664. data/lib/rubocop/cop/variable_force/scope.rb +9 -12
  665. data/lib/rubocop/cop/variable_force/variable.rb +22 -12
  666. data/lib/rubocop/cop/variable_force/variable_table.rb +2 -2
  667. data/lib/rubocop/cop/variable_force.rb +22 -32
  668. data/lib/rubocop/cops_documentation_generator.rb +282 -0
  669. data/lib/rubocop/core_ext/string.rb +2 -26
  670. data/lib/rubocop/directive_comment.rb +144 -0
  671. data/lib/rubocop/error.rb +24 -0
  672. data/lib/rubocop/ext/processed_source.rb +18 -0
  673. data/lib/rubocop/ext/regexp_node.rb +87 -0
  674. data/lib/rubocop/ext/regexp_parser.rb +92 -0
  675. data/lib/rubocop/file_finder.rb +12 -18
  676. data/lib/rubocop/formatter/auto_gen_config_formatter.rb +2 -1
  677. data/lib/rubocop/formatter/base_formatter.rb +0 -4
  678. data/lib/rubocop/formatter/clang_style_formatter.rb +13 -8
  679. data/lib/rubocop/formatter/disabled_config_formatter.rb +55 -27
  680. data/lib/rubocop/formatter/emacs_style_formatter.rb +24 -9
  681. data/lib/rubocop/formatter/file_list_formatter.rb +1 -1
  682. data/lib/rubocop/formatter/formatter_set.rb +20 -19
  683. data/lib/rubocop/formatter/fuubar_style_formatter.rb +1 -1
  684. data/lib/rubocop/formatter/git_hub_actions_formatter.rb +44 -0
  685. data/lib/rubocop/formatter/html_formatter.rb +16 -17
  686. data/lib/rubocop/formatter/json_formatter.rb +20 -20
  687. data/lib/rubocop/formatter/junit_formatter.rb +93 -0
  688. data/lib/rubocop/formatter/offense_count_formatter.rb +2 -2
  689. data/lib/rubocop/formatter/pacman_formatter.rb +80 -0
  690. data/lib/rubocop/formatter/progress_formatter.rb +4 -5
  691. data/lib/rubocop/formatter/quiet_formatter.rb +1 -1
  692. data/lib/rubocop/formatter/simple_text_formatter.rb +61 -16
  693. data/lib/rubocop/formatter/tap_formatter.rb +23 -8
  694. data/lib/rubocop/formatter/worst_offenders_formatter.rb +2 -2
  695. data/lib/rubocop/lockfile.rb +40 -0
  696. data/lib/rubocop/magic_comment.rb +80 -18
  697. data/lib/rubocop/name_similarity.rb +18 -10
  698. data/lib/rubocop/options.rb +301 -222
  699. data/lib/rubocop/path_util.rb +20 -22
  700. data/lib/rubocop/platform.rb +1 -1
  701. data/lib/rubocop/rake_task.rb +14 -12
  702. data/lib/rubocop/remote_config.rb +18 -14
  703. data/lib/rubocop/result_cache.rb +71 -36
  704. data/lib/rubocop/rspec/cop_helper.rb +11 -36
  705. data/lib/rubocop/rspec/expect_offense.rb +139 -43
  706. data/lib/rubocop/rspec/parallel_formatter.rb +90 -0
  707. data/lib/rubocop/rspec/shared_contexts.rb +86 -45
  708. data/lib/rubocop/rspec/support.rb +1 -1
  709. data/lib/rubocop/runner.rb +147 -85
  710. data/lib/rubocop/string_interpreter.rb +10 -7
  711. data/lib/rubocop/target_finder.rb +72 -53
  712. data/lib/rubocop/target_ruby.rb +264 -0
  713. data/lib/rubocop/util.rb +16 -0
  714. data/lib/rubocop/version.rb +71 -7
  715. data/lib/rubocop/yaml_duplication_checker.rb +10 -3
  716. data/lib/rubocop.rb +241 -169
  717. metadata +301 -216
  718. data/bin/console +0 -9
  719. data/bin/setup +0 -7
  720. data/lib/rubocop/ast/builder.rb +0 -75
  721. data/lib/rubocop/ast/node/and_node.rb +0 -29
  722. data/lib/rubocop/ast/node/args_node.rb +0 -29
  723. data/lib/rubocop/ast/node/array_node.rb +0 -57
  724. data/lib/rubocop/ast/node/block_node.rb +0 -115
  725. data/lib/rubocop/ast/node/break_node.rb +0 -17
  726. data/lib/rubocop/ast/node/case_node.rb +0 -56
  727. data/lib/rubocop/ast/node/def_node.rb +0 -71
  728. data/lib/rubocop/ast/node/defined_node.rb +0 -17
  729. data/lib/rubocop/ast/node/ensure_node.rb +0 -17
  730. data/lib/rubocop/ast/node/for_node.rb +0 -53
  731. data/lib/rubocop/ast/node/hash_node.rb +0 -109
  732. data/lib/rubocop/ast/node/if_node.rb +0 -175
  733. data/lib/rubocop/ast/node/keyword_splat_node.rb +0 -45
  734. data/lib/rubocop/ast/node/mixin/basic_literal_node.rb +0 -16
  735. data/lib/rubocop/ast/node/mixin/binary_operator_node.rb +0 -43
  736. data/lib/rubocop/ast/node/mixin/collection_node.rb +0 -15
  737. data/lib/rubocop/ast/node/mixin/conditional_node.rb +0 -45
  738. data/lib/rubocop/ast/node/mixin/hash_element_node.rb +0 -125
  739. data/lib/rubocop/ast/node/mixin/method_dispatch_node.rb +0 -251
  740. data/lib/rubocop/ast/node/mixin/method_identifier_predicates.rb +0 -114
  741. data/lib/rubocop/ast/node/mixin/modifier_node.rb +0 -17
  742. data/lib/rubocop/ast/node/mixin/parameterized_node.rb +0 -61
  743. data/lib/rubocop/ast/node/mixin/predicate_operator_node.rb +0 -35
  744. data/lib/rubocop/ast/node/or_node.rb +0 -29
  745. data/lib/rubocop/ast/node/pair_node.rb +0 -63
  746. data/lib/rubocop/ast/node/range_node.rb +0 -11
  747. data/lib/rubocop/ast/node/regexp_node.rb +0 -35
  748. data/lib/rubocop/ast/node/resbody_node.rb +0 -17
  749. data/lib/rubocop/ast/node/retry_node.rb +0 -17
  750. data/lib/rubocop/ast/node/send_node.rb +0 -13
  751. data/lib/rubocop/ast/node/str_node.rb +0 -16
  752. data/lib/rubocop/ast/node/super_node.rb +0 -21
  753. data/lib/rubocop/ast/node/symbol_node.rb +0 -12
  754. data/lib/rubocop/ast/node/until_node.rb +0 -35
  755. data/lib/rubocop/ast/node/when_node.rb +0 -53
  756. data/lib/rubocop/ast/node/while_node.rb +0 -35
  757. data/lib/rubocop/ast/node/yield_node.rb +0 -21
  758. data/lib/rubocop/ast/node.rb +0 -642
  759. data/lib/rubocop/ast/sexp.rb +0 -16
  760. data/lib/rubocop/ast/traversal.rb +0 -183
  761. data/lib/rubocop/cop/layout/align_array.rb +0 -39
  762. data/lib/rubocop/cop/layout/align_parameters.rb +0 -94
  763. data/lib/rubocop/cop/layout/indent_heredoc.rb +0 -294
  764. data/lib/rubocop/cop/layout/tab.rb +0 -87
  765. data/lib/rubocop/cop/lint/end_in_method.rb +0 -40
  766. data/lib/rubocop/cop/lint/handle_exceptions.rb +0 -56
  767. data/lib/rubocop/cop/lint/multiple_compare.rb +0 -48
  768. data/lib/rubocop/cop/lint/unneeded_cop_disable_directive.rb +0 -263
  769. data/lib/rubocop/cop/lint/unneeded_cop_enable_directive.rb +0 -116
  770. data/lib/rubocop/cop/lint/useless_comparison.rb +0 -28
  771. data/lib/rubocop/cop/metrics/line_length.rb +0 -204
  772. data/lib/rubocop/cop/mixin/classish_length.rb +0 -37
  773. data/lib/rubocop/cop/mixin/parser_diagnostic.rb +0 -37
  774. data/lib/rubocop/cop/mixin/safe_mode.rb +0 -22
  775. data/lib/rubocop/cop/mixin/target_rails_version.rb +0 -16
  776. data/lib/rubocop/cop/mixin/too_many_lines.rb +0 -39
  777. data/lib/rubocop/cop/performance/caller.rb +0 -69
  778. data/lib/rubocop/cop/performance/case_when_splat.rb +0 -177
  779. data/lib/rubocop/cop/performance/casecmp.rb +0 -108
  780. data/lib/rubocop/cop/performance/chain_array_allocation.rb +0 -78
  781. data/lib/rubocop/cop/performance/compare_with_block.rb +0 -122
  782. data/lib/rubocop/cop/performance/count.rb +0 -102
  783. data/lib/rubocop/cop/performance/detect.rb +0 -110
  784. data/lib/rubocop/cop/performance/double_start_end_with.rb +0 -94
  785. data/lib/rubocop/cop/performance/end_with.rb +0 -56
  786. data/lib/rubocop/cop/performance/fixed_size.rb +0 -97
  787. data/lib/rubocop/cop/performance/flat_map.rb +0 -78
  788. data/lib/rubocop/cop/performance/inefficient_hash_search.rb +0 -99
  789. data/lib/rubocop/cop/performance/lstrip_rstrip.rb +0 -46
  790. data/lib/rubocop/cop/performance/open_struct.rb +0 -46
  791. data/lib/rubocop/cop/performance/range_include.rb +0 -50
  792. data/lib/rubocop/cop/performance/redundant_block_call.rb +0 -93
  793. data/lib/rubocop/cop/performance/redundant_match.rb +0 -56
  794. data/lib/rubocop/cop/performance/redundant_merge.rb +0 -183
  795. data/lib/rubocop/cop/performance/regexp_match.rb +0 -265
  796. data/lib/rubocop/cop/performance/reverse_each.rb +0 -42
  797. data/lib/rubocop/cop/performance/size.rb +0 -77
  798. data/lib/rubocop/cop/performance/start_with.rb +0 -59
  799. data/lib/rubocop/cop/performance/string_replacement.rb +0 -173
  800. data/lib/rubocop/cop/performance/times_map.rb +0 -71
  801. data/lib/rubocop/cop/performance/unfreeze_string.rb +0 -50
  802. data/lib/rubocop/cop/performance/uri_default_parser.rb +0 -47
  803. data/lib/rubocop/cop/rails/action_filter.rb +0 -117
  804. data/lib/rubocop/cop/rails/active_record_aliases.rb +0 -48
  805. data/lib/rubocop/cop/rails/active_support_aliases.rb +0 -69
  806. data/lib/rubocop/cop/rails/application_job.rb +0 -40
  807. data/lib/rubocop/cop/rails/application_record.rb +0 -40
  808. data/lib/rubocop/cop/rails/assert_not.rb +0 -44
  809. data/lib/rubocop/cop/rails/belongs_to.rb +0 -120
  810. data/lib/rubocop/cop/rails/blank.rb +0 -158
  811. data/lib/rubocop/cop/rails/bulk_change_table.rb +0 -289
  812. data/lib/rubocop/cop/rails/create_table_with_timestamps.rb +0 -91
  813. data/lib/rubocop/cop/rails/date.rb +0 -156
  814. data/lib/rubocop/cop/rails/delegate.rb +0 -135
  815. data/lib/rubocop/cop/rails/delegate_allow_blank.rb +0 -51
  816. data/lib/rubocop/cop/rails/dynamic_find_by.rb +0 -91
  817. data/lib/rubocop/cop/rails/enum_uniqueness.rb +0 -45
  818. data/lib/rubocop/cop/rails/environment_comparison.rb +0 -66
  819. data/lib/rubocop/cop/rails/exit.rb +0 -67
  820. data/lib/rubocop/cop/rails/file_path.rb +0 -108
  821. data/lib/rubocop/cop/rails/find_by.rb +0 -55
  822. data/lib/rubocop/cop/rails/find_each.rb +0 -52
  823. data/lib/rubocop/cop/rails/has_and_belongs_to_many.rb +0 -25
  824. data/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb +0 -106
  825. data/lib/rubocop/cop/rails/http_positional_arguments.rb +0 -117
  826. data/lib/rubocop/cop/rails/http_status.rb +0 -186
  827. data/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb +0 -94
  828. data/lib/rubocop/cop/rails/inverse_of.rb +0 -246
  829. data/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb +0 -149
  830. data/lib/rubocop/cop/rails/link_to_blank.rb +0 -90
  831. data/lib/rubocop/cop/rails/not_null_column.rb +0 -67
  832. data/lib/rubocop/cop/rails/output.rb +0 -49
  833. data/lib/rubocop/cop/rails/output_safety.rb +0 -99
  834. data/lib/rubocop/cop/rails/pluralization_grammar.rb +0 -107
  835. data/lib/rubocop/cop/rails/presence.rb +0 -124
  836. data/lib/rubocop/cop/rails/present.rb +0 -149
  837. data/lib/rubocop/cop/rails/read_write_attribute.rb +0 -74
  838. data/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb +0 -135
  839. data/lib/rubocop/cop/rails/reflection_class_name.rb +0 -38
  840. data/lib/rubocop/cop/rails/refute_methods.rb +0 -76
  841. data/lib/rubocop/cop/rails/relative_date_constant.rb +0 -93
  842. data/lib/rubocop/cop/rails/request_referer.rb +0 -56
  843. data/lib/rubocop/cop/rails/reversible_migration.rb +0 -286
  844. data/lib/rubocop/cop/rails/safe_navigation.rb +0 -91
  845. data/lib/rubocop/cop/rails/save_bang.rb +0 -316
  846. data/lib/rubocop/cop/rails/scope_args.rb +0 -29
  847. data/lib/rubocop/cop/rails/skips_model_validations.rb +0 -88
  848. data/lib/rubocop/cop/rails/time_zone.rb +0 -231
  849. data/lib/rubocop/cop/rails/uniq_before_pluck.rb +0 -105
  850. data/lib/rubocop/cop/rails/unknown_env.rb +0 -63
  851. data/lib/rubocop/cop/rails/validation.rb +0 -106
  852. data/lib/rubocop/cop/style/braces_around_hash_parameters.rb +0 -190
  853. data/lib/rubocop/cop/style/method_missing_super.rb +0 -34
  854. data/lib/rubocop/cop/style/unneeded_condition.rb +0 -112
  855. data/lib/rubocop/cop/style/unneeded_interpolation.rb +0 -98
  856. data/lib/rubocop/formatter/disabled_lines_formatter.rb +0 -57
  857. data/lib/rubocop/node_pattern.rb +0 -584
  858. data/lib/rubocop/processed_source.rb +0 -210
  859. data/lib/rubocop/rspec/shared_examples.rb +0 -59
  860. data/lib/rubocop/string_util.rb +0 -14
  861. data/lib/rubocop/token.rb +0 -114
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.66.0
4
+ version: 1.25.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
@@ -10,90 +10,110 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2019-03-18 00:00:00.000000000 Z
13
+ date: 2022-02-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: jaro_winkler
16
+ name: parallel
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 1.5.1
21
+ version: '1.10'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: 1.5.1
28
+ version: '1.10'
29
29
  - !ruby/object:Gem::Dependency
30
- name: parallel
30
+ name: parser
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - "~>"
33
+ - - ">="
34
34
  - !ruby/object:Gem::Version
35
- version: '1.10'
35
+ version: 3.1.0.0
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - "~>"
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: '1.10'
42
+ version: 3.1.0.0
43
43
  - !ruby/object:Gem::Dependency
44
- name: parser
44
+ name: rainbow
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: '2.5'
50
- - - "!="
49
+ version: 2.2.2
50
+ - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: 2.5.1.1
52
+ version: '4.0'
53
53
  type: :runtime
54
54
  prerelease: false
55
55
  version_requirements: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: '2.5'
60
- - - "!="
59
+ version: 2.2.2
60
+ - - "<"
61
61
  - !ruby/object:Gem::Version
62
- version: 2.5.1.1
62
+ version: '4.0'
63
63
  - !ruby/object:Gem::Dependency
64
- name: psych
64
+ name: regexp_parser
65
65
  requirement: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: 3.1.0
69
+ version: '1.8'
70
+ - - "<"
71
+ - !ruby/object:Gem::Version
72
+ version: '3.0'
70
73
  type: :runtime
71
74
  prerelease: false
72
75
  version_requirements: !ruby/object:Gem::Requirement
73
76
  requirements:
74
77
  - - ">="
75
78
  - !ruby/object:Gem::Version
76
- version: 3.1.0
79
+ version: '1.8'
80
+ - - "<"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.0'
77
83
  - !ruby/object:Gem::Dependency
78
- name: rainbow
84
+ name: rexml
79
85
  requirement: !ruby/object:Gem::Requirement
80
86
  requirements:
81
87
  - - ">="
82
88
  - !ruby/object:Gem::Version
83
- version: 2.2.2
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop-ast
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: 1.15.1
84
104
  - - "<"
85
105
  - !ruby/object:Gem::Version
86
- version: '4.0'
106
+ version: '2.0'
87
107
  type: :runtime
88
108
  prerelease: false
89
109
  version_requirements: !ruby/object:Gem::Requirement
90
110
  requirements:
91
111
  - - ">="
92
112
  - !ruby/object:Gem::Version
93
- version: 2.2.2
113
+ version: 1.15.1
94
114
  - - "<"
95
115
  - !ruby/object:Gem::Version
96
- version: '4.0'
116
+ version: '2.0'
97
117
  - !ruby/object:Gem::Dependency
98
118
  name: ruby-progressbar
99
119
  requirement: !ruby/object:Gem::Requirement
@@ -117,7 +137,7 @@ dependencies:
117
137
  version: 1.4.0
118
138
  - - "<"
119
139
  - !ruby/object:Gem::Version
120
- version: '1.6'
140
+ version: '3.0'
121
141
  type: :runtime
122
142
  prerelease: false
123
143
  version_requirements: !ruby/object:Gem::Requirement
@@ -127,14 +147,14 @@ dependencies:
127
147
  version: 1.4.0
128
148
  - - "<"
129
149
  - !ruby/object:Gem::Version
130
- version: '1.6'
150
+ version: '3.0'
131
151
  - !ruby/object:Gem::Dependency
132
152
  name: bundler
133
153
  requirement: !ruby/object:Gem::Requirement
134
154
  requirements:
135
155
  - - ">="
136
156
  - !ruby/object:Gem::Version
137
- version: 1.3.0
157
+ version: 1.15.0
138
158
  - - "<"
139
159
  - !ruby/object:Gem::Version
140
160
  version: '3.0'
@@ -144,27 +164,13 @@ dependencies:
144
164
  requirements:
145
165
  - - ">="
146
166
  - !ruby/object:Gem::Version
147
- version: 1.3.0
167
+ version: 1.15.0
148
168
  - - "<"
149
169
  - !ruby/object:Gem::Version
150
170
  version: '3.0'
151
- - !ruby/object:Gem::Dependency
152
- name: rack
153
- requirement: !ruby/object:Gem::Requirement
154
- requirements:
155
- - - ">="
156
- - !ruby/object:Gem::Version
157
- version: '2.0'
158
- type: :development
159
- prerelease: false
160
- version_requirements: !ruby/object:Gem::Requirement
161
- requirements:
162
- - - ">="
163
- - !ruby/object:Gem::Version
164
- version: '2.0'
165
171
  description: |2
166
- Automatic Ruby code style checking tool.
167
- Aims to enforce the community-driven Ruby Style Guide.
172
+ RuboCop is a Ruby code style checking and code formatting tool.
173
+ It aims to enforce the community-driven Ruby Style Guide.
168
174
  email: rubocop@googlegroups.com
169
175
  executables:
170
176
  - rubocop
@@ -177,63 +183,47 @@ files:
177
183
  - README.md
178
184
  - assets/logo.png
179
185
  - assets/output.html.erb
180
- - bin/console
181
- - bin/setup
182
186
  - config/default.yml
187
+ - config/obsoletion.yml
183
188
  - exe/rubocop
184
189
  - lib/rubocop.rb
185
- - lib/rubocop/ast/builder.rb
186
- - lib/rubocop/ast/node.rb
187
- - lib/rubocop/ast/node/and_node.rb
188
- - lib/rubocop/ast/node/args_node.rb
189
- - lib/rubocop/ast/node/array_node.rb
190
- - lib/rubocop/ast/node/block_node.rb
191
- - lib/rubocop/ast/node/break_node.rb
192
- - lib/rubocop/ast/node/case_node.rb
193
- - lib/rubocop/ast/node/def_node.rb
194
- - lib/rubocop/ast/node/defined_node.rb
195
- - lib/rubocop/ast/node/ensure_node.rb
196
- - lib/rubocop/ast/node/for_node.rb
197
- - lib/rubocop/ast/node/hash_node.rb
198
- - lib/rubocop/ast/node/if_node.rb
199
- - lib/rubocop/ast/node/keyword_splat_node.rb
200
- - lib/rubocop/ast/node/mixin/basic_literal_node.rb
201
- - lib/rubocop/ast/node/mixin/binary_operator_node.rb
202
- - lib/rubocop/ast/node/mixin/collection_node.rb
203
- - lib/rubocop/ast/node/mixin/conditional_node.rb
204
- - lib/rubocop/ast/node/mixin/hash_element_node.rb
205
- - lib/rubocop/ast/node/mixin/method_dispatch_node.rb
206
- - lib/rubocop/ast/node/mixin/method_identifier_predicates.rb
207
- - lib/rubocop/ast/node/mixin/modifier_node.rb
208
- - lib/rubocop/ast/node/mixin/parameterized_node.rb
209
- - lib/rubocop/ast/node/mixin/predicate_operator_node.rb
210
- - lib/rubocop/ast/node/or_node.rb
211
- - lib/rubocop/ast/node/pair_node.rb
212
- - lib/rubocop/ast/node/range_node.rb
213
- - lib/rubocop/ast/node/regexp_node.rb
214
- - lib/rubocop/ast/node/resbody_node.rb
215
- - lib/rubocop/ast/node/retry_node.rb
216
- - lib/rubocop/ast/node/send_node.rb
217
- - lib/rubocop/ast/node/str_node.rb
218
- - lib/rubocop/ast/node/super_node.rb
219
- - lib/rubocop/ast/node/symbol_node.rb
220
- - lib/rubocop/ast/node/until_node.rb
221
- - lib/rubocop/ast/node/when_node.rb
222
- - lib/rubocop/ast/node/while_node.rb
223
- - lib/rubocop/ast/node/yield_node.rb
224
- - lib/rubocop/ast/sexp.rb
225
- - lib/rubocop/ast/traversal.rb
190
+ - lib/rubocop/ast_aliases.rb
226
191
  - lib/rubocop/cached_data.rb
227
192
  - lib/rubocop/cli.rb
193
+ - lib/rubocop/cli/command.rb
194
+ - lib/rubocop/cli/command/auto_genenerate_config.rb
195
+ - lib/rubocop/cli/command/base.rb
196
+ - lib/rubocop/cli/command/execute_runner.rb
197
+ - lib/rubocop/cli/command/init_dotfile.rb
198
+ - lib/rubocop/cli/command/show_cops.rb
199
+ - lib/rubocop/cli/command/show_docs_url.rb
200
+ - lib/rubocop/cli/command/suggest_extensions.rb
201
+ - lib/rubocop/cli/command/version.rb
202
+ - lib/rubocop/cli/environment.rb
228
203
  - lib/rubocop/comment_config.rb
229
204
  - lib/rubocop/config.rb
230
205
  - lib/rubocop/config_loader.rb
231
206
  - lib/rubocop/config_loader_resolver.rb
207
+ - lib/rubocop/config_obsoletion.rb
208
+ - lib/rubocop/config_obsoletion/changed_enforced_styles.rb
209
+ - lib/rubocop/config_obsoletion/changed_parameter.rb
210
+ - lib/rubocop/config_obsoletion/cop_rule.rb
211
+ - lib/rubocop/config_obsoletion/extracted_cop.rb
212
+ - lib/rubocop/config_obsoletion/parameter_rule.rb
213
+ - lib/rubocop/config_obsoletion/removed_cop.rb
214
+ - lib/rubocop/config_obsoletion/renamed_cop.rb
215
+ - lib/rubocop/config_obsoletion/rule.rb
216
+ - lib/rubocop/config_obsoletion/split_cop.rb
217
+ - lib/rubocop/config_regeneration.rb
232
218
  - lib/rubocop/config_store.rb
219
+ - lib/rubocop/config_validator.rb
233
220
  - lib/rubocop/cop/autocorrect_logic.rb
234
221
  - lib/rubocop/cop/badge.rb
222
+ - lib/rubocop/cop/base.rb
235
223
  - lib/rubocop/cop/bundler/duplicated_gem.rb
236
224
  - lib/rubocop/cop/bundler/gem_comment.rb
225
+ - lib/rubocop/cop/bundler/gem_filename.rb
226
+ - lib/rubocop/cop/bundler/gem_version.rb
237
227
  - lib/rubocop/cop/bundler/insecure_protocol_source.rb
238
228
  - lib/rubocop/cop/bundler/ordered_gems.rb
239
229
  - lib/rubocop/cop/commissioner.rb
@@ -244,6 +234,7 @@ files:
244
234
  - lib/rubocop/cop/correctors/each_to_for_corrector.rb
245
235
  - lib/rubocop/cop/correctors/empty_line_corrector.rb
246
236
  - lib/rubocop/cop/correctors/for_to_each_corrector.rb
237
+ - lib/rubocop/cop/correctors/if_then_corrector.rb
247
238
  - lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb
248
239
  - lib/rubocop/cop/correctors/line_break_corrector.rb
249
240
  - lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb
@@ -251,28 +242,46 @@ files:
251
242
  - lib/rubocop/cop/correctors/parentheses_corrector.rb
252
243
  - lib/rubocop/cop/correctors/percent_literal_corrector.rb
253
244
  - lib/rubocop/cop/correctors/punctuation_corrector.rb
245
+ - lib/rubocop/cop/correctors/require_library_corrector.rb
254
246
  - lib/rubocop/cop/correctors/space_corrector.rb
255
247
  - lib/rubocop/cop/correctors/string_literal_corrector.rb
256
248
  - lib/rubocop/cop/correctors/unused_arg_corrector.rb
249
+ - lib/rubocop/cop/documentation.rb
250
+ - lib/rubocop/cop/exclude_limit.rb
257
251
  - lib/rubocop/cop/force.rb
252
+ - lib/rubocop/cop/gemspec/date_assignment.rb
258
253
  - lib/rubocop/cop/gemspec/duplicated_assignment.rb
259
254
  - lib/rubocop/cop/gemspec/ordered_dependencies.rb
255
+ - lib/rubocop/cop/gemspec/require_mfa.rb
260
256
  - lib/rubocop/cop/gemspec/required_ruby_version.rb
257
+ - lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb
261
258
  - lib/rubocop/cop/generator.rb
262
259
  - lib/rubocop/cop/generator/configuration_injector.rb
263
260
  - lib/rubocop/cop/generator/require_file_injector.rb
264
261
  - lib/rubocop/cop/ignored_node.rb
265
262
  - lib/rubocop/cop/internal_affairs.rb
263
+ - lib/rubocop/cop/internal_affairs/empty_line_between_expect_offense_and_correction.rb
264
+ - lib/rubocop/cop/internal_affairs/example_description.rb
265
+ - lib/rubocop/cop/internal_affairs/inherit_deprecated_cop_class.rb
266
+ - lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb
267
+ - lib/rubocop/cop/internal_affairs/method_name_equal.rb
266
268
  - lib/rubocop/cop/internal_affairs/node_destructuring.rb
269
+ - lib/rubocop/cop/internal_affairs/node_matcher_directive.rb
267
270
  - lib/rubocop/cop/internal_affairs/node_type_predicate.rb
268
271
  - lib/rubocop/cop/internal_affairs/offense_location_keyword.rb
272
+ - lib/rubocop/cop/internal_affairs/redundant_described_class_as_subject.rb
273
+ - lib/rubocop/cop/internal_affairs/redundant_let_rubocop_config_new.rb
269
274
  - lib/rubocop/cop/internal_affairs/redundant_location_argument.rb
270
275
  - lib/rubocop/cop/internal_affairs/redundant_message_argument.rb
276
+ - lib/rubocop/cop/internal_affairs/redundant_method_dispatch_node.rb
277
+ - lib/rubocop/cop/internal_affairs/style_detected_api_use.rb
278
+ - lib/rubocop/cop/internal_affairs/undefined_config.rb
271
279
  - lib/rubocop/cop/internal_affairs/useless_message_assertion.rb
272
280
  - lib/rubocop/cop/layout/access_modifier_indentation.rb
273
- - lib/rubocop/cop/layout/align_array.rb
274
- - lib/rubocop/cop/layout/align_hash.rb
275
- - lib/rubocop/cop/layout/align_parameters.rb
281
+ - lib/rubocop/cop/layout/argument_alignment.rb
282
+ - lib/rubocop/cop/layout/array_alignment.rb
283
+ - lib/rubocop/cop/layout/assignment_indentation.rb
284
+ - lib/rubocop/cop/layout/begin_end_alignment.rb
276
285
  - lib/rubocop/cop/layout/block_alignment.rb
277
286
  - lib/rubocop/cop/layout/block_end_newline.rb
278
287
  - lib/rubocop/cop/layout/case_indentation.rb
@@ -287,10 +296,12 @@ files:
287
296
  - lib/rubocop/cop/layout/empty_comment.rb
288
297
  - lib/rubocop/cop/layout/empty_line_after_guard_clause.rb
289
298
  - lib/rubocop/cop/layout/empty_line_after_magic_comment.rb
299
+ - lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb
290
300
  - lib/rubocop/cop/layout/empty_line_between_defs.rb
291
301
  - lib/rubocop/cop/layout/empty_lines.rb
292
302
  - lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb
293
303
  - lib/rubocop/cop/layout/empty_lines_around_arguments.rb
304
+ - lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb
294
305
  - lib/rubocop/cop/layout/empty_lines_around_begin_body.rb
295
306
  - lib/rubocop/cop/layout/empty_lines_around_block_body.rb
296
307
  - lib/rubocop/cop/layout/empty_lines_around_class_body.rb
@@ -300,29 +311,40 @@ files:
300
311
  - lib/rubocop/cop/layout/end_alignment.rb
301
312
  - lib/rubocop/cop/layout/end_of_line.rb
302
313
  - lib/rubocop/cop/layout/extra_spacing.rb
314
+ - lib/rubocop/cop/layout/first_argument_indentation.rb
315
+ - lib/rubocop/cop/layout/first_array_element_indentation.rb
303
316
  - lib/rubocop/cop/layout/first_array_element_line_break.rb
317
+ - lib/rubocop/cop/layout/first_hash_element_indentation.rb
304
318
  - lib/rubocop/cop/layout/first_hash_element_line_break.rb
305
319
  - lib/rubocop/cop/layout/first_method_argument_line_break.rb
306
320
  - lib/rubocop/cop/layout/first_method_parameter_line_break.rb
307
321
  - lib/rubocop/cop/layout/first_parameter_indentation.rb
308
- - lib/rubocop/cop/layout/indent_array.rb
309
- - lib/rubocop/cop/layout/indent_assignment.rb
310
- - lib/rubocop/cop/layout/indent_hash.rb
311
- - lib/rubocop/cop/layout/indent_heredoc.rb
322
+ - lib/rubocop/cop/layout/hash_alignment.rb
323
+ - lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb
324
+ - lib/rubocop/cop/layout/heredoc_indentation.rb
312
325
  - lib/rubocop/cop/layout/indentation_consistency.rb
326
+ - lib/rubocop/cop/layout/indentation_style.rb
313
327
  - lib/rubocop/cop/layout/indentation_width.rb
314
328
  - lib/rubocop/cop/layout/initial_indentation.rb
315
- - lib/rubocop/cop/layout/leading_blank_lines.rb
316
329
  - lib/rubocop/cop/layout/leading_comment_space.rb
330
+ - lib/rubocop/cop/layout/leading_empty_lines.rb
331
+ - lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb
332
+ - lib/rubocop/cop/layout/line_length.rb
317
333
  - lib/rubocop/cop/layout/multiline_array_brace_layout.rb
334
+ - lib/rubocop/cop/layout/multiline_array_line_breaks.rb
318
335
  - lib/rubocop/cop/layout/multiline_assignment_layout.rb
319
336
  - lib/rubocop/cop/layout/multiline_block_layout.rb
320
337
  - lib/rubocop/cop/layout/multiline_hash_brace_layout.rb
338
+ - lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb
339
+ - lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb
321
340
  - lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb
322
341
  - lib/rubocop/cop/layout/multiline_method_call_indentation.rb
323
342
  - lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb
324
343
  - lib/rubocop/cop/layout/multiline_operation_indentation.rb
344
+ - lib/rubocop/cop/layout/parameter_alignment.rb
345
+ - lib/rubocop/cop/layout/redundant_line_break.rb
325
346
  - lib/rubocop/cop/layout/rescue_ensure_alignment.rb
347
+ - lib/rubocop/cop/layout/single_line_block_chain.rb
326
348
  - lib/rubocop/cop/layout/space_after_colon.rb
327
349
  - lib/rubocop/cop/layout/space_after_comma.rb
328
350
  - lib/rubocop/cop/layout/space_after_method_name.rb
@@ -331,8 +353,10 @@ files:
331
353
  - lib/rubocop/cop/layout/space_around_block_parameters.rb
332
354
  - lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb
333
355
  - lib/rubocop/cop/layout/space_around_keyword.rb
356
+ - lib/rubocop/cop/layout/space_around_method_call_operator.rb
334
357
  - lib/rubocop/cop/layout/space_around_operators.rb
335
358
  - lib/rubocop/cop/layout/space_before_block_braces.rb
359
+ - lib/rubocop/cop/layout/space_before_brackets.rb
336
360
  - lib/rubocop/cop/layout/space_before_comma.rb
337
361
  - lib/rubocop/cop/layout/space_before_comment.rb
338
362
  - lib/rubocop/cop/layout/space_before_first_arg.rb
@@ -347,58 +371,97 @@ files:
347
371
  - lib/rubocop/cop/layout/space_inside_range_literal.rb
348
372
  - lib/rubocop/cop/layout/space_inside_reference_brackets.rb
349
373
  - lib/rubocop/cop/layout/space_inside_string_interpolation.rb
350
- - lib/rubocop/cop/layout/tab.rb
351
- - lib/rubocop/cop/layout/trailing_blank_lines.rb
374
+ - lib/rubocop/cop/layout/trailing_empty_lines.rb
352
375
  - lib/rubocop/cop/layout/trailing_whitespace.rb
376
+ - lib/rubocop/cop/legacy/corrections_proxy.rb
377
+ - lib/rubocop/cop/legacy/corrector.rb
378
+ - lib/rubocop/cop/lint/ambiguous_assignment.rb
353
379
  - lib/rubocop/cop/lint/ambiguous_block_association.rb
354
380
  - lib/rubocop/cop/lint/ambiguous_operator.rb
381
+ - lib/rubocop/cop/lint/ambiguous_operator_precedence.rb
382
+ - lib/rubocop/cop/lint/ambiguous_range.rb
355
383
  - lib/rubocop/cop/lint/ambiguous_regexp_literal.rb
356
384
  - lib/rubocop/cop/lint/assignment_in_condition.rb
357
385
  - lib/rubocop/cop/lint/big_decimal_new.rb
386
+ - lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb
358
387
  - lib/rubocop/cop/lint/boolean_symbol.rb
359
388
  - lib/rubocop/cop/lint/circular_argument_reference.rb
389
+ - lib/rubocop/cop/lint/constant_definition_in_block.rb
390
+ - lib/rubocop/cop/lint/constant_resolution.rb
360
391
  - lib/rubocop/cop/lint/debugger.rb
361
392
  - lib/rubocop/cop/lint/deprecated_class_methods.rb
393
+ - lib/rubocop/cop/lint/deprecated_constants.rb
394
+ - lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb
362
395
  - lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb
396
+ - lib/rubocop/cop/lint/duplicate_branch.rb
363
397
  - lib/rubocop/cop/lint/duplicate_case_condition.rb
398
+ - lib/rubocop/cop/lint/duplicate_elsif_condition.rb
399
+ - lib/rubocop/cop/lint/duplicate_hash_key.rb
364
400
  - lib/rubocop/cop/lint/duplicate_methods.rb
365
- - lib/rubocop/cop/lint/duplicated_key.rb
401
+ - lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb
402
+ - lib/rubocop/cop/lint/duplicate_require.rb
403
+ - lib/rubocop/cop/lint/duplicate_rescue_exception.rb
366
404
  - lib/rubocop/cop/lint/each_with_object_argument.rb
367
405
  - lib/rubocop/cop/lint/else_layout.rb
406
+ - lib/rubocop/cop/lint/empty_block.rb
407
+ - lib/rubocop/cop/lint/empty_class.rb
408
+ - lib/rubocop/cop/lint/empty_conditional_body.rb
368
409
  - lib/rubocop/cop/lint/empty_ensure.rb
369
410
  - lib/rubocop/cop/lint/empty_expression.rb
411
+ - lib/rubocop/cop/lint/empty_file.rb
412
+ - lib/rubocop/cop/lint/empty_in_pattern.rb
370
413
  - lib/rubocop/cop/lint/empty_interpolation.rb
371
414
  - lib/rubocop/cop/lint/empty_when.rb
372
- - lib/rubocop/cop/lint/end_in_method.rb
373
415
  - lib/rubocop/cop/lint/ensure_return.rb
374
416
  - lib/rubocop/cop/lint/erb_new_arguments.rb
375
417
  - lib/rubocop/cop/lint/flip_flop.rb
418
+ - lib/rubocop/cop/lint/float_comparison.rb
376
419
  - lib/rubocop/cop/lint/float_out_of_range.rb
377
420
  - lib/rubocop/cop/lint/format_parameter_mismatch.rb
378
- - lib/rubocop/cop/lint/handle_exceptions.rb
421
+ - lib/rubocop/cop/lint/hash_compare_by_identity.rb
422
+ - lib/rubocop/cop/lint/heredoc_method_call_position.rb
423
+ - lib/rubocop/cop/lint/identity_comparison.rb
379
424
  - lib/rubocop/cop/lint/implicit_string_concatenation.rb
425
+ - lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb
380
426
  - lib/rubocop/cop/lint/ineffective_access_modifier.rb
381
427
  - lib/rubocop/cop/lint/inherit_exception.rb
382
428
  - lib/rubocop/cop/lint/interpolation_check.rb
429
+ - lib/rubocop/cop/lint/lambda_without_literal_block.rb
383
430
  - lib/rubocop/cop/lint/literal_as_condition.rb
384
431
  - lib/rubocop/cop/lint/literal_in_interpolation.rb
385
432
  - lib/rubocop/cop/lint/loop.rb
386
433
  - lib/rubocop/cop/lint/missing_cop_enable_directive.rb
387
- - lib/rubocop/cop/lint/multiple_compare.rb
434
+ - lib/rubocop/cop/lint/missing_super.rb
435
+ - lib/rubocop/cop/lint/mixed_regexp_capture_types.rb
436
+ - lib/rubocop/cop/lint/multiple_comparison.rb
388
437
  - lib/rubocop/cop/lint/nested_method_definition.rb
389
438
  - lib/rubocop/cop/lint/nested_percent_literal.rb
390
439
  - lib/rubocop/cop/lint/next_without_accumulator.rb
440
+ - lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb
441
+ - lib/rubocop/cop/lint/non_deterministic_require_order.rb
391
442
  - lib/rubocop/cop/lint/non_local_exit_from_iterator.rb
392
443
  - lib/rubocop/cop/lint/number_conversion.rb
444
+ - lib/rubocop/cop/lint/numbered_parameter_assignment.rb
445
+ - lib/rubocop/cop/lint/or_assignment_to_constant.rb
393
446
  - lib/rubocop/cop/lint/ordered_magic_comments.rb
447
+ - lib/rubocop/cop/lint/out_of_range_regexp_ref.rb
394
448
  - lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb
395
449
  - lib/rubocop/cop/lint/percent_string_array.rb
396
450
  - lib/rubocop/cop/lint/percent_symbol_array.rb
451
+ - lib/rubocop/cop/lint/raise_exception.rb
397
452
  - lib/rubocop/cop/lint/rand_one.rb
453
+ - lib/rubocop/cop/lint/redundant_cop_disable_directive.rb
454
+ - lib/rubocop/cop/lint/redundant_cop_enable_directive.rb
455
+ - lib/rubocop/cop/lint/redundant_dir_glob_sort.rb
456
+ - lib/rubocop/cop/lint/redundant_require_statement.rb
457
+ - lib/rubocop/cop/lint/redundant_safe_navigation.rb
458
+ - lib/rubocop/cop/lint/redundant_splat_expansion.rb
459
+ - lib/rubocop/cop/lint/redundant_string_coercion.rb
398
460
  - lib/rubocop/cop/lint/redundant_with_index.rb
399
461
  - lib/rubocop/cop/lint/redundant_with_object.rb
400
462
  - lib/rubocop/cop/lint/regexp_as_condition.rb
401
463
  - lib/rubocop/cop/lint/require_parentheses.rb
464
+ - lib/rubocop/cop/lint/require_relative_self_path.rb
402
465
  - lib/rubocop/cop/lint/rescue_exception.rb
403
466
  - lib/rubocop/cop/lint/rescue_type.rb
404
467
  - lib/rubocop/cop/lint/return_in_void_context.rb
@@ -406,28 +469,37 @@ files:
406
469
  - lib/rubocop/cop/lint/safe_navigation_consistency.rb
407
470
  - lib/rubocop/cop/lint/safe_navigation_with_empty.rb
408
471
  - lib/rubocop/cop/lint/script_permission.rb
472
+ - lib/rubocop/cop/lint/self_assignment.rb
473
+ - lib/rubocop/cop/lint/send_with_mixin_argument.rb
409
474
  - lib/rubocop/cop/lint/shadowed_argument.rb
410
475
  - lib/rubocop/cop/lint/shadowed_exception.rb
411
476
  - lib/rubocop/cop/lint/shadowing_outer_local_variable.rb
412
- - lib/rubocop/cop/lint/string_conversion_in_interpolation.rb
477
+ - lib/rubocop/cop/lint/struct_new_override.rb
478
+ - lib/rubocop/cop/lint/suppressed_exception.rb
479
+ - lib/rubocop/cop/lint/symbol_conversion.rb
413
480
  - lib/rubocop/cop/lint/syntax.rb
481
+ - lib/rubocop/cop/lint/to_enum_arguments.rb
414
482
  - lib/rubocop/cop/lint/to_json.rb
483
+ - lib/rubocop/cop/lint/top_level_return_with_argument.rb
484
+ - lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb
485
+ - lib/rubocop/cop/lint/triple_quotes.rb
415
486
  - lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb
487
+ - lib/rubocop/cop/lint/unexpected_block_arity.rb
416
488
  - lib/rubocop/cop/lint/unified_integer.rb
417
- - lib/rubocop/cop/lint/unneeded_cop_disable_directive.rb
418
- - lib/rubocop/cop/lint/unneeded_cop_enable_directive.rb
419
- - lib/rubocop/cop/lint/unneeded_require_statement.rb
420
- - lib/rubocop/cop/lint/unneeded_splat_expansion.rb
489
+ - lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb
421
490
  - lib/rubocop/cop/lint/unreachable_code.rb
491
+ - lib/rubocop/cop/lint/unreachable_loop.rb
422
492
  - lib/rubocop/cop/lint/unused_block_argument.rb
423
493
  - lib/rubocop/cop/lint/unused_method_argument.rb
424
494
  - lib/rubocop/cop/lint/uri_escape_unescape.rb
425
495
  - lib/rubocop/cop/lint/uri_regexp.rb
426
496
  - lib/rubocop/cop/lint/useless_access_modifier.rb
427
497
  - lib/rubocop/cop/lint/useless_assignment.rb
428
- - lib/rubocop/cop/lint/useless_comparison.rb
429
498
  - lib/rubocop/cop/lint/useless_else_without_rescue.rb
499
+ - lib/rubocop/cop/lint/useless_method_definition.rb
500
+ - lib/rubocop/cop/lint/useless_ruby2_keywords.rb
430
501
  - lib/rubocop/cop/lint/useless_setter_call.rb
502
+ - lib/rubocop/cop/lint/useless_times.rb
431
503
  - lib/rubocop/cop/lint/void.rb
432
504
  - lib/rubocop/cop/message_annotator.rb
433
505
  - lib/rubocop/cop/metrics/abc_size.rb
@@ -435,20 +507,27 @@ files:
435
507
  - lib/rubocop/cop/metrics/block_nesting.rb
436
508
  - lib/rubocop/cop/metrics/class_length.rb
437
509
  - lib/rubocop/cop/metrics/cyclomatic_complexity.rb
438
- - lib/rubocop/cop/metrics/line_length.rb
439
510
  - lib/rubocop/cop/metrics/method_length.rb
440
511
  - lib/rubocop/cop/metrics/module_length.rb
441
512
  - lib/rubocop/cop/metrics/parameter_lists.rb
442
513
  - lib/rubocop/cop/metrics/perceived_complexity.rb
443
514
  - lib/rubocop/cop/metrics/utils/abc_size_calculator.rb
515
+ - lib/rubocop/cop/metrics/utils/code_length_calculator.rb
516
+ - lib/rubocop/cop/metrics/utils/iterating_block.rb
517
+ - lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb
518
+ - lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb
519
+ - lib/rubocop/cop/migration/department_name.rb
444
520
  - lib/rubocop/cop/mixin/alignment.rb
521
+ - lib/rubocop/cop/mixin/allowed_identifiers.rb
522
+ - lib/rubocop/cop/mixin/allowed_methods.rb
445
523
  - lib/rubocop/cop/mixin/annotation_comment.rb
446
- - lib/rubocop/cop/mixin/array_hash_indentation.rb
447
524
  - lib/rubocop/cop/mixin/array_min_size.rb
448
525
  - lib/rubocop/cop/mixin/array_syntax.rb
526
+ - lib/rubocop/cop/mixin/auto_corrector.rb
449
527
  - lib/rubocop/cop/mixin/check_assignment.rb
450
- - lib/rubocop/cop/mixin/classish_length.rb
528
+ - lib/rubocop/cop/mixin/check_line_breakable.rb
451
529
  - lib/rubocop/cop/mixin/code_length.rb
530
+ - lib/rubocop/cop/mixin/comments_help.rb
452
531
  - lib/rubocop/cop/mixin/configurable_enforced_style.rb
453
532
  - lib/rubocop/cop/mixin/configurable_formatting.rb
454
533
  - lib/rubocop/cop/mixin/configurable_max.rb
@@ -463,15 +542,23 @@ files:
463
542
  - lib/rubocop/cop/mixin/enforce_superclass.rb
464
543
  - lib/rubocop/cop/mixin/first_element_line_break.rb
465
544
  - lib/rubocop/cop/mixin/frozen_string_literal.rb
466
- - lib/rubocop/cop/mixin/hash_alignment.rb
545
+ - lib/rubocop/cop/mixin/gem_declaration.rb
546
+ - lib/rubocop/cop/mixin/gemspec_help.rb
547
+ - lib/rubocop/cop/mixin/hash_alignment_styles.rb
548
+ - lib/rubocop/cop/mixin/hash_shorthand_syntax.rb
549
+ - lib/rubocop/cop/mixin/hash_transform_method.rb
467
550
  - lib/rubocop/cop/mixin/heredoc.rb
468
551
  - lib/rubocop/cop/mixin/ignored_methods.rb
469
552
  - lib/rubocop/cop/mixin/ignored_pattern.rb
470
553
  - lib/rubocop/cop/mixin/integer_node.rb
554
+ - lib/rubocop/cop/mixin/interpolation.rb
555
+ - lib/rubocop/cop/mixin/line_length_help.rb
471
556
  - lib/rubocop/cop/mixin/match_range.rb
472
557
  - lib/rubocop/cop/mixin/method_complexity.rb
473
558
  - lib/rubocop/cop/mixin/method_preference.rb
474
559
  - lib/rubocop/cop/mixin/min_body_length.rb
560
+ - lib/rubocop/cop/mixin/multiline_element_indentation.rb
561
+ - lib/rubocop/cop/mixin/multiline_element_line_breaks.rb
475
562
  - lib/rubocop/cop/mixin/multiline_expression_indentation.rb
476
563
  - lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb
477
564
  - lib/rubocop/cop/mixin/negative_conditional.rb
@@ -479,150 +566,85 @@ files:
479
566
  - lib/rubocop/cop/mixin/on_normal_if_unless.rb
480
567
  - lib/rubocop/cop/mixin/ordered_gem_node.rb
481
568
  - lib/rubocop/cop/mixin/parentheses.rb
482
- - lib/rubocop/cop/mixin/parser_diagnostic.rb
483
569
  - lib/rubocop/cop/mixin/percent_array.rb
484
570
  - lib/rubocop/cop/mixin/percent_literal.rb
485
571
  - lib/rubocop/cop/mixin/preceding_following_alignment.rb
486
572
  - lib/rubocop/cop/mixin/preferred_delimiters.rb
487
573
  - lib/rubocop/cop/mixin/range_help.rb
574
+ - lib/rubocop/cop/mixin/rational_literal.rb
575
+ - lib/rubocop/cop/mixin/require_library.rb
488
576
  - lib/rubocop/cop/mixin/rescue_node.rb
489
577
  - lib/rubocop/cop/mixin/safe_assignment.rb
490
- - lib/rubocop/cop/mixin/safe_mode.rb
491
578
  - lib/rubocop/cop/mixin/space_after_punctuation.rb
492
579
  - lib/rubocop/cop/mixin/space_before_punctuation.rb
493
580
  - lib/rubocop/cop/mixin/statement_modifier.rb
494
581
  - lib/rubocop/cop/mixin/string_help.rb
495
582
  - lib/rubocop/cop/mixin/string_literals_help.rb
496
583
  - lib/rubocop/cop/mixin/surrounding_space.rb
497
- - lib/rubocop/cop/mixin/target_rails_version.rb
584
+ - lib/rubocop/cop/mixin/symbol_help.rb
498
585
  - lib/rubocop/cop/mixin/target_ruby_version.rb
499
- - lib/rubocop/cop/mixin/too_many_lines.rb
500
586
  - lib/rubocop/cop/mixin/trailing_body.rb
501
587
  - lib/rubocop/cop/mixin/trailing_comma.rb
502
588
  - lib/rubocop/cop/mixin/uncommunicative_name.rb
503
589
  - lib/rubocop/cop/mixin/unused_argument.rb
590
+ - lib/rubocop/cop/mixin/visibility_help.rb
504
591
  - lib/rubocop/cop/naming/accessor_method_name.rb
505
592
  - lib/rubocop/cop/naming/ascii_identifiers.rb
506
593
  - lib/rubocop/cop/naming/binary_operator_parameter_name.rb
594
+ - lib/rubocop/cop/naming/block_forwarding.rb
595
+ - lib/rubocop/cop/naming/block_parameter_name.rb
507
596
  - lib/rubocop/cop/naming/class_and_module_camel_case.rb
508
597
  - lib/rubocop/cop/naming/constant_name.rb
509
598
  - lib/rubocop/cop/naming/file_name.rb
510
599
  - lib/rubocop/cop/naming/heredoc_delimiter_case.rb
511
600
  - lib/rubocop/cop/naming/heredoc_delimiter_naming.rb
601
+ - lib/rubocop/cop/naming/inclusive_language.rb
512
602
  - lib/rubocop/cop/naming/memoized_instance_variable_name.rb
513
603
  - lib/rubocop/cop/naming/method_name.rb
604
+ - lib/rubocop/cop/naming/method_parameter_name.rb
514
605
  - lib/rubocop/cop/naming/predicate_name.rb
515
- - lib/rubocop/cop/naming/uncommunicative_block_param_name.rb
516
- - lib/rubocop/cop/naming/uncommunicative_method_param_name.rb
606
+ - lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb
517
607
  - lib/rubocop/cop/naming/variable_name.rb
518
608
  - lib/rubocop/cop/naming/variable_number.rb
519
609
  - lib/rubocop/cop/offense.rb
520
- - lib/rubocop/cop/performance/caller.rb
521
- - lib/rubocop/cop/performance/case_when_splat.rb
522
- - lib/rubocop/cop/performance/casecmp.rb
523
- - lib/rubocop/cop/performance/chain_array_allocation.rb
524
- - lib/rubocop/cop/performance/compare_with_block.rb
525
- - lib/rubocop/cop/performance/count.rb
526
- - lib/rubocop/cop/performance/detect.rb
527
- - lib/rubocop/cop/performance/double_start_end_with.rb
528
- - lib/rubocop/cop/performance/end_with.rb
529
- - lib/rubocop/cop/performance/fixed_size.rb
530
- - lib/rubocop/cop/performance/flat_map.rb
531
- - lib/rubocop/cop/performance/inefficient_hash_search.rb
532
- - lib/rubocop/cop/performance/lstrip_rstrip.rb
533
- - lib/rubocop/cop/performance/open_struct.rb
534
- - lib/rubocop/cop/performance/range_include.rb
535
- - lib/rubocop/cop/performance/redundant_block_call.rb
536
- - lib/rubocop/cop/performance/redundant_match.rb
537
- - lib/rubocop/cop/performance/redundant_merge.rb
538
- - lib/rubocop/cop/performance/redundant_sort_by.rb
539
- - lib/rubocop/cop/performance/regexp_match.rb
540
- - lib/rubocop/cop/performance/reverse_each.rb
541
- - lib/rubocop/cop/performance/sample.rb
542
- - lib/rubocop/cop/performance/size.rb
543
- - lib/rubocop/cop/performance/start_with.rb
544
- - lib/rubocop/cop/performance/string_replacement.rb
545
- - lib/rubocop/cop/performance/times_map.rb
546
- - lib/rubocop/cop/performance/unfreeze_string.rb
547
- - lib/rubocop/cop/performance/unneeded_sort.rb
548
- - lib/rubocop/cop/performance/uri_default_parser.rb
549
- - lib/rubocop/cop/rails/action_filter.rb
550
- - lib/rubocop/cop/rails/active_record_aliases.rb
551
- - lib/rubocop/cop/rails/active_support_aliases.rb
552
- - lib/rubocop/cop/rails/application_job.rb
553
- - lib/rubocop/cop/rails/application_record.rb
554
- - lib/rubocop/cop/rails/assert_not.rb
555
- - lib/rubocop/cop/rails/belongs_to.rb
556
- - lib/rubocop/cop/rails/blank.rb
557
- - lib/rubocop/cop/rails/bulk_change_table.rb
558
- - lib/rubocop/cop/rails/create_table_with_timestamps.rb
559
- - lib/rubocop/cop/rails/date.rb
560
- - lib/rubocop/cop/rails/delegate.rb
561
- - lib/rubocop/cop/rails/delegate_allow_blank.rb
562
- - lib/rubocop/cop/rails/dynamic_find_by.rb
563
- - lib/rubocop/cop/rails/enum_uniqueness.rb
564
- - lib/rubocop/cop/rails/environment_comparison.rb
565
- - lib/rubocop/cop/rails/exit.rb
566
- - lib/rubocop/cop/rails/file_path.rb
567
- - lib/rubocop/cop/rails/find_by.rb
568
- - lib/rubocop/cop/rails/find_each.rb
569
- - lib/rubocop/cop/rails/has_and_belongs_to_many.rb
570
- - lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb
571
- - lib/rubocop/cop/rails/http_positional_arguments.rb
572
- - lib/rubocop/cop/rails/http_status.rb
573
- - lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb
574
- - lib/rubocop/cop/rails/inverse_of.rb
575
- - lib/rubocop/cop/rails/lexically_scoped_action_filter.rb
576
- - lib/rubocop/cop/rails/link_to_blank.rb
577
- - lib/rubocop/cop/rails/not_null_column.rb
578
- - lib/rubocop/cop/rails/output.rb
579
- - lib/rubocop/cop/rails/output_safety.rb
580
- - lib/rubocop/cop/rails/pluralization_grammar.rb
581
- - lib/rubocop/cop/rails/presence.rb
582
- - lib/rubocop/cop/rails/present.rb
583
- - lib/rubocop/cop/rails/read_write_attribute.rb
584
- - lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb
585
- - lib/rubocop/cop/rails/reflection_class_name.rb
586
- - lib/rubocop/cop/rails/refute_methods.rb
587
- - lib/rubocop/cop/rails/relative_date_constant.rb
588
- - lib/rubocop/cop/rails/request_referer.rb
589
- - lib/rubocop/cop/rails/reversible_migration.rb
590
- - lib/rubocop/cop/rails/safe_navigation.rb
591
- - lib/rubocop/cop/rails/save_bang.rb
592
- - lib/rubocop/cop/rails/scope_args.rb
593
- - lib/rubocop/cop/rails/skips_model_validations.rb
594
- - lib/rubocop/cop/rails/time_zone.rb
595
- - lib/rubocop/cop/rails/uniq_before_pluck.rb
596
- - lib/rubocop/cop/rails/unknown_env.rb
597
- - lib/rubocop/cop/rails/validation.rb
598
610
  - lib/rubocop/cop/registry.rb
599
611
  - lib/rubocop/cop/security/eval.rb
612
+ - lib/rubocop/cop/security/io_methods.rb
600
613
  - lib/rubocop/cop/security/json_load.rb
601
614
  - lib/rubocop/cop/security/marshal_load.rb
602
615
  - lib/rubocop/cop/security/open.rb
603
616
  - lib/rubocop/cop/security/yaml_load.rb
604
617
  - lib/rubocop/cop/severity.rb
605
618
  - lib/rubocop/cop/style/access_modifier_declarations.rb
619
+ - lib/rubocop/cop/style/accessor_grouping.rb
606
620
  - lib/rubocop/cop/style/alias.rb
607
621
  - lib/rubocop/cop/style/and_or.rb
622
+ - lib/rubocop/cop/style/arguments_forwarding.rb
623
+ - lib/rubocop/cop/style/array_coercion.rb
608
624
  - lib/rubocop/cop/style/array_join.rb
609
625
  - lib/rubocop/cop/style/ascii_comments.rb
610
626
  - lib/rubocop/cop/style/attr.rb
611
627
  - lib/rubocop/cop/style/auto_resource_cleanup.rb
612
628
  - lib/rubocop/cop/style/bare_percent_literals.rb
613
629
  - lib/rubocop/cop/style/begin_block.rb
630
+ - lib/rubocop/cop/style/bisected_attr_accessor.rb
631
+ - lib/rubocop/cop/style/bisected_attr_accessor/macro.rb
614
632
  - lib/rubocop/cop/style/block_comments.rb
615
633
  - lib/rubocop/cop/style/block_delimiters.rb
616
- - lib/rubocop/cop/style/braces_around_hash_parameters.rb
617
634
  - lib/rubocop/cop/style/case_equality.rb
635
+ - lib/rubocop/cop/style/case_like_if.rb
618
636
  - lib/rubocop/cop/style/character_literal.rb
619
637
  - lib/rubocop/cop/style/class_and_module_children.rb
620
638
  - lib/rubocop/cop/style/class_check.rb
639
+ - lib/rubocop/cop/style/class_equality_comparison.rb
621
640
  - lib/rubocop/cop/style/class_methods.rb
641
+ - lib/rubocop/cop/style/class_methods_definitions.rb
622
642
  - lib/rubocop/cop/style/class_vars.rb
643
+ - lib/rubocop/cop/style/collection_compact.rb
623
644
  - lib/rubocop/cop/style/collection_methods.rb
624
645
  - lib/rubocop/cop/style/colon_method_call.rb
625
646
  - lib/rubocop/cop/style/colon_method_definition.rb
647
+ - lib/rubocop/cop/style/combinable_loops.rb
626
648
  - lib/rubocop/cop/style/command_literal.rb
627
649
  - lib/rubocop/cop/style/comment_annotation.rb
628
650
  - lib/rubocop/cop/style/commented_keyword.rb
@@ -632,8 +654,11 @@ files:
632
654
  - lib/rubocop/cop/style/date_time.rb
633
655
  - lib/rubocop/cop/style/def_with_parentheses.rb
634
656
  - lib/rubocop/cop/style/dir.rb
657
+ - lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb
658
+ - lib/rubocop/cop/style/document_dynamic_eval_definition.rb
635
659
  - lib/rubocop/cop/style/documentation.rb
636
660
  - lib/rubocop/cop/style/documentation_method.rb
661
+ - lib/rubocop/cop/style/double_cop_disable_directive.rb
637
662
  - lib/rubocop/cop/style/double_negation.rb
638
663
  - lib/rubocop/cop/style/each_for_simple_loop.rb
639
664
  - lib/rubocop/cop/style/each_with_object.rb
@@ -645,34 +670,53 @@ files:
645
670
  - lib/rubocop/cop/style/empty_method.rb
646
671
  - lib/rubocop/cop/style/encoding.rb
647
672
  - lib/rubocop/cop/style/end_block.rb
673
+ - lib/rubocop/cop/style/endless_method.rb
648
674
  - lib/rubocop/cop/style/eval_with_location.rb
649
675
  - lib/rubocop/cop/style/even_odd.rb
650
676
  - lib/rubocop/cop/style/expand_path_arguments.rb
677
+ - lib/rubocop/cop/style/explicit_block_argument.rb
678
+ - lib/rubocop/cop/style/exponential_notation.rb
679
+ - lib/rubocop/cop/style/file_read.rb
680
+ - lib/rubocop/cop/style/file_write.rb
681
+ - lib/rubocop/cop/style/float_division.rb
651
682
  - lib/rubocop/cop/style/for.rb
652
683
  - lib/rubocop/cop/style/format_string.rb
653
684
  - lib/rubocop/cop/style/format_string_token.rb
654
685
  - lib/rubocop/cop/style/frozen_string_literal_comment.rb
686
+ - lib/rubocop/cop/style/global_std_stream.rb
655
687
  - lib/rubocop/cop/style/global_vars.rb
656
688
  - lib/rubocop/cop/style/guard_clause.rb
689
+ - lib/rubocop/cop/style/hash_as_last_array_item.rb
690
+ - lib/rubocop/cop/style/hash_conversion.rb
691
+ - lib/rubocop/cop/style/hash_each_methods.rb
692
+ - lib/rubocop/cop/style/hash_except.rb
693
+ - lib/rubocop/cop/style/hash_like_case.rb
657
694
  - lib/rubocop/cop/style/hash_syntax.rb
695
+ - lib/rubocop/cop/style/hash_transform_keys.rb
696
+ - lib/rubocop/cop/style/hash_transform_values.rb
658
697
  - lib/rubocop/cop/style/identical_conditional_branches.rb
659
698
  - lib/rubocop/cop/style/if_inside_else.rb
660
699
  - lib/rubocop/cop/style/if_unless_modifier.rb
661
700
  - lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb
701
+ - lib/rubocop/cop/style/if_with_boolean_literal_branches.rb
662
702
  - lib/rubocop/cop/style/if_with_semicolon.rb
663
703
  - lib/rubocop/cop/style/implicit_runtime_error.rb
704
+ - lib/rubocop/cop/style/in_pattern_then.rb
664
705
  - lib/rubocop/cop/style/infinite_loop.rb
665
706
  - lib/rubocop/cop/style/inline_comment.rb
666
707
  - lib/rubocop/cop/style/inverse_methods.rb
667
708
  - lib/rubocop/cop/style/ip_addresses.rb
709
+ - lib/rubocop/cop/style/keyword_parameters_order.rb
668
710
  - lib/rubocop/cop/style/lambda.rb
669
711
  - lib/rubocop/cop/style/lambda_call.rb
670
712
  - lib/rubocop/cop/style/line_end_concatenation.rb
713
+ - lib/rubocop/cop/style/map_to_hash.rb
671
714
  - lib/rubocop/cop/style/method_call_with_args_parentheses.rb
715
+ - lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb
716
+ - lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb
672
717
  - lib/rubocop/cop/style/method_call_without_args_parentheses.rb
673
718
  - lib/rubocop/cop/style/method_called_on_do_end_block.rb
674
719
  - lib/rubocop/cop/style/method_def_parentheses.rb
675
- - lib/rubocop/cop/style/method_missing_super.rb
676
720
  - lib/rubocop/cop/style/min_max.rb
677
721
  - lib/rubocop/cop/style/missing_else.rb
678
722
  - lib/rubocop/cop/style/missing_respond_to_missing.rb
@@ -682,26 +726,35 @@ files:
682
726
  - lib/rubocop/cop/style/multiline_block_chain.rb
683
727
  - lib/rubocop/cop/style/multiline_if_modifier.rb
684
728
  - lib/rubocop/cop/style/multiline_if_then.rb
729
+ - lib/rubocop/cop/style/multiline_in_pattern_then.rb
685
730
  - lib/rubocop/cop/style/multiline_memoization.rb
686
731
  - lib/rubocop/cop/style/multiline_method_signature.rb
687
732
  - lib/rubocop/cop/style/multiline_ternary_operator.rb
733
+ - lib/rubocop/cop/style/multiline_when_then.rb
688
734
  - lib/rubocop/cop/style/multiple_comparison.rb
689
735
  - lib/rubocop/cop/style/mutable_constant.rb
690
736
  - lib/rubocop/cop/style/negated_if.rb
737
+ - lib/rubocop/cop/style/negated_if_else_condition.rb
738
+ - lib/rubocop/cop/style/negated_unless.rb
691
739
  - lib/rubocop/cop/style/negated_while.rb
692
740
  - lib/rubocop/cop/style/nested_modifier.rb
693
741
  - lib/rubocop/cop/style/nested_parenthesized_calls.rb
694
742
  - lib/rubocop/cop/style/nested_ternary_operator.rb
695
743
  - lib/rubocop/cop/style/next.rb
696
744
  - lib/rubocop/cop/style/nil_comparison.rb
745
+ - lib/rubocop/cop/style/nil_lambda.rb
697
746
  - lib/rubocop/cop/style/non_nil_check.rb
698
747
  - lib/rubocop/cop/style/not.rb
748
+ - lib/rubocop/cop/style/numbered_parameters.rb
749
+ - lib/rubocop/cop/style/numbered_parameters_limit.rb
699
750
  - lib/rubocop/cop/style/numeric_literal_prefix.rb
700
751
  - lib/rubocop/cop/style/numeric_literals.rb
701
752
  - lib/rubocop/cop/style/numeric_predicate.rb
702
753
  - lib/rubocop/cop/style/one_line_conditional.rb
754
+ - lib/rubocop/cop/style/open_struct_use.rb
703
755
  - lib/rubocop/cop/style/option_hash.rb
704
756
  - lib/rubocop/cop/style/optional_arguments.rb
757
+ - lib/rubocop/cop/style/optional_boolean_parameter.rb
705
758
  - lib/rubocop/cop/style/or_assignment.rb
706
759
  - lib/rubocop/cop/style/parallel_assignment.rb
707
760
  - lib/rubocop/cop/style/parentheses_around_condition.rb
@@ -710,52 +763,76 @@ files:
710
763
  - lib/rubocop/cop/style/perl_backrefs.rb
711
764
  - lib/rubocop/cop/style/preferred_hash_methods.rb
712
765
  - lib/rubocop/cop/style/proc.rb
766
+ - lib/rubocop/cop/style/quoted_symbols.rb
713
767
  - lib/rubocop/cop/style/raise_args.rb
714
768
  - lib/rubocop/cop/style/random_with_offset.rb
769
+ - lib/rubocop/cop/style/redundant_argument.rb
770
+ - lib/rubocop/cop/style/redundant_assignment.rb
715
771
  - lib/rubocop/cop/style/redundant_begin.rb
772
+ - lib/rubocop/cop/style/redundant_capital_w.rb
773
+ - lib/rubocop/cop/style/redundant_condition.rb
716
774
  - lib/rubocop/cop/style/redundant_conditional.rb
717
775
  - lib/rubocop/cop/style/redundant_exception.rb
776
+ - lib/rubocop/cop/style/redundant_fetch_block.rb
777
+ - lib/rubocop/cop/style/redundant_file_extension_in_require.rb
718
778
  - lib/rubocop/cop/style/redundant_freeze.rb
779
+ - lib/rubocop/cop/style/redundant_interpolation.rb
719
780
  - lib/rubocop/cop/style/redundant_parentheses.rb
781
+ - lib/rubocop/cop/style/redundant_percent_q.rb
782
+ - lib/rubocop/cop/style/redundant_regexp_character_class.rb
783
+ - lib/rubocop/cop/style/redundant_regexp_escape.rb
720
784
  - lib/rubocop/cop/style/redundant_return.rb
721
785
  - lib/rubocop/cop/style/redundant_self.rb
786
+ - lib/rubocop/cop/style/redundant_self_assignment.rb
787
+ - lib/rubocop/cop/style/redundant_self_assignment_branch.rb
788
+ - lib/rubocop/cop/style/redundant_sort.rb
789
+ - lib/rubocop/cop/style/redundant_sort_by.rb
722
790
  - lib/rubocop/cop/style/regexp_literal.rb
723
791
  - lib/rubocop/cop/style/rescue_modifier.rb
724
792
  - lib/rubocop/cop/style/rescue_standard_error.rb
725
793
  - lib/rubocop/cop/style/return_nil.rb
726
794
  - lib/rubocop/cop/style/safe_navigation.rb
795
+ - lib/rubocop/cop/style/sample.rb
796
+ - lib/rubocop/cop/style/select_by_regexp.rb
727
797
  - lib/rubocop/cop/style/self_assignment.rb
728
798
  - lib/rubocop/cop/style/semicolon.rb
729
799
  - lib/rubocop/cop/style/send.rb
730
800
  - lib/rubocop/cop/style/signal_exception.rb
801
+ - lib/rubocop/cop/style/single_argument_dig.rb
731
802
  - lib/rubocop/cop/style/single_line_block_params.rb
732
803
  - lib/rubocop/cop/style/single_line_methods.rb
804
+ - lib/rubocop/cop/style/slicing_with_range.rb
805
+ - lib/rubocop/cop/style/sole_nested_conditional.rb
733
806
  - lib/rubocop/cop/style/special_global_vars.rb
734
807
  - lib/rubocop/cop/style/stabby_lambda_parentheses.rb
808
+ - lib/rubocop/cop/style/static_class.rb
735
809
  - lib/rubocop/cop/style/stderr_puts.rb
810
+ - lib/rubocop/cop/style/string_chars.rb
811
+ - lib/rubocop/cop/style/string_concatenation.rb
736
812
  - lib/rubocop/cop/style/string_hash_keys.rb
737
813
  - lib/rubocop/cop/style/string_literals.rb
738
814
  - lib/rubocop/cop/style/string_literals_in_interpolation.rb
739
815
  - lib/rubocop/cop/style/string_methods.rb
816
+ - lib/rubocop/cop/style/strip.rb
740
817
  - lib/rubocop/cop/style/struct_inheritance.rb
818
+ - lib/rubocop/cop/style/swap_values.rb
741
819
  - lib/rubocop/cop/style/symbol_array.rb
742
820
  - lib/rubocop/cop/style/symbol_literal.rb
743
821
  - lib/rubocop/cop/style/symbol_proc.rb
744
822
  - lib/rubocop/cop/style/ternary_parentheses.rb
823
+ - lib/rubocop/cop/style/top_level_method_definition.rb
745
824
  - lib/rubocop/cop/style/trailing_body_on_class.rb
746
825
  - lib/rubocop/cop/style/trailing_body_on_method_definition.rb
747
826
  - lib/rubocop/cop/style/trailing_body_on_module.rb
748
827
  - lib/rubocop/cop/style/trailing_comma_in_arguments.rb
749
828
  - lib/rubocop/cop/style/trailing_comma_in_array_literal.rb
829
+ - lib/rubocop/cop/style/trailing_comma_in_block_args.rb
750
830
  - lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb
751
831
  - lib/rubocop/cop/style/trailing_method_end_statement.rb
752
832
  - lib/rubocop/cop/style/trailing_underscore_variable.rb
753
833
  - lib/rubocop/cop/style/trivial_accessors.rb
754
834
  - lib/rubocop/cop/style/unless_else.rb
755
- - lib/rubocop/cop/style/unneeded_capital_w.rb
756
- - lib/rubocop/cop/style/unneeded_condition.rb
757
- - lib/rubocop/cop/style/unneeded_interpolation.rb
758
- - lib/rubocop/cop/style/unneeded_percent_q.rb
835
+ - lib/rubocop/cop/style/unless_logical_operators.rb
759
836
  - lib/rubocop/cop/style/unpack_first.rb
760
837
  - lib/rubocop/cop/style/variable_interpolation.rb
761
838
  - lib/rubocop/cop/style/when_then.rb
@@ -766,6 +843,7 @@ files:
766
843
  - lib/rubocop/cop/style/zero_length_predicate.rb
767
844
  - lib/rubocop/cop/team.rb
768
845
  - lib/rubocop/cop/util.rb
846
+ - lib/rubocop/cop/utils/format_string.rb
769
847
  - lib/rubocop/cop/variable_force.rb
770
848
  - lib/rubocop/cop/variable_force/assignment.rb
771
849
  - lib/rubocop/cop/variable_force/branch.rb
@@ -774,61 +852,68 @@ files:
774
852
  - lib/rubocop/cop/variable_force/scope.rb
775
853
  - lib/rubocop/cop/variable_force/variable.rb
776
854
  - lib/rubocop/cop/variable_force/variable_table.rb
855
+ - lib/rubocop/cops_documentation_generator.rb
777
856
  - lib/rubocop/core_ext/string.rb
857
+ - lib/rubocop/directive_comment.rb
778
858
  - lib/rubocop/error.rb
859
+ - lib/rubocop/ext/processed_source.rb
860
+ - lib/rubocop/ext/regexp_node.rb
861
+ - lib/rubocop/ext/regexp_parser.rb
779
862
  - lib/rubocop/file_finder.rb
780
863
  - lib/rubocop/formatter/auto_gen_config_formatter.rb
781
864
  - lib/rubocop/formatter/base_formatter.rb
782
865
  - lib/rubocop/formatter/clang_style_formatter.rb
783
866
  - lib/rubocop/formatter/colorizable.rb
784
867
  - lib/rubocop/formatter/disabled_config_formatter.rb
785
- - lib/rubocop/formatter/disabled_lines_formatter.rb
786
868
  - lib/rubocop/formatter/emacs_style_formatter.rb
787
869
  - lib/rubocop/formatter/file_list_formatter.rb
788
870
  - lib/rubocop/formatter/formatter_set.rb
789
871
  - lib/rubocop/formatter/fuubar_style_formatter.rb
872
+ - lib/rubocop/formatter/git_hub_actions_formatter.rb
790
873
  - lib/rubocop/formatter/html_formatter.rb
791
874
  - lib/rubocop/formatter/json_formatter.rb
875
+ - lib/rubocop/formatter/junit_formatter.rb
792
876
  - lib/rubocop/formatter/offense_count_formatter.rb
877
+ - lib/rubocop/formatter/pacman_formatter.rb
793
878
  - lib/rubocop/formatter/progress_formatter.rb
794
879
  - lib/rubocop/formatter/quiet_formatter.rb
795
880
  - lib/rubocop/formatter/simple_text_formatter.rb
796
881
  - lib/rubocop/formatter/tap_formatter.rb
797
882
  - lib/rubocop/formatter/text_util.rb
798
883
  - lib/rubocop/formatter/worst_offenders_formatter.rb
884
+ - lib/rubocop/lockfile.rb
799
885
  - lib/rubocop/magic_comment.rb
800
886
  - lib/rubocop/name_similarity.rb
801
- - lib/rubocop/node_pattern.rb
802
887
  - lib/rubocop/options.rb
803
888
  - lib/rubocop/path_util.rb
804
889
  - lib/rubocop/platform.rb
805
- - lib/rubocop/processed_source.rb
806
890
  - lib/rubocop/rake_task.rb
807
891
  - lib/rubocop/remote_config.rb
808
892
  - lib/rubocop/result_cache.rb
809
893
  - lib/rubocop/rspec/cop_helper.rb
810
894
  - lib/rubocop/rspec/expect_offense.rb
811
895
  - lib/rubocop/rspec/host_environment_simulation_helper.rb
896
+ - lib/rubocop/rspec/parallel_formatter.rb
812
897
  - lib/rubocop/rspec/shared_contexts.rb
813
- - lib/rubocop/rspec/shared_examples.rb
814
898
  - lib/rubocop/rspec/support.rb
815
899
  - lib/rubocop/runner.rb
816
900
  - lib/rubocop/string_interpreter.rb
817
- - lib/rubocop/string_util.rb
818
901
  - lib/rubocop/target_finder.rb
819
- - lib/rubocop/token.rb
902
+ - lib/rubocop/target_ruby.rb
903
+ - lib/rubocop/util.rb
820
904
  - lib/rubocop/version.rb
821
905
  - lib/rubocop/warning.rb
822
906
  - lib/rubocop/yaml_duplication_checker.rb
823
- homepage: https://github.com/rubocop-hq/rubocop
907
+ homepage: https://github.com/rubocop/rubocop
824
908
  licenses:
825
909
  - MIT
826
910
  metadata:
827
- homepage_uri: https://www.rubocop.org/
828
- changelog_uri: https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md
829
- source_code_uri: https://github.com/rubocop-hq/rubocop/
830
- documentation_uri: https://docs.rubocop.org/
831
- bug_tracker_uri: https://github.com/rubocop-hq/rubocop/issues
911
+ homepage_uri: https://rubocop.org/
912
+ changelog_uri: https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md
913
+ source_code_uri: https://github.com/rubocop/rubocop/
914
+ documentation_uri: https://docs.rubocop.org/rubocop/1.25/
915
+ bug_tracker_uri: https://github.com/rubocop/rubocop/issues
916
+ rubygems_mfa_required: 'true'
832
917
  post_install_message:
833
918
  rdoc_options: []
834
919
  require_paths:
@@ -837,14 +922,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
837
922
  requirements:
838
923
  - - ">="
839
924
  - !ruby/object:Gem::Version
840
- version: 2.2.2
925
+ version: 2.5.0
841
926
  required_rubygems_version: !ruby/object:Gem::Requirement
842
927
  requirements:
843
928
  - - ">="
844
929
  - !ruby/object:Gem::Version
845
930
  version: '0'
846
931
  requirements: []
847
- rubygems_version: 3.0.3
932
+ rubygems_version: 3.1.2
848
933
  signing_key:
849
934
  specification_version: 4
850
935
  summary: Automatic Ruby code style checking tool.