rubocop 0.81.0 → 0.85.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (306) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -17
  3. data/config/default.yml +141 -35
  4. data/lib/rubocop.rb +17 -61
  5. data/lib/rubocop/ast_aliases.rb +8 -0
  6. data/lib/rubocop/cli.rb +13 -7
  7. data/lib/rubocop/cli/command/auto_genenerate_config.rb +2 -2
  8. data/lib/rubocop/cli/command/show_cops.rb +2 -6
  9. data/lib/rubocop/comment_config.rb +1 -1
  10. data/lib/rubocop/config.rb +14 -2
  11. data/lib/rubocop/config_loader.rb +37 -33
  12. data/lib/rubocop/config_loader_resolver.rb +45 -6
  13. data/lib/rubocop/config_obsoletion.rb +1 -0
  14. data/lib/rubocop/config_store.rb +12 -2
  15. data/lib/rubocop/config_validator.rb +18 -1
  16. data/lib/rubocop/cop/autocorrect_logic.rb +1 -2
  17. data/lib/rubocop/cop/badge.rb +5 -5
  18. data/lib/rubocop/cop/bundler/gem_comment.rb +70 -1
  19. data/lib/rubocop/cop/bundler/insecure_protocol_source.rb +1 -1
  20. data/lib/rubocop/cop/commissioner.rb +0 -21
  21. data/lib/rubocop/cop/cop.rb +36 -21
  22. data/lib/rubocop/cop/corrector.rb +48 -24
  23. data/lib/rubocop/cop/correctors/alignment_corrector.rb +4 -8
  24. data/lib/rubocop/cop/correctors/condition_corrector.rb +1 -2
  25. data/lib/rubocop/cop/correctors/empty_line_corrector.rb +1 -1
  26. data/lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb +4 -4
  27. data/lib/rubocop/cop/correctors/line_break_corrector.rb +2 -2
  28. data/lib/rubocop/cop/correctors/percent_literal_corrector.rb +1 -1
  29. data/lib/rubocop/cop/correctors/space_corrector.rb +1 -3
  30. data/lib/rubocop/cop/correctors/string_literal_corrector.rb +2 -2
  31. data/lib/rubocop/cop/gemspec/ordered_dependencies.rb +1 -3
  32. data/lib/rubocop/cop/generator.rb +4 -3
  33. data/lib/rubocop/cop/ignored_node.rb +1 -3
  34. data/lib/rubocop/cop/internal_affairs/offense_location_keyword.rb +1 -1
  35. data/lib/rubocop/cop/layout/case_indentation.rb +3 -3
  36. data/lib/rubocop/cop/layout/class_structure.rb +19 -16
  37. data/lib/rubocop/cop/layout/condition_position.rb +12 -2
  38. data/lib/rubocop/cop/layout/dot_position.rb +1 -1
  39. data/lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb +2 -6
  40. data/lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb +126 -0
  41. data/lib/rubocop/cop/layout/end_of_line.rb +2 -2
  42. data/lib/rubocop/cop/layout/first_argument_indentation.rb +1 -3
  43. data/lib/rubocop/cop/layout/first_array_element_indentation.rb +14 -10
  44. data/lib/rubocop/cop/layout/first_array_element_line_break.rb +1 -1
  45. data/lib/rubocop/cop/layout/first_hash_element_indentation.rb +1 -1
  46. data/lib/rubocop/cop/layout/first_method_argument_line_break.rb +1 -3
  47. data/lib/rubocop/cop/layout/first_parameter_indentation.rb +2 -2
  48. data/lib/rubocop/cop/layout/hash_alignment.rb +6 -6
  49. data/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +5 -9
  50. data/lib/rubocop/cop/layout/heredoc_indentation.rb +21 -104
  51. data/lib/rubocop/cop/layout/{tab.rb → indentation_style.rb} +48 -6
  52. data/lib/rubocop/cop/layout/indentation_width.rb +1 -3
  53. data/lib/rubocop/cop/layout/leading_comment_space.rb +1 -1
  54. data/lib/rubocop/cop/layout/line_length.rb +23 -20
  55. data/lib/rubocop/cop/layout/multiline_block_layout.rb +1 -1
  56. data/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb +1 -3
  57. data/lib/rubocop/cop/layout/multiline_operation_indentation.rb +13 -4
  58. data/lib/rubocop/cop/layout/space_around_block_parameters.rb +3 -3
  59. data/lib/rubocop/cop/layout/space_around_keyword.rb +2 -2
  60. data/lib/rubocop/cop/layout/space_around_method_call_operator.rb +131 -0
  61. data/lib/rubocop/cop/layout/space_around_operators.rb +19 -2
  62. data/lib/rubocop/cop/layout/space_before_comment.rb +1 -3
  63. data/lib/rubocop/cop/layout/space_in_lambda_literal.rb +1 -1
  64. data/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb +1 -3
  65. data/lib/rubocop/cop/layout/space_inside_block_braces.rb +2 -2
  66. data/lib/rubocop/cop/layout/space_inside_range_literal.rb +2 -2
  67. data/lib/rubocop/cop/layout/space_inside_reference_brackets.rb +1 -3
  68. data/lib/rubocop/cop/layout/trailing_whitespace.rb +2 -2
  69. data/lib/rubocop/cop/lint/ambiguous_operator.rb +41 -0
  70. data/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb +14 -0
  71. data/lib/rubocop/cop/lint/boolean_symbol.rb +2 -2
  72. data/lib/rubocop/cop/lint/debugger.rb +1 -1
  73. data/lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb +137 -0
  74. data/lib/rubocop/cop/lint/duplicate_methods.rb +1 -5
  75. data/lib/rubocop/cop/lint/empty_when.rb +29 -6
  76. data/lib/rubocop/cop/lint/ensure_return.rb +19 -2
  77. data/lib/rubocop/cop/lint/erb_new_arguments.rb +1 -3
  78. data/lib/rubocop/cop/lint/format_parameter_mismatch.rb +33 -2
  79. data/lib/rubocop/cop/lint/implicit_string_concatenation.rb +1 -1
  80. data/lib/rubocop/cop/lint/inherit_exception.rb +1 -1
  81. data/lib/rubocop/cop/lint/interpolation_check.rb +1 -1
  82. data/lib/rubocop/cop/lint/literal_as_condition.rb +10 -13
  83. data/lib/rubocop/cop/lint/literal_in_interpolation.rb +1 -1
  84. data/lib/rubocop/cop/lint/loop.rb +1 -1
  85. data/lib/rubocop/cop/lint/mixed_regexp_capture_types.rb +69 -0
  86. data/lib/rubocop/cop/lint/multiple_comparison.rb +1 -1
  87. data/lib/rubocop/cop/lint/nested_percent_literal.rb +1 -1
  88. data/lib/rubocop/cop/lint/non_deterministic_require_order.rb +2 -2
  89. data/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb +7 -7
  90. data/lib/rubocop/cop/lint/number_conversion.rb +1 -1
  91. data/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +33 -11
  92. data/lib/rubocop/cop/lint/percent_string_array.rb +2 -4
  93. data/lib/rubocop/cop/lint/raise_exception.rb +42 -6
  94. data/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb +1 -6
  95. data/lib/rubocop/cop/lint/redundant_require_statement.rb +3 -3
  96. data/lib/rubocop/cop/lint/redundant_string_coercion.rb +1 -1
  97. data/lib/rubocop/cop/lint/rescue_exception.rb +1 -1
  98. data/lib/rubocop/cop/lint/suppressed_exception.rb +11 -4
  99. data/lib/rubocop/cop/lint/syntax.rb +1 -3
  100. data/lib/rubocop/cop/lint/unified_integer.rb +0 -2
  101. data/lib/rubocop/cop/lint/unreachable_code.rb +1 -1
  102. data/lib/rubocop/cop/lint/uri_regexp.rb +4 -4
  103. data/lib/rubocop/cop/lint/useless_access_modifier.rb +13 -3
  104. data/lib/rubocop/cop/lint/useless_assignment.rb +3 -2
  105. data/lib/rubocop/cop/lint/useless_else_without_rescue.rb +6 -1
  106. data/lib/rubocop/cop/lint/useless_setter_call.rb +1 -1
  107. data/lib/rubocop/cop/migration/department_name.rb +7 -7
  108. data/lib/rubocop/cop/mixin/alignment.rb +1 -3
  109. data/lib/rubocop/cop/mixin/array_min_size.rb +1 -3
  110. data/lib/rubocop/cop/mixin/check_line_breakable.rb +3 -9
  111. data/lib/rubocop/cop/mixin/configurable_enforced_style.rb +1 -3
  112. data/lib/rubocop/cop/mixin/configurable_formatting.rb +2 -4
  113. data/lib/rubocop/cop/mixin/frozen_string_literal.rb +10 -1
  114. data/lib/rubocop/cop/mixin/hash_transform_method.rb +9 -2
  115. data/lib/rubocop/cop/mixin/ignored_pattern.rb +1 -1
  116. data/lib/rubocop/cop/mixin/line_length_help.rb +3 -2
  117. data/lib/rubocop/cop/mixin/parser_diagnostic.rb +1 -1
  118. data/lib/rubocop/cop/mixin/regexp_literal_help.rb +16 -0
  119. data/lib/rubocop/cop/mixin/statement_modifier.rb +7 -22
  120. data/lib/rubocop/cop/mixin/target_ruby_version.rb +5 -1
  121. data/lib/rubocop/cop/mixin/trailing_comma.rb +2 -4
  122. data/lib/rubocop/cop/mixin/uncommunicative_name.rb +1 -1
  123. data/lib/rubocop/cop/naming/class_and_module_camel_case.rb +11 -1
  124. data/lib/rubocop/cop/naming/constant_name.rb +2 -1
  125. data/lib/rubocop/cop/naming/file_name.rb +27 -14
  126. data/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb +1 -1
  127. data/lib/rubocop/cop/naming/method_name.rb +1 -5
  128. data/lib/rubocop/cop/naming/predicate_name.rb +1 -1
  129. data/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb +1 -1
  130. data/lib/rubocop/cop/registry.rb +74 -14
  131. data/lib/rubocop/cop/severity.rb +1 -3
  132. data/lib/rubocop/cop/style/alias.rb +4 -4
  133. data/lib/rubocop/cop/style/and_or.rb +7 -8
  134. data/lib/rubocop/cop/style/array_join.rb +2 -2
  135. data/lib/rubocop/cop/style/attr.rb +1 -3
  136. data/lib/rubocop/cop/style/bare_percent_literals.rb +1 -1
  137. data/lib/rubocop/cop/style/block_delimiters.rb +2 -8
  138. data/lib/rubocop/cop/style/case_equality.rb +24 -1
  139. data/lib/rubocop/cop/style/character_literal.rb +2 -2
  140. data/lib/rubocop/cop/style/conditional_assignment.rb +9 -11
  141. data/lib/rubocop/cop/style/copyright.rb +3 -3
  142. data/lib/rubocop/cop/style/dir.rb +1 -1
  143. data/lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb +49 -0
  144. data/lib/rubocop/cop/style/double_cop_disable_directive.rb +1 -1
  145. data/lib/rubocop/cop/style/double_negation.rb +41 -4
  146. data/lib/rubocop/cop/style/each_for_simple_loop.rb +1 -1
  147. data/lib/rubocop/cop/style/each_with_object.rb +3 -3
  148. data/lib/rubocop/cop/style/empty_literal.rb +1 -3
  149. data/lib/rubocop/cop/style/empty_method.rb +2 -6
  150. data/lib/rubocop/cop/style/even_odd.rb +1 -1
  151. data/lib/rubocop/cop/style/expand_path_arguments.rb +3 -3
  152. data/lib/rubocop/cop/style/exponential_notation.rb +119 -0
  153. data/lib/rubocop/cop/style/format_string.rb +2 -2
  154. data/lib/rubocop/cop/style/format_string_token.rb +2 -3
  155. data/lib/rubocop/cop/style/frozen_string_literal_comment.rb +3 -6
  156. data/lib/rubocop/cop/style/guard_clause.rb +25 -2
  157. data/lib/rubocop/cop/style/hash_each_methods.rb +4 -4
  158. data/lib/rubocop/cop/style/hash_syntax.rb +19 -12
  159. data/lib/rubocop/cop/style/hash_transform_values.rb +0 -3
  160. data/lib/rubocop/cop/style/if_unless_modifier.rb +23 -3
  161. data/lib/rubocop/cop/style/if_with_semicolon.rb +16 -0
  162. data/lib/rubocop/cop/style/inline_comment.rb +1 -1
  163. data/lib/rubocop/cop/style/lambda.rb +2 -2
  164. data/lib/rubocop/cop/style/lambda_call.rb +1 -21
  165. data/lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb +1 -3
  166. data/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +1 -3
  167. data/lib/rubocop/cop/style/mixin_grouping.rb +1 -1
  168. data/lib/rubocop/cop/style/module_function.rb +2 -2
  169. data/lib/rubocop/cop/style/multiline_if_modifier.rb +1 -1
  170. data/lib/rubocop/cop/style/multiline_memoization.rb +1 -1
  171. data/lib/rubocop/cop/style/multiline_when_then.rb +16 -1
  172. data/lib/rubocop/cop/style/mutable_constant.rb +2 -4
  173. data/lib/rubocop/cop/style/negated_if.rb +3 -3
  174. data/lib/rubocop/cop/style/negated_unless.rb +3 -3
  175. data/lib/rubocop/cop/style/next.rb +2 -2
  176. data/lib/rubocop/cop/style/nil_comparison.rb +1 -1
  177. data/lib/rubocop/cop/style/non_nil_check.rb +5 -5
  178. data/lib/rubocop/cop/style/not.rb +1 -1
  179. data/lib/rubocop/cop/style/numeric_literal_prefix.rb +1 -1
  180. data/lib/rubocop/cop/style/numeric_literals.rb +1 -1
  181. data/lib/rubocop/cop/style/numeric_predicate.rb +1 -1
  182. data/lib/rubocop/cop/style/one_line_conditional.rb +3 -7
  183. data/lib/rubocop/cop/style/optional_arguments.rb +1 -1
  184. data/lib/rubocop/cop/style/or_assignment.rb +1 -1
  185. data/lib/rubocop/cop/style/percent_q_literals.rb +1 -1
  186. data/lib/rubocop/cop/style/perl_backrefs.rb +2 -2
  187. data/lib/rubocop/cop/style/proc.rb +1 -1
  188. data/lib/rubocop/cop/style/raise_args.rb +1 -1
  189. data/lib/rubocop/cop/style/random_with_offset.rb +3 -3
  190. data/lib/rubocop/cop/style/redundant_condition.rb +3 -4
  191. data/lib/rubocop/cop/style/redundant_conditional.rb +5 -4
  192. data/lib/rubocop/cop/style/redundant_exception.rb +3 -3
  193. data/lib/rubocop/cop/style/redundant_interpolation.rb +2 -2
  194. data/lib/rubocop/cop/style/redundant_parentheses.rb +2 -6
  195. data/lib/rubocop/cop/style/redundant_percent_q.rb +3 -3
  196. data/lib/rubocop/cop/style/redundant_regexp_character_class.rb +89 -0
  197. data/lib/rubocop/cop/style/redundant_regexp_escape.rb +130 -0
  198. data/lib/rubocop/cop/style/redundant_return.rb +5 -7
  199. data/lib/rubocop/cop/style/redundant_self.rb +1 -1
  200. data/lib/rubocop/cop/style/rescue_modifier.rb +1 -1
  201. data/lib/rubocop/cop/style/return_nil.rb +1 -1
  202. data/lib/rubocop/cop/style/safe_navigation.rb +3 -7
  203. data/lib/rubocop/cop/style/self_assignment.rb +1 -1
  204. data/lib/rubocop/cop/style/slicing_with_range.rb +39 -0
  205. data/lib/rubocop/cop/style/special_global_vars.rb +3 -7
  206. data/lib/rubocop/cop/style/stabby_lambda_parentheses.rb +1 -4
  207. data/lib/rubocop/cop/style/string_hash_keys.rb +1 -1
  208. data/lib/rubocop/cop/style/symbol_array.rb +2 -2
  209. data/lib/rubocop/cop/style/symbol_literal.rb +2 -2
  210. data/lib/rubocop/cop/style/ternary_parentheses.rb +2 -5
  211. data/lib/rubocop/cop/style/trailing_comma_in_arguments.rb +4 -3
  212. data/lib/rubocop/cop/style/trailing_comma_in_array_literal.rb +3 -3
  213. data/lib/rubocop/cop/style/trailing_comma_in_block_args.rb +16 -13
  214. data/lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb +3 -3
  215. data/lib/rubocop/cop/style/trailing_underscore_variable.rb +1 -3
  216. data/lib/rubocop/cop/style/trivial_accessors.rb +1 -1
  217. data/lib/rubocop/cop/style/unless_else.rb +1 -1
  218. data/lib/rubocop/cop/style/unpack_first.rb +0 -4
  219. data/lib/rubocop/cop/style/variable_interpolation.rb +1 -1
  220. data/lib/rubocop/cop/style/when_then.rb +1 -1
  221. data/lib/rubocop/cop/style/while_until_modifier.rb +1 -1
  222. data/lib/rubocop/cop/style/word_array.rb +1 -1
  223. data/lib/rubocop/cop/style/zero_length_predicate.rb +1 -1
  224. data/lib/rubocop/cop/team.rb +69 -25
  225. data/lib/rubocop/cop/util.rb +25 -1
  226. data/lib/rubocop/cop/utils/format_string.rb +18 -0
  227. data/lib/rubocop/cop/variable_force.rb +3 -9
  228. data/lib/rubocop/cop/variable_force/assignment.rb +1 -0
  229. data/lib/rubocop/cop/variable_force/branch.rb +1 -3
  230. data/lib/rubocop/cop/variable_force/scope.rb +1 -0
  231. data/lib/rubocop/cop/variable_force/variable.rb +3 -6
  232. data/lib/rubocop/ext/processed_source.rb +18 -0
  233. data/lib/rubocop/formatter/base_formatter.rb +0 -4
  234. data/lib/rubocop/formatter/disabled_config_formatter.rb +4 -12
  235. data/lib/rubocop/formatter/formatter_set.rb +1 -4
  236. data/lib/rubocop/formatter/junit_formatter.rb +14 -4
  237. data/lib/rubocop/formatter/pacman_formatter.rb +1 -1
  238. data/lib/rubocop/magic_comment.rb +1 -1
  239. data/lib/rubocop/name_similarity.rb +12 -9
  240. data/lib/rubocop/options.rb +33 -12
  241. data/lib/rubocop/remote_config.rb +1 -3
  242. data/lib/rubocop/result_cache.rb +5 -7
  243. data/lib/rubocop/rspec/cop_helper.rb +3 -26
  244. data/lib/rubocop/rspec/expect_offense.rb +49 -16
  245. data/lib/rubocop/rspec/shared_contexts.rb +54 -20
  246. data/lib/rubocop/runner.rb +21 -14
  247. data/lib/rubocop/target_finder.rb +7 -7
  248. data/lib/rubocop/target_ruby.rb +5 -2
  249. data/lib/rubocop/version.rb +5 -3
  250. metadata +47 -77
  251. data/lib/rubocop/ast/builder.rb +0 -85
  252. data/lib/rubocop/ast/node.rb +0 -637
  253. data/lib/rubocop/ast/node/alias_node.rb +0 -24
  254. data/lib/rubocop/ast/node/and_node.rb +0 -29
  255. data/lib/rubocop/ast/node/args_node.rb +0 -29
  256. data/lib/rubocop/ast/node/array_node.rb +0 -57
  257. data/lib/rubocop/ast/node/block_node.rb +0 -121
  258. data/lib/rubocop/ast/node/break_node.rb +0 -17
  259. data/lib/rubocop/ast/node/case_match_node.rb +0 -56
  260. data/lib/rubocop/ast/node/case_node.rb +0 -56
  261. data/lib/rubocop/ast/node/class_node.rb +0 -31
  262. data/lib/rubocop/ast/node/def_node.rb +0 -82
  263. data/lib/rubocop/ast/node/defined_node.rb +0 -17
  264. data/lib/rubocop/ast/node/ensure_node.rb +0 -17
  265. data/lib/rubocop/ast/node/float_node.rb +0 -12
  266. data/lib/rubocop/ast/node/for_node.rb +0 -53
  267. data/lib/rubocop/ast/node/forward_args_node.rb +0 -18
  268. data/lib/rubocop/ast/node/hash_node.rb +0 -109
  269. data/lib/rubocop/ast/node/if_node.rb +0 -175
  270. data/lib/rubocop/ast/node/int_node.rb +0 -12
  271. data/lib/rubocop/ast/node/keyword_splat_node.rb +0 -45
  272. data/lib/rubocop/ast/node/mixin/basic_literal_node.rb +0 -16
  273. data/lib/rubocop/ast/node/mixin/binary_operator_node.rb +0 -43
  274. data/lib/rubocop/ast/node/mixin/collection_node.rb +0 -15
  275. data/lib/rubocop/ast/node/mixin/conditional_node.rb +0 -45
  276. data/lib/rubocop/ast/node/mixin/hash_element_node.rb +0 -125
  277. data/lib/rubocop/ast/node/mixin/method_dispatch_node.rb +0 -261
  278. data/lib/rubocop/ast/node/mixin/method_identifier_predicates.rb +0 -114
  279. data/lib/rubocop/ast/node/mixin/modifier_node.rb +0 -17
  280. data/lib/rubocop/ast/node/mixin/numeric_node.rb +0 -21
  281. data/lib/rubocop/ast/node/mixin/parameterized_node.rb +0 -61
  282. data/lib/rubocop/ast/node/mixin/predicate_operator_node.rb +0 -35
  283. data/lib/rubocop/ast/node/module_node.rb +0 -24
  284. data/lib/rubocop/ast/node/or_node.rb +0 -29
  285. data/lib/rubocop/ast/node/pair_node.rb +0 -63
  286. data/lib/rubocop/ast/node/range_node.rb +0 -18
  287. data/lib/rubocop/ast/node/regexp_node.rb +0 -33
  288. data/lib/rubocop/ast/node/resbody_node.rb +0 -24
  289. data/lib/rubocop/ast/node/retry_node.rb +0 -17
  290. data/lib/rubocop/ast/node/return_node.rb +0 -24
  291. data/lib/rubocop/ast/node/self_class_node.rb +0 -24
  292. data/lib/rubocop/ast/node/send_node.rb +0 -13
  293. data/lib/rubocop/ast/node/str_node.rb +0 -16
  294. data/lib/rubocop/ast/node/super_node.rb +0 -21
  295. data/lib/rubocop/ast/node/symbol_node.rb +0 -12
  296. data/lib/rubocop/ast/node/until_node.rb +0 -35
  297. data/lib/rubocop/ast/node/when_node.rb +0 -53
  298. data/lib/rubocop/ast/node/while_node.rb +0 -35
  299. data/lib/rubocop/ast/node/yield_node.rb +0 -21
  300. data/lib/rubocop/ast/sexp.rb +0 -16
  301. data/lib/rubocop/ast/traversal.rb +0 -202
  302. data/lib/rubocop/formatter/disabled_lines_formatter.rb +0 -57
  303. data/lib/rubocop/node_pattern.rb +0 -887
  304. data/lib/rubocop/processed_source.rb +0 -216
  305. data/lib/rubocop/string_util.rb +0 -14
  306. data/lib/rubocop/token.rb +0 -114
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af0dab74354064816d5756cb5a49ab7160c444292ef32e9ee7980dff8a18110f
4
- data.tar.gz: 96288aa5f77f19813ef7cac495f7c86d912f3be28da021b01d30136a2ef28f99
3
+ metadata.gz: 86b240fb0a653934db99c6ca12a1c53976c01f3d6de666842e9f7146f207f725
4
+ data.tar.gz: 606ea84dc8c148971ba8a2dc17ef2a03bbb48802e6053f5042d180e0f6c7c15f
5
5
  SHA512:
6
- metadata.gz: 015244a9c6aff6e2d5640e68b286127944418221bb8c76db04273c5c35b5bc41e03bf7d85c44a3b630a0dd8a24f5a4531ddaf61adb0b75a0b39e2e6c2e08d8cf
7
- data.tar.gz: 8e209ee81ebf1d5a3215292c7d7eddabaacb64e0fa1da7935372495ad13e5bdd896b7fd27fde25fc0e8ffaa7d1b0873f47c40f505d4828e23a52f0ca2ee847e6
6
+ metadata.gz: 4e6a817ec287b216c15e8820e29192fe1152fa77bb9b6fb9377f7a9b1bc22faef07e15c1f025691107914ae211f401549ef831c755fbf6b9c21bd04198388742
7
+ data.tar.gz: 2e3a6b4d35e5b24a9542ac5749247537ae2a47db242e86a189d3f719f7b1d35568eb22deaf491b2f5d1408de8415b2ee86fadfe8a56f229fbce89686744cc5e4
data/README.md CHANGED
@@ -1,6 +1,11 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/rubocop-hq/rubocop/master/logo/rubo-logo-horizontal.png" alt="RuboCop Logo"/>
3
+ </p>
4
+
5
+ ----------
1
6
  [![Gem Version](https://badge.fury.io/rb/rubocop.svg)](https://badge.fury.io/rb/rubocop)
2
7
  [![CircleCI Status](https://circleci.com/gh/rubocop-hq/rubocop/tree/master.svg?style=svg)](https://circleci.com/gh/rubocop-hq/rubocop/tree/master)
3
- [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/sj3ye7n5690d0nvg?svg=true)](https://ci.appveyor.com/project/bbatsov/rubocop)
8
+ [![Actions Status](https://github.com/rubocop-hq/rubocop/workflows/CI/badge.svg?branch=master)](https://github.com/rubocop-hq/rubocop/actions?query=workflow%3ACI)
4
9
  [![Coverage Status](https://api.codeclimate.com/v1/badges/ad6e76460499c8c99697/test_coverage)](https://codeclimate.com/github/bbatsov/rubocop)
5
10
  [![Code Climate](https://codeclimate.com/github/bbatsov/rubocop/badges/gpa.svg)](https://codeclimate.com/github/bbatsov/rubocop)
6
11
  [![Inline docs](https://inch-ci.org/github/bbatsov/rubocop.svg)](https://inch-ci.org/github/bbatsov/rubocop)
@@ -11,26 +16,17 @@
11
16
  [![OpenCollective](https://opencollective.com/rubocop/sponsors/badge.svg)](#open-collective-sponsors)
12
17
  [![Tidelift](https://tidelift.com/badges/package/rubygems/rubocop)](https://tidelift.com/subscription/pkg/rubygems-rubocop?utm_source=rubygems-rubocop&utm_medium=referral&utm_campaign=readme)
13
18
 
14
- <p align="center">
15
- <img src="https://raw.githubusercontent.com/rubocop-hq/rubocop/master/logo/rubo-logo-horizontal.png" alt="RuboCop Logo"/>
16
- </p>
17
-
18
19
  > Role models are important. <br/>
19
20
  > -- Officer Alex J. Murphy / RoboCop
20
21
 
21
- **RuboCop** is a Ruby static code analyzer and code formatter. Out of
22
- the box it will enforce many of the guidelines outlined in the
23
- community [Ruby Style
24
- Guide](https://rubystyle.guide).
22
+ **RuboCop** is a Ruby static code analyzer (a.k.a. `linter`) and code formatter. Out of the box it
23
+ will enforce many of the guidelines outlined in the community [Ruby Style
24
+ Guide](https://rubystyle.guide). Apart from reporting the problems discovered in your code,
25
+ RuboCop can also automatically fix many of them you.
25
26
 
26
27
  RuboCop is extremely flexible and most aspects of its behavior can be tweaked via various
27
28
  [configuration options](https://github.com/rubocop-hq/rubocop/blob/master/config/default.yml).
28
29
 
29
- Apart from reporting problems in your code, RuboCop can also
30
- automatically fix some of the problems for you.
31
-
32
- [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/bbatsov/rubocop?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
33
-
34
30
  **Please consider [financially supporting its ongoing development](#funding).**
35
31
 
36
32
  ## Installation
@@ -53,7 +49,7 @@ haven't reached version 1.0 yet). To prevent an unwanted RuboCop update you
53
49
  might want to use a conservative version lock in your `Gemfile`:
54
50
 
55
51
  ```rb
56
- gem 'rubocop', '~> 0.81.0', require: false
52
+ gem 'rubocop', '~> 0.85.1', require: false
57
53
  ```
58
54
 
59
55
  ## Quickstart
@@ -73,7 +69,7 @@ You can read a lot more about RuboCop in its [official docs](https://docs.ruboco
73
69
 
74
70
  RuboCop supports the following Ruby implementations:
75
71
 
76
- * MRI 2.3+
72
+ * MRI 2.4+
77
73
  * JRuby 9.2+
78
74
 
79
75
  ## Team
@@ -132,7 +128,7 @@ If you're working in a company that's making significant use of RuboCop we'd app
132
128
  to become a RuboCop sponsor.
133
129
 
134
130
  You can support the development of RuboCop via
135
- [Salt](https://salt.bountysource.com/teams/rubocop),
131
+ [GitHub Sponsors](https://github.com/sponsors/bbatsov),
136
132
  [Patreon](https://www.patreon.com/bbatsov),
137
133
  [PayPal](https://paypal.me/bbatsov)
138
134
  and [Open Collective](https://opencollective.com/rubocop).
@@ -35,6 +35,7 @@ AllCops:
35
35
  - '**/*.watchr'
36
36
  - '**/.irbrc'
37
37
  - '**/.pryrc'
38
+ - '**/.simplecov'
38
39
  - '**/buildfile'
39
40
  - '**/Appraisals'
40
41
  - '**/Berksfile'
@@ -53,6 +54,7 @@ AllCops:
53
54
  - '**/Podfile'
54
55
  - '**/Puppetfile'
55
56
  - '**/Rakefile'
57
+ - '**/rakefile'
56
58
  - '**/Snapfile'
57
59
  - '**/Steepfile'
58
60
  - '**/Thorfile'
@@ -97,6 +99,14 @@ AllCops:
97
99
  # to true in the same configuration.
98
100
  EnabledByDefault: false
99
101
  DisabledByDefault: false
102
+ # New cops introduced between major versions are set to a special pending status
103
+ # and are not enabled by default with warning message.
104
+ # Change this behavior by overriding either `NewCops: enable` or `NewCops: disable`.
105
+ # When `NewCops` is `enable`, pending cops are enabled in bulk. Can be overridden by
106
+ # the `--enable-pending-cops` command-line option.
107
+ # When `NewCops` is `disable`, pending cops are disabled in bulk. Can be overridden by
108
+ # the `--disable-pending-cops` command-line option.
109
+ NewCops: pending
100
110
  # Enables the result cache if `true`. Can be overridden by the `--cache` command
101
111
  # line option.
102
112
  UseCache: true
@@ -125,7 +135,7 @@ AllCops:
125
135
  # followed by the Gemfile.lock or gems.locked file. (Although the Ruby version
126
136
  # is specified in the Gemfile or gems.rb file, RuboCop reads the final value
127
137
  # from the lock file.) If the Ruby version is still unresolved, RuboCop will
128
- # use the oldest officially supported Ruby version (currently Ruby 2.3).
138
+ # use the oldest officially supported Ruby version (currently Ruby 2.4).
129
139
  TargetRubyVersion: ~
130
140
 
131
141
  #################### Bundler ###############################
@@ -143,12 +153,13 @@ Bundler/GemComment:
143
153
  Description: 'Add a comment describing each gem.'
144
154
  Enabled: false
145
155
  VersionAdded: '0.59'
146
- VersionChanged: '0.77'
156
+ VersionChanged: '0.85'
147
157
  Include:
148
158
  - '**/*.gemfile'
149
159
  - '**/Gemfile'
150
160
  - '**/gems.rb'
151
161
  IgnoredGems: []
162
+ OnlyFor: []
152
163
 
153
164
  Bundler/InsecureProtocolSource:
154
165
  Description: >-
@@ -367,6 +378,7 @@ Layout/ConditionPosition:
367
378
  StyleGuide: '#same-line-condition'
368
379
  Enabled: true
369
380
  VersionAdded: '0.53'
381
+ VersionChanged: '0.83'
370
382
 
371
383
  Layout/DefEndAlignment:
372
384
  Description: 'Align ends corresponding to defs correctly.'
@@ -452,6 +464,19 @@ Layout/EmptyLinesAroundArguments:
452
464
  Enabled: true
453
465
  VersionAdded: '0.52'
454
466
 
467
+ Layout/EmptyLinesAroundAttributeAccessor:
468
+ Description: "Keep blank lines around attribute accessors."
469
+ StyleGuide: '#empty-lines-around-attribute-accessor'
470
+ Enabled: pending
471
+ VersionAdded: '0.83'
472
+ VersionChanged: '0.84'
473
+ AllowAliasSyntax: true
474
+ AllowedMethods:
475
+ - alias_method
476
+ - public
477
+ - protected
478
+ - private
479
+
455
480
  Layout/EmptyLinesAroundBeginBody:
456
481
  Description: "Keeps track of empty lines around begin-end bodies."
457
482
  StyleGuide: '#empty-lines-around-bodies'
@@ -766,13 +791,7 @@ Layout/HeredocIndentation:
766
791
  StyleGuide: '#squiggly-heredocs'
767
792
  Enabled: true
768
793
  VersionAdded: '0.49'
769
- VersionChanged: '0.77'
770
- EnforcedStyle: squiggly
771
- SupportedStyles:
772
- - squiggly
773
- - active_support
774
- - powerpack
775
- - unindent
794
+ VersionChanged: '0.85'
776
795
 
777
796
  Layout/IndentationConsistency:
778
797
  Description: 'Keep indentation straight.'
@@ -793,6 +812,22 @@ Layout/IndentationConsistency:
793
812
  # A reference to `EnforcedStyle: indented_internal_methods`.
794
813
  - https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions
795
814
 
815
+ Layout/IndentationStyle:
816
+ Description: 'Consistent indentation either with tabs only or spaces only.'
817
+ StyleGuide: '#spaces-indentation'
818
+ Enabled: true
819
+ VersionAdded: '0.49'
820
+ VersionChanged: '0.82'
821
+ # By default, the indentation width from Layout/IndentationWidth is used
822
+ # But it can be overridden by setting this parameter
823
+ # It is used during auto-correction to determine how many spaces should
824
+ # replace each tab.
825
+ IndentationWidth: ~
826
+ EnforcedStyle: spaces
827
+ SupportedStyles:
828
+ - spaces
829
+ - tabs
830
+
796
831
  Layout/IndentationWidth:
797
832
  Description: 'Use 2 spaces for indentation.'
798
833
  StyleGuide: '#spaces-indentation'
@@ -824,13 +859,13 @@ Layout/LeadingEmptyLines:
824
859
  VersionChanged: '0.77'
825
860
 
826
861
  Layout/LineLength:
827
- Description: 'Limit lines to 80 characters.'
828
- StyleGuide: '#80-character-limits'
862
+ Description: 'Checks that line length does not exceed the configured limit.'
863
+ StyleGuide: '#max-line-length'
829
864
  Enabled: true
830
865
  VersionAdded: '0.25'
831
- VersionChanged: '0.78'
866
+ VersionChanged: '0.84'
832
867
  AutoCorrect: false
833
- Max: 80
868
+ Max: 120
834
869
  # To make it possible to copy or click on URIs in the code, we allow lines
835
870
  # containing a URI to be longer than Max.
836
871
  AllowHeredoc: true
@@ -1080,6 +1115,11 @@ Layout/SpaceAroundKeyword:
1080
1115
  Enabled: true
1081
1116
  VersionAdded: '0.49'
1082
1117
 
1118
+ Layout/SpaceAroundMethodCallOperator:
1119
+ Description: 'Checks method call operators to not have spaces around them.'
1120
+ Enabled: pending
1121
+ VersionAdded: '0.82'
1122
+
1083
1123
  Layout/SpaceAroundOperators:
1084
1124
  Description: 'Use a single space around operators.'
1085
1125
  StyleGuide: '#spaces-operators'
@@ -1250,18 +1290,6 @@ Layout/SpaceInsideStringInterpolation:
1250
1290
  - space
1251
1291
  - no_space
1252
1292
 
1253
- Layout/Tab:
1254
- Description: 'No hard tabs.'
1255
- StyleGuide: '#spaces-indentation'
1256
- Enabled: true
1257
- VersionAdded: '0.49'
1258
- VersionChanged: '0.51'
1259
- # By default, the indentation width from Layout/IndentationWidth is used
1260
- # But it can be overridden by setting this parameter
1261
- # It is used during auto-correction to determine how many spaces should
1262
- # replace each tab.
1263
- IndentationWidth: ~
1264
-
1265
1293
  Layout/TrailingEmptyLines:
1266
1294
  Description: 'Checks trailing blank lines and final newline.'
1267
1295
  StyleGuide: '#newline-eof'
@@ -1278,8 +1306,8 @@ Layout/TrailingWhitespace:
1278
1306
  StyleGuide: '#no-trailing-whitespace'
1279
1307
  Enabled: true
1280
1308
  VersionAdded: '0.49'
1281
- VersionChanged: '0.55'
1282
- AllowInHeredoc: false
1309
+ VersionChanged: '0.83'
1310
+ AllowInHeredoc: true
1283
1311
 
1284
1312
  #################### Lint ##################################
1285
1313
  ### Warnings
@@ -1299,6 +1327,7 @@ Lint/AmbiguousOperator:
1299
1327
  StyleGuide: '#method-invocation-parens'
1300
1328
  Enabled: true
1301
1329
  VersionAdded: '0.17'
1330
+ VersionChanged: '0.83'
1302
1331
 
1303
1332
  Lint/AmbiguousRegexpLiteral:
1304
1333
  Description: >-
@@ -1306,6 +1335,7 @@ Lint/AmbiguousRegexpLiteral:
1306
1335
  a method invocation without parentheses.
1307
1336
  Enabled: true
1308
1337
  VersionAdded: '0.17'
1338
+ VersionChanged: '0.83'
1309
1339
 
1310
1340
  Lint/AssignmentInCondition:
1311
1341
  Description: "Don't use assignment in conditions."
@@ -1322,8 +1352,9 @@ Lint/BigDecimalNew:
1322
1352
  Lint/BooleanSymbol:
1323
1353
  Description: 'Check for `:true` and `:false` symbols.'
1324
1354
  Enabled: true
1355
+ Safe: false
1325
1356
  VersionAdded: '0.50'
1326
- VersionChanged: '0.81'
1357
+ VersionChanged: '0.83'
1327
1358
 
1328
1359
  Lint/CircularArgumentReference:
1329
1360
  Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
@@ -1341,6 +1372,11 @@ Lint/DeprecatedClassMethods:
1341
1372
  Enabled: true
1342
1373
  VersionAdded: '0.19'
1343
1374
 
1375
+ Lint/DeprecatedOpenSSLConstant:
1376
+ Description: "Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`."
1377
+ Enabled: pending
1378
+ VersionAdded: '0.84'
1379
+
1344
1380
  Lint/DisjunctiveAssignmentInConstructor:
1345
1381
  Description: 'In constructor, plain assignment is preferred over disjunctive.'
1346
1382
  Enabled: true
@@ -1394,13 +1430,16 @@ Lint/EmptyInterpolation:
1394
1430
  Lint/EmptyWhen:
1395
1431
  Description: 'Checks for `when` branches with empty bodies.'
1396
1432
  Enabled: true
1433
+ AllowComments: true
1397
1434
  VersionAdded: '0.45'
1435
+ VersionChanged: '0.83'
1398
1436
 
1399
1437
  Lint/EnsureReturn:
1400
1438
  Description: 'Do not use return in an ensure block.'
1401
1439
  StyleGuide: '#no-return-ensure'
1402
1440
  Enabled: true
1403
1441
  VersionAdded: '0.9'
1442
+ VersionChanged: '0.83'
1404
1443
 
1405
1444
  Lint/ErbNewArguments:
1406
1445
  Description: 'Use `:trim_mode` and `:eoutvar` keyword arguments to `ERB.new`.'
@@ -1494,6 +1533,11 @@ Lint/MissingCopEnableDirective:
1494
1533
  # .inf for any size
1495
1534
  MaximumRangeSize: .inf
1496
1535
 
1536
+ Lint/MixedRegexpCaptureTypes:
1537
+ Description: 'Do not mix named captures and numbered captures in a Regexp literal.'
1538
+ Enabled: pending
1539
+ VersionAdded: '0.85'
1540
+
1497
1541
  Lint/MultipleComparison:
1498
1542
  Description: "Use `&&` operator to compare multiple values."
1499
1543
  Enabled: true
@@ -1548,6 +1592,7 @@ Lint/ParenthesesAsGroupedExpression:
1548
1592
  StyleGuide: '#parens-no-spaces'
1549
1593
  Enabled: true
1550
1594
  VersionAdded: '0.12'
1595
+ VersionChanged: '0.83'
1551
1596
 
1552
1597
  Lint/PercentStringArray:
1553
1598
  Description: >-
@@ -1567,6 +1612,8 @@ Lint/RaiseException:
1567
1612
  StyleGuide: '#raise-exception'
1568
1613
  Enabled: pending
1569
1614
  VersionAdded: '0.81'
1615
+ AllowedImplicitNamespaces:
1616
+ - 'Gem'
1570
1617
 
1571
1618
  Lint/RandOne:
1572
1619
  Description: >-
@@ -1789,7 +1836,7 @@ Lint/UselessAccessModifier:
1789
1836
  Description: 'Checks for useless access modifiers.'
1790
1837
  Enabled: true
1791
1838
  VersionAdded: '0.20'
1792
- VersionChanged: '0.47'
1839
+ VersionChanged: '0.83'
1793
1840
  ContextCreatingMethods: []
1794
1841
  MethodCreatingMethods: []
1795
1842
 
@@ -1964,6 +2011,11 @@ Naming/ClassAndModuleCamelCase:
1964
2011
  StyleGuide: '#camelcase-classes'
1965
2012
  Enabled: true
1966
2013
  VersionAdded: '0.50'
2014
+ VersionChanged: '0.85'
2015
+ # Allowed class/module names can be specified here.
2016
+ # These can be full or part of the name.
2017
+ AllowedNames:
2018
+ - module_parent
1967
2019
 
1968
2020
  Naming/ConstantName:
1969
2021
  Description: 'Constants should use SCREAMING_SNAKE_CASE.'
@@ -1984,6 +2036,10 @@ Naming/FileName:
1984
2036
  # It further expects it to be nested inside modules which match the names
1985
2037
  # of subdirectories in its path.
1986
2038
  ExpectMatchingDefinition: false
2039
+ # When `false`, changes the behavior of ExpectMatchingDefinition to match only
2040
+ # whether each source file's class or module name matches the file name --
2041
+ # not whether the nested module hierarchy matches the subdirectory path.
2042
+ CheckDefinitionPathHierarchy: true
1987
2043
  # If non-`nil`, expect all source file names to match the following regex.
1988
2044
  # Only the file name itself is matched, not the entire file path.
1989
2045
  # Use anchors as necessary if you want to match the entire name rather than
@@ -2175,7 +2231,7 @@ Security/JSONLoad:
2175
2231
  Description: >-
2176
2232
  Prefer usage of `JSON.parse` over `JSON.load` due to potential
2177
2233
  security issues. See reference for more information.
2178
- Reference: 'https://ruby-doc.org/stdlib-2.3.0/libdoc/json/rdoc/JSON.html#method-i-load'
2234
+ Reference: 'https://ruby-doc.org/stdlib-2.7.0/libdoc/json/rdoc/JSON.html#method-i-load'
2179
2235
  Enabled: true
2180
2236
  VersionAdded: '0.43'
2181
2237
  VersionChanged: '0.44'
@@ -2188,7 +2244,7 @@ Security/MarshalLoad:
2188
2244
  Description: >-
2189
2245
  Avoid using of `Marshal.load` or `Marshal.restore` due to potential
2190
2246
  security issues. See reference for more information.
2191
- Reference: 'https://ruby-doc.org/core-2.3.3/Marshal.html#module-Marshal-label-Security+considerations'
2247
+ Reference: 'https://ruby-doc.org/core-2.7.0/Marshal.html#module-Marshal-label-Security+considerations'
2192
2248
  Enabled: true
2193
2249
  VersionAdded: '0.47'
2194
2250
 
@@ -2202,7 +2258,7 @@ Security/YAMLLoad:
2202
2258
  Description: >-
2203
2259
  Prefer usage of `YAML.safe_load` over `YAML.load` due to potential
2204
2260
  security issues. See reference for more information.
2205
- Reference: 'https://ruby-doc.org/stdlib-2.3.3/libdoc/yaml/rdoc/YAML.html#module-YAML-label-Security'
2261
+ Reference: 'https://ruby-doc.org/stdlib-2.7.0/libdoc/yaml/rdoc/YAML.html#module-YAML-label-Security'
2206
2262
  Enabled: true
2207
2263
  VersionAdded: '0.47'
2208
2264
  SafeAutoCorrect: false
@@ -2239,7 +2295,7 @@ Style/AndOr:
2239
2295
  VersionChanged: '0.25'
2240
2296
  # Whether `and` and `or` are banned only in conditionals (conditionals)
2241
2297
  # or completely (always).
2242
- EnforcedStyle: always
2298
+ EnforcedStyle: conditionals
2243
2299
  SupportedStyles:
2244
2300
  - always
2245
2301
  - conditionals
@@ -2409,6 +2465,15 @@ Style/CaseEquality:
2409
2465
  StyleGuide: '#no-case-equality'
2410
2466
  Enabled: true
2411
2467
  VersionAdded: '0.9'
2468
+ # If AllowOnConstant is enabled, the cop will ignore violations when the receiver of
2469
+ # the case equality operator is a constant.
2470
+ #
2471
+ # # bad
2472
+ # /string/ === "string"
2473
+ #
2474
+ # # good
2475
+ # String === "string"
2476
+ AllowOnConstant: false
2412
2477
 
2413
2478
  Style/CharacterLiteral:
2414
2479
  Description: 'Checks for uses of character literals.'
@@ -2449,6 +2514,7 @@ Style/ClassAndModuleChildren:
2449
2514
 
2450
2515
  Style/ClassCheck:
2451
2516
  Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
2517
+ StyleGuide: '#is-a-vs-kind-of'
2452
2518
  Enabled: true
2453
2519
  VersionAdded: '0.24'
2454
2520
  EnforcedStyle: is_a?
@@ -2616,6 +2682,12 @@ Style/Dir:
2616
2682
  Enabled: true
2617
2683
  VersionAdded: '0.50'
2618
2684
 
2685
+ Style/DisableCopsWithinSourceCodeDirective:
2686
+ Description: >-
2687
+ Forbids disabling/enabling cops within source code.
2688
+ Enabled: false
2689
+ VersionAdded: '0.82'
2690
+
2619
2691
  Style/Documentation:
2620
2692
  Description: 'Document classes and non-namespace modules.'
2621
2693
  Enabled: true
@@ -2643,6 +2715,11 @@ Style/DoubleNegation:
2643
2715
  StyleGuide: '#no-bang-bang'
2644
2716
  Enabled: true
2645
2717
  VersionAdded: '0.19'
2718
+ VersionChanged: '0.84'
2719
+ EnforcedStyle: allowed_in_returns
2720
+ SupportedStyles:
2721
+ - allowed_in_returns
2722
+ - forbidden
2646
2723
 
2647
2724
  Style/EachForSimpleLoop:
2648
2725
  Description: >-
@@ -2734,6 +2811,17 @@ Style/ExpandPathArguments:
2734
2811
  Enabled: true
2735
2812
  VersionAdded: '0.53'
2736
2813
 
2814
+ Style/ExponentialNotation:
2815
+ Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).'
2816
+ StyleGuide: '#exponential-notation'
2817
+ Enabled: pending
2818
+ VersionAdded: '0.82'
2819
+ EnforcedStyle: scientific
2820
+ SupportedStyles:
2821
+ - scientific
2822
+ - engineering
2823
+ - integral
2824
+
2737
2825
  Style/FloatDivision:
2738
2826
  Description: 'For performing float division, coerce one side only.'
2739
2827
  StyleGuide: '#float-division'
@@ -2795,8 +2883,7 @@ Style/FrozenStringLiteralComment:
2795
2883
  SupportedStyles:
2796
2884
  # `always` will always add the frozen string literal comment to a file
2797
2885
  # regardless of the Ruby version or if `freeze` or `<<` are called on a
2798
- # string literal. If you run code against multiple versions of Ruby, it is
2799
- # possible that this will create errors in Ruby 2.3.0+.
2886
+ # string literal. It is possible that this will create errors.
2800
2887
  - always
2801
2888
  # `always_true` will add the frozen string literal comment to a file,
2802
2889
  # similarly to the `always` style, but will also change any disabled
@@ -2902,6 +2989,7 @@ Style/IfWithSemicolon:
2902
2989
  StyleGuide: '#no-semicolon-ifs'
2903
2990
  Enabled: true
2904
2991
  VersionAdded: '0.9'
2992
+ VersionChanged: '0.83'
2905
2993
 
2906
2994
  Style/ImplicitRuntimeError:
2907
2995
  Description: >-
@@ -3379,7 +3467,9 @@ Style/OptionalArguments:
3379
3467
  of the argument list.
3380
3468
  StyleGuide: '#optional-arguments'
3381
3469
  Enabled: true
3470
+ Safe: false
3382
3471
  VersionAdded: '0.33'
3472
+ VersionChanged: '0.83'
3383
3473
 
3384
3474
  Style/OrAssignment:
3385
3475
  Description: 'Recommend usage of double pipe equals (||=) where applicable.'
@@ -3528,6 +3618,16 @@ Style/RedundantPercentQ:
3528
3618
  Enabled: true
3529
3619
  VersionAdded: '0.76'
3530
3620
 
3621
+ Style/RedundantRegexpCharacterClass:
3622
+ Description: 'Checks for unnecessary single-element Regexp character classes.'
3623
+ Enabled: pending
3624
+ VersionAdded: '0.85'
3625
+
3626
+ Style/RedundantRegexpEscape:
3627
+ Description: 'Checks for redundant escapes in Regexps.'
3628
+ Enabled: pending
3629
+ VersionAdded: '0.85'
3630
+
3531
3631
  Style/RedundantReturn:
3532
3632
  Description: "Don't use return where it's not required."
3533
3633
  StyleGuide: '#no-explicit-return'
@@ -3684,6 +3784,12 @@ Style/SingleLineMethods:
3684
3784
  VersionChanged: '0.19'
3685
3785
  AllowIfMethodIsEmpty: true
3686
3786
 
3787
+ Style/SlicingWithRange:
3788
+ Description: 'Checks array slicing is done with endless ranges when suitable.'
3789
+ Enabled: pending
3790
+ VersionAdded: '0.83'
3791
+ Safe: false
3792
+
3687
3793
  Style/SpecialGlobalVars:
3688
3794
  Description: 'Avoid Perl-style global variables.'
3689
3795
  StyleGuide: '#no-cryptic-perlisms'