rubocop 1.87.0 → 1.88.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/config/default.yml +80 -72
  3. data/config/obsoletion.yml +21 -1
  4. data/lib/rubocop/cli/command/auto_generate_config.rb +6 -0
  5. data/lib/rubocop/cop/base.rb +30 -10
  6. data/lib/rubocop/cop/bundler/gem_comment.rb +5 -3
  7. data/lib/rubocop/cop/commissioner.rb +13 -11
  8. data/lib/rubocop/cop/correctors/each_to_for_corrector.rb +1 -1
  9. data/lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb +7 -1
  10. data/lib/rubocop/cop/correctors/ordered_gem_corrector.rb +8 -1
  11. data/lib/rubocop/cop/gemspec/development_dependencies.rb +1 -1
  12. data/lib/rubocop/cop/gemspec/duplicated_assignment.rb +12 -2
  13. data/lib/rubocop/cop/gemspec/require_mfa.rb +4 -1
  14. data/lib/rubocop/cop/internal_affairs/redundant_let_rubocop_config_new.rb +5 -3
  15. data/lib/rubocop/cop/layout/block_alignment.rb +58 -4
  16. data/lib/rubocop/cop/layout/class_structure.rb +7 -3
  17. data/lib/rubocop/cop/layout/comment_indentation.rb +9 -2
  18. data/lib/rubocop/cop/layout/condition_position.rb +13 -3
  19. data/lib/rubocop/cop/layout/else_alignment.rb +1 -14
  20. data/lib/rubocop/cop/layout/empty_comment.rb +8 -10
  21. data/lib/rubocop/cop/layout/empty_line_between_defs.rb +14 -1
  22. data/lib/rubocop/cop/layout/first_hash_element_indentation.rb +13 -14
  23. data/lib/rubocop/cop/layout/indentation_width.rb +28 -0
  24. data/lib/rubocop/cop/layout/line_length.rb +10 -5
  25. data/lib/rubocop/cop/layout/multiline_method_call_indentation.rb +6 -1
  26. data/lib/rubocop/cop/layout/space_around_operators.rb +6 -2
  27. data/lib/rubocop/cop/lint/ambiguous_assignment.rb +1 -11
  28. data/lib/rubocop/cop/lint/ambiguous_operator_precedence.rb +1 -10
  29. data/lib/rubocop/cop/lint/assignment_in_condition.rb +13 -1
  30. data/lib/rubocop/cop/lint/circular_argument_reference.rb +1 -3
  31. data/lib/rubocop/cop/lint/debugger.rb +13 -2
  32. data/lib/rubocop/cop/lint/deprecated_constants.rb +1 -7
  33. data/lib/rubocop/cop/lint/empty_block.rb +3 -3
  34. data/lib/rubocop/cop/lint/ensure_return.rb +19 -1
  35. data/lib/rubocop/cop/lint/erb_new_arguments.rb +3 -1
  36. data/lib/rubocop/cop/lint/float_comparison.rb +1 -0
  37. data/lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb +5 -1
  38. data/lib/rubocop/cop/lint/interpolation_check.rb +18 -3
  39. data/lib/rubocop/cop/lint/lambda_without_literal_block.rb +1 -1
  40. data/lib/rubocop/cop/lint/literal_assignment_in_condition.rb +11 -1
  41. data/lib/rubocop/cop/lint/literal_in_interpolation.rb +8 -11
  42. data/lib/rubocop/cop/lint/missing_cop_enable_directive.rb +4 -4
  43. data/lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb +16 -0
  44. data/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb +1 -1
  45. data/lib/rubocop/cop/lint/number_conversion.rb +13 -4
  46. data/lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb +10 -0
  47. data/lib/rubocop/cop/lint/ordered_magic_comments.rb +7 -7
  48. data/lib/rubocop/cop/lint/raise_exception.rb +1 -1
  49. data/lib/rubocop/cop/lint/rand_one.rb +1 -1
  50. data/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb +4 -1
  51. data/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb +4 -1
  52. data/lib/rubocop/cop/lint/redundant_dir_glob_sort.rb +15 -4
  53. data/lib/rubocop/cop/lint/redundant_safe_navigation.rb +14 -7
  54. data/lib/rubocop/cop/lint/redundant_splat_expansion.rb +4 -0
  55. data/lib/rubocop/cop/lint/redundant_type_conversion.rb +7 -0
  56. data/lib/rubocop/cop/lint/redundant_with_index.rb +1 -1
  57. data/lib/rubocop/cop/lint/redundant_with_object.rb +5 -0
  58. data/lib/rubocop/cop/lint/refinement_import_methods.rb +8 -1
  59. data/lib/rubocop/cop/lint/regexp_as_condition.rb +9 -1
  60. data/lib/rubocop/cop/lint/require_parentheses.rb +13 -4
  61. data/lib/rubocop/cop/lint/require_range_parentheses.rb +2 -1
  62. data/lib/rubocop/cop/lint/require_relative_self_path.rb +5 -5
  63. data/lib/rubocop/cop/lint/rescue_type.rb +1 -1
  64. data/lib/rubocop/cop/lint/safe_navigation_chain.rb +1 -0
  65. data/lib/rubocop/cop/lint/safe_navigation_with_empty.rb +1 -1
  66. data/lib/rubocop/cop/lint/script_permission.rb +5 -1
  67. data/lib/rubocop/cop/lint/self_assignment.rb +24 -1
  68. data/lib/rubocop/cop/lint/send_with_mixin_argument.rb +1 -1
  69. data/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +14 -0
  70. data/lib/rubocop/cop/lint/shared_mutable_default.rb +3 -1
  71. data/lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb +12 -0
  72. data/lib/rubocop/cop/lint/symbol_conversion.rb +21 -4
  73. data/lib/rubocop/cop/lint/to_enum_arguments.rb +35 -2
  74. data/lib/rubocop/cop/lint/to_json.rb +8 -1
  75. data/lib/rubocop/cop/lint/top_level_return_with_argument.rb +1 -1
  76. data/lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb +4 -1
  77. data/lib/rubocop/cop/lint/unescaped_bracket_in_regexp.rb +35 -9
  78. data/lib/rubocop/cop/lint/unreachable_code.rb +9 -4
  79. data/lib/rubocop/cop/lint/useless_assignment.rb +10 -5
  80. data/lib/rubocop/cop/lint/useless_numeric_operation.rb +10 -10
  81. data/lib/rubocop/cop/lint/useless_ruby2_keywords.rb +7 -3
  82. data/lib/rubocop/cop/lint/useless_setter_call.rb +4 -1
  83. data/lib/rubocop/cop/lint/useless_times.rb +22 -1
  84. data/lib/rubocop/cop/lint/void.rb +2 -2
  85. data/lib/rubocop/cop/metrics/collection_literal_length.rb +1 -1
  86. data/lib/rubocop/cop/metrics/method_length.rb +1 -1
  87. data/lib/rubocop/cop/metrics/perceived_complexity.rb +38 -7
  88. data/lib/rubocop/cop/mixin/allowed_methods.rb +5 -5
  89. data/lib/rubocop/cop/mixin/allowed_pattern.rb +5 -1
  90. data/lib/rubocop/cop/mixin/forbidden_pattern.rb +5 -1
  91. data/lib/rubocop/cop/mixin/hash_subset.rb +8 -0
  92. data/lib/rubocop/cop/mixin/hash_transform_method.rb +4 -0
  93. data/lib/rubocop/cop/mixin/statement_modifier.rb +1 -1
  94. data/lib/rubocop/cop/naming/file_name.rb +4 -3
  95. data/lib/rubocop/cop/naming/inclusive_language.rb +8 -2
  96. data/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +9 -0
  97. data/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb +9 -3
  98. data/lib/rubocop/cop/security/io_methods.rb +1 -1
  99. data/lib/rubocop/cop/security/marshal_load.rb +1 -1
  100. data/lib/rubocop/cop/style/accessor_grouping.rb +11 -1
  101. data/lib/rubocop/cop/style/alias.rb +1 -1
  102. data/lib/rubocop/cop/style/and_or.rb +1 -1
  103. data/lib/rubocop/cop/style/arguments_forwarding.rb +1 -1
  104. data/lib/rubocop/cop/style/array_first_last.rb +12 -1
  105. data/lib/rubocop/cop/style/array_intersect.rb +8 -4
  106. data/lib/rubocop/cop/style/array_intersect_with_single_element.rb +3 -0
  107. data/lib/rubocop/cop/style/block_delimiters.rb +16 -2
  108. data/lib/rubocop/cop/style/case_equality.rb +14 -2
  109. data/lib/rubocop/cop/style/class_equality_comparison.rb +21 -13
  110. data/lib/rubocop/cop/style/class_methods_definitions.rb +11 -5
  111. data/lib/rubocop/cop/style/collection_compact.rb +1 -1
  112. data/lib/rubocop/cop/style/colon_method_call.rb +13 -6
  113. data/lib/rubocop/cop/style/combinable_loops.rb +5 -0
  114. data/lib/rubocop/cop/style/comparable_clamp.rb +12 -1
  115. data/lib/rubocop/cop/style/concat_array_literals.rb +5 -1
  116. data/lib/rubocop/cop/style/conditional_assignment.rb +6 -1
  117. data/lib/rubocop/cop/style/constant_visibility.rb +4 -1
  118. data/lib/rubocop/cop/style/data_inheritance.rb +4 -0
  119. data/lib/rubocop/cop/style/date_time.rb +2 -2
  120. data/lib/rubocop/cop/style/def_with_parentheses.rb +6 -2
  121. data/lib/rubocop/cop/style/dig_chain.rb +5 -0
  122. data/lib/rubocop/cop/style/dir_empty.rb +4 -0
  123. data/lib/rubocop/cop/style/documentation_method.rb +5 -1
  124. data/lib/rubocop/cop/style/empty_case_condition.rb +12 -2
  125. data/lib/rubocop/cop/style/empty_class_definition.rb +8 -1
  126. data/lib/rubocop/cop/style/empty_heredoc.rb +4 -0
  127. data/lib/rubocop/cop/style/empty_literal.rb +7 -2
  128. data/lib/rubocop/cop/style/empty_string_inside_interpolation.rb +30 -20
  129. data/lib/rubocop/cop/style/env_home.rb +4 -0
  130. data/lib/rubocop/cop/style/even_odd.rb +11 -1
  131. data/lib/rubocop/cop/style/exact_regexp_match.rb +8 -1
  132. data/lib/rubocop/cop/style/fetch_env_var.rb +1 -1
  133. data/lib/rubocop/cop/style/file_null.rb +4 -2
  134. data/lib/rubocop/cop/style/file_write.rb +17 -14
  135. data/lib/rubocop/cop/style/format_string.rb +13 -1
  136. data/lib/rubocop/cop/style/hash_conversion.rb +14 -6
  137. data/lib/rubocop/cop/style/hash_lookup_method.rb +2 -6
  138. data/lib/rubocop/cop/style/hash_slice.rb +16 -0
  139. data/lib/rubocop/cop/style/hash_syntax.rb +2 -0
  140. data/lib/rubocop/cop/style/identical_conditional_branches.rb +15 -4
  141. data/lib/rubocop/cop/style/if_unless_modifier.rb +5 -5
  142. data/lib/rubocop/cop/style/if_with_semicolon.rb +9 -1
  143. data/lib/rubocop/cop/style/inline_comment.rb +1 -1
  144. data/lib/rubocop/cop/style/invertible_unless_condition.rb +25 -5
  145. data/lib/rubocop/cop/style/keyword_arguments_merging.rb +4 -0
  146. data/lib/rubocop/cop/style/keyword_parameters_order.rb +7 -3
  147. data/lib/rubocop/cop/style/lambda.rb +7 -1
  148. data/lib/rubocop/cop/style/lambda_call.rb +11 -0
  149. data/lib/rubocop/cop/style/map_compact_with_conditional_block.rb +11 -0
  150. data/lib/rubocop/cop/style/map_into_array.rb +1 -1
  151. data/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +11 -5
  152. data/lib/rubocop/cop/style/method_def_parentheses.rb +5 -1
  153. data/lib/rubocop/cop/style/min_max_comparison.rb +3 -0
  154. data/lib/rubocop/cop/style/missing_respond_to_missing.rb +10 -7
  155. data/lib/rubocop/cop/style/mixin_usage.rb +1 -1
  156. data/lib/rubocop/cop/style/module_function.rb +4 -2
  157. data/lib/rubocop/cop/style/multiline_if_then.rb +1 -1
  158. data/lib/rubocop/cop/style/multiline_memoization.rb +7 -1
  159. data/lib/rubocop/cop/style/multiline_method_signature.rb +11 -4
  160. data/lib/rubocop/cop/style/mutable_constant.rb +105 -11
  161. data/lib/rubocop/cop/style/nil_lambda.rb +8 -0
  162. data/lib/rubocop/cop/style/numeric_predicate.rb +1 -1
  163. data/lib/rubocop/cop/style/open_struct_use.rb +1 -1
  164. data/lib/rubocop/cop/style/option_hash.rb +1 -1
  165. data/lib/rubocop/cop/style/optional_arguments.rb +1 -0
  166. data/lib/rubocop/cop/style/parallel_assignment.rb +19 -3
  167. data/lib/rubocop/cop/style/percent_literal_delimiters.rb +2 -0
  168. data/lib/rubocop/cop/style/perl_backrefs.rb +5 -3
  169. data/lib/rubocop/cop/style/redundant_current_directory_in_path.rb +13 -1
  170. data/lib/rubocop/cop/style/redundant_exception.rb +6 -0
  171. data/lib/rubocop/cop/style/redundant_filter_chain.rb +1 -1
  172. data/lib/rubocop/cop/style/redundant_format.rb +29 -0
  173. data/lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb +6 -1
  174. data/lib/rubocop/cop/style/redundant_line_continuation.rb +11 -3
  175. data/lib/rubocop/cop/style/redundant_regexp_escape.rb +8 -4
  176. data/lib/rubocop/cop/style/redundant_self.rb +9 -0
  177. data/lib/rubocop/cop/style/redundant_struct_keyword_init.rb +23 -4
  178. data/lib/rubocop/cop/style/semicolon.rb +20 -5
  179. data/lib/rubocop/cop/style/single_line_do_end_block.rb +17 -4
  180. data/lib/rubocop/cop/style/string_hash_keys.rb +1 -0
  181. data/lib/rubocop/cop/style/struct_inheritance.rb +3 -1
  182. data/lib/rubocop/cop/style/ternary_parentheses.rb +11 -0
  183. data/lib/rubocop/cop/style/trailing_underscore_variable.rb +7 -8
  184. data/lib/rubocop/cop/style/trivial_accessors.rb +1 -1
  185. data/lib/rubocop/cop/style/while_until_do.rb +7 -0
  186. data/lib/rubocop/cop/style/word_array.rb +1 -0
  187. data/lib/rubocop/cop/style/zero_length_predicate.rb +6 -3
  188. data/lib/rubocop/cop/team.rb +18 -4
  189. data/lib/rubocop/formatter/disabled_config_formatter.rb +14 -7
  190. data/lib/rubocop/runner.rb +55 -13
  191. data/lib/rubocop/server/core.rb +6 -0
  192. data/lib/rubocop/version.rb +1 -1
  193. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9386e7f8b3fc90e4096eb5436a4d35612586e27dd1ff46ba40e1051a7909fd52
4
- data.tar.gz: 615ec2ec69759dce081efc1fddb8469a7ddf6a72223fea741368b501f333bce0
3
+ metadata.gz: 8642dc64b958118e0563ed93c4837ac13aca29cb8f8a6267155ef450380ea1b3
4
+ data.tar.gz: 569ff18924510b28b60ff03563053d0c53983829d7f4755c0ad39cc213b41f64
5
5
  SHA512:
6
- metadata.gz: c07cb70ee9d4c997a85c079361624d43574b78e6c364e8d0ff939b4d826c19b0e1ef2aad9569aea4f2f247b9b792ae9b21a776f69161da1c9a193e2f3de74d40
7
- data.tar.gz: f6b44267bdfeba1237e06af52009143f13a7c0419a5ccaddf47dc9701c328f2b2ef6d87811ae5c8f05ece533ca236425e599c77a5a283ba44c641de09fc1b7e6
6
+ metadata.gz: 1cc966f73a8b890c335fedbc55fa0ec0f8a73099703cf46111e8619933f2d4b9436cf1c7d597f7fef0282e1e1e2f6b6adc4b4e38c7195eabb600fe97d9931526
7
+ data.tar.gz: 94cc97c23eeaaff0ec7ab9046a2275547fe2363449d0582733e30be26868e098d12c609703fdc2318b1e4d96b8205abf6fe537d655950cf558debfcb6224366c
data/config/default.yml CHANGED
@@ -200,12 +200,12 @@ Bundler/GemComment:
200
200
  Description: 'Add a comment describing each gem.'
201
201
  Enabled: false
202
202
  VersionAdded: '0.59'
203
- VersionChanged: '0.85'
203
+ VersionChanged: '1.88'
204
204
  Include:
205
205
  - '**/*.gemfile'
206
206
  - '**/Gemfile'
207
207
  - '**/gems.rb'
208
- IgnoredGems: []
208
+ AllowedGems: []
209
209
  OnlyFor: []
210
210
 
211
211
  Bundler/GemFilename:
@@ -372,7 +372,7 @@ Gemspec/RubyVersionGlobalsUsage:
372
372
  Include:
373
373
  - '**/*.gemspec'
374
374
 
375
- #################### Layout ###########################
375
+ #################### Layout ################################
376
376
 
377
377
  Layout/AccessModifierIndentation:
378
378
  Description: Checks indentation of private/protected visibility modifiers.
@@ -490,7 +490,7 @@ Layout/BlockEndNewline:
490
490
  VersionAdded: '0.49'
491
491
 
492
492
  Layout/CaseIndentation:
493
- Description: 'Indentation of when in a case/(when|in)/[else/]end.'
493
+ Description: 'Checks how the `when` and `in` clauses of a `case` expression are indented.'
494
494
  StyleGuide: '#indent-when-to-case'
495
495
  Enabled: true
496
496
  VersionAdded: '0.49'
@@ -541,13 +541,13 @@ Layout/ClosingParenthesisIndentation:
541
541
  IndentationWidth: ~
542
542
 
543
543
  Layout/CommentIndentation:
544
- Description: 'Indentation of comments.'
544
+ Description: 'Checks the indentation of comments.'
545
545
  Enabled: true
546
+ VersionAdded: '0.49'
547
+ VersionChanged: '1.86'
546
548
  # When true, allows comments to have extra indentation if that aligns them
547
549
  # with a comment on the preceding line.
548
550
  AllowForAlignment: false
549
- VersionAdded: '0.49'
550
- VersionChanged: '1.86'
551
551
  # By default the indentation width from `Layout/IndentationWidth` is used,
552
552
  # but it can be overridden by setting this parameter.
553
553
  IndentationWidth: ~
@@ -912,9 +912,9 @@ Layout/HashAlignment:
912
912
  Align the elements of a hash literal if they span more than
913
913
  one line.
914
914
  Enabled: true
915
- AllowMultipleStyles: true
916
915
  VersionAdded: '0.49'
917
916
  VersionChanged: '1.16'
917
+ AllowMultipleStyles: true
918
918
  # Alignment of entries using hash rocket as separator. Valid values are:
919
919
  #
920
920
  # key - left alignment of keys
@@ -989,8 +989,8 @@ Layout/HeredocArgumentClosingParenthesis:
989
989
  Description: >-
990
990
  Checks for the placement of the closing parenthesis in a
991
991
  method call that passes a HEREDOC string as an argument.
992
- Enabled: false
993
992
  StyleGuide: '#heredoc-argument-closing-parentheses'
993
+ Enabled: false
994
994
  VersionAdded: '0.68'
995
995
 
996
996
  Layout/HeredocIndentation:
@@ -1426,6 +1426,7 @@ Layout/SpaceBeforeBlockBraces:
1426
1426
  before it.
1427
1427
  Enabled: true
1428
1428
  VersionAdded: '0.49'
1429
+ VersionChanged: '0.52'
1429
1430
  EnforcedStyle: space
1430
1431
  SupportedStyles:
1431
1432
  - space
@@ -1434,7 +1435,6 @@ Layout/SpaceBeforeBlockBraces:
1434
1435
  SupportedStylesForEmptyBraces:
1435
1436
  - space
1436
1437
  - no_space
1437
- VersionChanged: '0.52'
1438
1438
 
1439
1439
  Layout/SpaceBeforeBrackets:
1440
1440
  Description: 'Checks for receiver with a space before the opening brackets.'
@@ -1927,9 +1927,9 @@ Lint/EmptyConditionalBody:
1927
1927
  Description: 'Checks for the presence of `if`, `elsif` and `unless` branches without a body.'
1928
1928
  Enabled: true
1929
1929
  AutoCorrect: contextual
1930
- AllowComments: true
1931
1930
  VersionAdded: '0.89'
1932
1931
  VersionChanged: '1.73'
1932
+ AllowComments: true
1933
1933
 
1934
1934
  Lint/EmptyEnsure:
1935
1935
  Description: 'Checks for empty ensure block.'
@@ -1965,9 +1965,9 @@ Lint/EmptyInterpolation:
1965
1965
  Lint/EmptyWhen:
1966
1966
  Description: 'Checks for `when` branches with empty bodies.'
1967
1967
  Enabled: true
1968
- AllowComments: true
1969
1968
  VersionAdded: '0.45'
1970
1969
  VersionChanged: '0.83'
1970
+ AllowComments: true
1971
1971
 
1972
1972
  Lint/EnsureReturn:
1973
1973
  Description: 'Do not use return in an ensure block.'
@@ -2001,7 +2001,7 @@ Lint/FloatOutOfRange:
2001
2001
  VersionAdded: '0.36'
2002
2002
 
2003
2003
  Lint/FormatParameterMismatch:
2004
- Description: 'The number of parameters to format/sprint must match the fields.'
2004
+ Description: 'Checks for a mismatch between the format fields and the arguments to `format`/`sprintf`/`%`.'
2005
2005
  Enabled: true
2006
2006
  VersionAdded: '0.33'
2007
2007
 
@@ -2021,14 +2021,14 @@ Lint/HeredocMethodCallPosition:
2021
2021
  Description: >-
2022
2022
  Checks for the ordering of a method call where
2023
2023
  the receiver of the call is a HEREDOC.
2024
- Enabled: false
2025
2024
  StyleGuide: '#heredoc-method-calls'
2025
+ Enabled: false
2026
2026
  VersionAdded: '0.68'
2027
2027
 
2028
2028
  Lint/IdentityComparison:
2029
2029
  Description: 'Prefer `equal?` over `==` when comparing `object_id`.'
2030
- Enabled: true
2031
2030
  StyleGuide: '#identity-comparison'
2031
+ Enabled: true
2032
2032
  VersionAdded: '0.91'
2033
2033
 
2034
2034
  Lint/ImplicitStringConcatenation:
@@ -2114,6 +2114,7 @@ Lint/MissingCopEnableDirective:
2114
2114
  Description: 'Checks for a `# rubocop:enable` after `# rubocop:disable`.'
2115
2115
  Enabled: true
2116
2116
  VersionAdded: '0.52'
2117
+ VersionChanged: '1.88'
2117
2118
  # Maximum number of consecutive lines the cop can be disabled for.
2118
2119
  # 0 allows only single-line disables
2119
2120
  # 1 would mean the maximum allowed is the following:
@@ -2121,16 +2122,16 @@ Lint/MissingCopEnableDirective:
2121
2122
  # a = 1
2122
2123
  # # rubocop:enable SomeCop
2123
2124
  # .inf for any size
2124
- MaximumRangeSize: .inf
2125
+ MaxRangeSize: .inf
2125
2126
 
2126
2127
  Lint/MissingSuper:
2127
2128
  Description: >-
2128
2129
  Checks for the presence of constructors and lifecycle callbacks
2129
2130
  without calls to `super`.
2130
2131
  Enabled: true
2131
- AllowedParentClasses: []
2132
2132
  VersionAdded: '0.89'
2133
2133
  VersionChanged: '1.4'
2134
+ AllowedParentClasses: []
2134
2135
 
2135
2136
  Lint/MixedCaseRange:
2136
2137
  Description: 'Checks for mixed-case character ranges since they include likely unintended characters.'
@@ -2196,11 +2197,11 @@ Lint/NumberConversion:
2196
2197
  Description: 'Checks unsafe usage of number conversion methods.'
2197
2198
  Enabled: false
2198
2199
  VersionAdded: '0.53'
2199
- VersionChanged: '1.1'
2200
+ VersionChanged: '1.88'
2200
2201
  SafeAutoCorrect: false
2201
2202
  AllowedMethods: []
2202
2203
  AllowedPatterns: []
2203
- IgnoredClasses:
2204
+ AllowedClasses:
2204
2205
  - Time
2205
2206
  - DateTime
2206
2207
 
@@ -2212,7 +2213,9 @@ Lint/NumberedParameterAssignment:
2212
2213
  Lint/NumericOperationWithConstantResult:
2213
2214
  Description: 'Checks for numeric operations with constant results.'
2214
2215
  Enabled: pending
2216
+ SafeAutoCorrect: false
2215
2217
  VersionAdded: '1.69'
2218
+ VersionChanged: '1.88'
2216
2219
 
2217
2220
  Lint/OrAssignmentToConstant:
2218
2221
  Description: 'Checks unintended or-assignment to constant.'
@@ -2350,13 +2353,16 @@ Lint/RedundantWithIndex:
2350
2353
  Lint/RedundantWithObject:
2351
2354
  Description: 'Checks for redundant `with_object`.'
2352
2355
  Enabled: true
2356
+ SafeAutoCorrect: false
2353
2357
  VersionAdded: '0.51'
2358
+ VersionChanged: '1.88'
2354
2359
 
2355
2360
  Lint/RefinementImportMethods:
2356
2361
  Description: 'Use `Refinement#import_methods` when using `include` or `prepend` in `refine` block.'
2357
2362
  Enabled: pending
2358
2363
  SafeAutoCorrect: false
2359
2364
  VersionAdded: '1.27'
2365
+ VersionChanged: '1.88'
2360
2366
 
2361
2367
  Lint/RegexpAsCondition:
2362
2368
  Description: >-
@@ -2488,10 +2494,10 @@ Lint/SuppressedException:
2488
2494
  Description: "Don't suppress exceptions."
2489
2495
  StyleGuide: '#dont-hide-exceptions'
2490
2496
  Enabled: true
2491
- AllowComments: true
2492
- AllowNil: true
2493
2497
  VersionAdded: '0.9'
2494
2498
  VersionChanged: '1.12'
2499
+ AllowComments: true
2500
+ AllowNil: true
2495
2501
 
2496
2502
  Lint/SuppressedExceptionInNumberConversion:
2497
2503
  Description: 'Checks for cases where exceptions unrelated to the numeric constructors may be unintentionally swallowed.'
@@ -2584,7 +2590,7 @@ Lint/UnmodifiedReduceAccumulator:
2584
2590
  VersionChanged: '1.5'
2585
2591
 
2586
2592
  Lint/UnreachableCode:
2587
- Description: 'Unreachable code.'
2593
+ Description: 'Checks for unreachable code.'
2588
2594
  Enabled: true
2589
2595
  VersionAdded: '0.9'
2590
2596
 
@@ -2729,7 +2735,7 @@ Lint/UselessTimes:
2729
2735
  VersionChanged: '1.61'
2730
2736
 
2731
2737
  Lint/Void:
2732
- Description: 'Possible use of operator/literal/variable in void context.'
2738
+ Description: 'Checks for operators, literals, lambdas, and procs used in void context.'
2733
2739
  Enabled: true
2734
2740
  AutoCorrect: contextual
2735
2741
  VersionAdded: '0.9'
@@ -2739,9 +2745,7 @@ Lint/Void:
2739
2745
  #################### Metrics ###############################
2740
2746
 
2741
2747
  Metrics/AbcSize:
2742
- Description: >-
2743
- A calculated magnitude based on number of assignments,
2744
- branches, and conditions.
2748
+ Description: 'Checks that the ABC size of methods is not higher than the configured maximum.'
2745
2749
  References:
2746
2750
  - https://wiki.c2.com/?AbcMetric
2747
2751
  - https://en.wikipedia.org/wiki/ABC_Software_Metric
@@ -2794,13 +2798,12 @@ Metrics/CollectionLiteralLength:
2794
2798
  Description: 'Checks for `Array` or `Hash` literals with many entries.'
2795
2799
  Enabled: pending
2796
2800
  VersionAdded: '1.47'
2797
- LengthThreshold: 250
2801
+ VersionChanged: '1.88'
2802
+ Max: 250
2798
2803
 
2799
2804
  # Avoid complex methods.
2800
2805
  Metrics/CyclomaticComplexity:
2801
- Description: >-
2802
- A complexity metric that is strongly correlated to the number
2803
- of test cases needed to validate a method.
2806
+ Description: 'Checks that the cyclomatic complexity of methods is not higher than the configured maximum.'
2804
2807
  Enabled: true
2805
2808
  VersionAdded: '0.25'
2806
2809
  VersionChanged: '0.81'
@@ -2840,26 +2843,22 @@ Metrics/ParameterLists:
2840
2843
  MaxOptionalParameters: 3
2841
2844
 
2842
2845
  Metrics/PerceivedComplexity:
2843
- Description: >-
2844
- A complexity metric geared towards measuring complexity for a
2845
- human reader.
2846
+ Description: 'Checks that the perceived complexity of methods is not higher than the configured maximum.'
2846
2847
  Enabled: true
2847
2848
  VersionAdded: '0.25'
2848
- VersionChanged: '0.81'
2849
+ VersionChanged: '1.88'
2849
2850
  AllowedMethods: []
2850
2851
  AllowedPatterns: []
2851
2852
  Max: 8
2852
2853
 
2853
- ################## Migration #############################
2854
+ #################### Migration #############################
2854
2855
 
2855
2856
  Migration/DepartmentName:
2856
- Description: >-
2857
- Check that cop names in rubocop:disable (etc) comments are
2858
- given with department name.
2857
+ Description: 'Checks that cop names in `rubocop:disable` (etc.) comments are given with a department name.'
2859
2858
  Enabled: true
2860
2859
  VersionAdded: '0.75'
2861
2860
 
2862
- #################### Naming ##############################
2861
+ #################### Naming ################################
2863
2862
 
2864
2863
  Naming/AccessorMethodName:
2865
2864
  Description: Checks the naming of accessor methods for get_/set_.
@@ -2876,7 +2875,7 @@ Naming/AsciiIdentifiers:
2876
2875
  AsciiConstants: true
2877
2876
 
2878
2877
  Naming/BinaryOperatorParameterName:
2879
- Description: 'When defining binary operators, name the argument other.'
2878
+ Description: 'Checks that the sole parameter of binary operator methods is named `other`.'
2880
2879
  StyleGuide: '#other-arg'
2881
2880
  Enabled: true
2882
2881
  VersionAdded: '0.50'
@@ -3046,7 +3045,10 @@ Naming/InclusiveLanguage:
3046
3045
  - block
3047
3046
  slave:
3048
3047
  WholeWord: true
3049
- Suggestions: ['replica', 'secondary', 'follower']
3048
+ Suggestions:
3049
+ - replica
3050
+ - secondary
3051
+ - follower
3050
3052
 
3051
3053
  Naming/MemoizedInstanceVariableName:
3052
3054
  Description: >-
@@ -3133,7 +3135,7 @@ Naming/PredicateMethod:
3133
3135
  - nonzero?
3134
3136
 
3135
3137
  Naming/PredicatePrefix:
3136
- Description: 'Predicate method names should not be prefixed and end with a `?`.'
3138
+ Description: 'Checks that predicate method names end with a question mark and do not start with a forbidden prefix.'
3137
3139
  StyleGuide: '#bool-methods-qmark'
3138
3140
  Enabled: true
3139
3141
  VersionAdded: '0.50'
@@ -3215,14 +3217,14 @@ Naming/VariableNumber:
3215
3217
  #################### Security ##############################
3216
3218
 
3217
3219
  Security/CompoundHash:
3218
- Description: 'When overwriting Object#hash to combine values, prefer delegating to Array#hash over writing a custom implementation.'
3220
+ Description: 'Checks for `hash` implementations that combine values manually instead of delegating to `Array#hash`.'
3219
3221
  Enabled: pending
3220
3222
  Safe: false
3221
3223
  VersionAdded: '1.28'
3222
3224
  VersionChanged: '1.51'
3223
3225
 
3224
3226
  Security/Eval:
3225
- Description: 'The use of eval represents a serious security risk.'
3227
+ Description: 'Checks for the use of `Kernel#eval` and `Binding#eval` with dynamic arguments.'
3226
3228
  Enabled: true
3227
3229
  VersionAdded: '0.47'
3228
3230
 
@@ -3258,7 +3260,7 @@ Security/MarshalLoad:
3258
3260
  VersionAdded: '0.47'
3259
3261
 
3260
3262
  Security/Open:
3261
- Description: 'The use of `Kernel#open` and `URI.open` represent a serious security risk.'
3263
+ Description: 'Checks for the use of `Kernel#open` and `URI.open` with dynamic data.'
3262
3264
  Enabled: true
3263
3265
  VersionAdded: '0.53'
3264
3266
  VersionChanged: '1.0'
@@ -3274,7 +3276,7 @@ Security/YAMLLoad:
3274
3276
  VersionAdded: '0.47'
3275
3277
  SafeAutoCorrect: false
3276
3278
 
3277
- #################### Style ###############################
3279
+ #################### Style #################################
3278
3280
 
3279
3281
  Style/AccessModifierDeclarations:
3280
3282
  Description: 'Checks style of how access modifiers are used.'
@@ -3336,6 +3338,8 @@ Style/ArgumentsForwarding:
3336
3338
  Description: 'Use arguments forwarding.'
3337
3339
  StyleGuide: '#arguments-forwarding'
3338
3340
  Enabled: pending
3341
+ VersionAdded: '1.1'
3342
+ VersionChanged: '1.58'
3339
3343
  AllowOnlyRestArgument: true
3340
3344
  UseAnonymousForwarding: true
3341
3345
  RedundantRestArgumentNames:
@@ -3349,8 +3353,6 @@ Style/ArgumentsForwarding:
3349
3353
  - blk
3350
3354
  - block
3351
3355
  - proc
3352
- VersionAdded: '1.1'
3353
- VersionChanged: '1.58'
3354
3356
 
3355
3357
  Style/ArrayCoercion:
3356
3358
  Description: >-
@@ -3701,7 +3703,7 @@ Style/CollectionCompact:
3701
3703
 
3702
3704
  # Align with the style guide.
3703
3705
  Style/CollectionMethods:
3704
- Description: 'Preferred collection methods.'
3706
+ Description: 'Enforces the use of consistent method names from the `Enumerable` module.'
3705
3707
  StyleGuide: '#map-find-select-reduce-include-size'
3706
3708
  Enabled: false
3707
3709
  VersionAdded: '0.9'
@@ -3803,11 +3805,11 @@ Style/CommentedKeyword:
3803
3805
 
3804
3806
  Style/ComparableBetween:
3805
3807
  Description: 'Enforces the use of `Comparable#between?` instead of logical comparison.'
3808
+ StyleGuide: '#ranges-or-between'
3806
3809
  Enabled: pending
3807
3810
  Safe: false
3808
3811
  VersionAdded: '1.74'
3809
3812
  VersionChanged: '1.75'
3810
- StyleGuide: '#ranges-or-between'
3811
3813
 
3812
3814
  Style/ComparableClamp:
3813
3815
  Description: 'Enforces the use of `Comparable#clamp` instead of comparison by minimum and maximum.'
@@ -4128,7 +4130,7 @@ Style/ExplicitBlockArgument:
4128
4130
  VersionChanged: '1.8'
4129
4131
 
4130
4132
  Style/ExponentialNotation:
4131
- Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).'
4133
+ Description: 'Enforces consistency in the use of exponential (scientific) notation.'
4132
4134
  StyleGuide: '#exponential-notation'
4133
4135
  Enabled: true
4134
4136
  VersionAdded: '0.82'
@@ -4145,8 +4147,9 @@ Style/FetchEnvVar:
4145
4147
  - https://rubystyle.guide/#hash-fetch-defaults
4146
4148
  Enabled: pending
4147
4149
  VersionAdded: '1.28'
4150
+ VersionChanged: '1.88'
4148
4151
  # Environment variables to be excluded from the inspection.
4149
- AllowedVars: []
4152
+ AllowedVariables: []
4150
4153
  # When `true`, autocorrects `ENV["key"]` to `ENV.fetch("key", nil)`.
4151
4154
  # When `false`, autocorrects `ENV["key"]` to `ENV.fetch("key")`.
4152
4155
  DefaultToNil: true
@@ -4231,6 +4234,8 @@ Style/FormatString:
4231
4234
  Style/FormatStringToken:
4232
4235
  Description: 'Use a consistent style for format string tokens.'
4233
4236
  Enabled: true
4237
+ VersionAdded: '0.49'
4238
+ VersionChanged: '1.74'
4234
4239
  EnforcedStyle: annotated
4235
4240
  SupportedStyles:
4236
4241
  # Prefer tokens which contain a sprintf like type annotation like
@@ -4249,8 +4254,6 @@ Style/FormatStringToken:
4249
4254
  # only register offenses for strings given to `printf`, `sprintf`,
4250
4255
  # format` and `%` methods. Other strings are not considered.
4251
4256
  Mode: aggressive
4252
- VersionAdded: '0.49'
4253
- VersionChanged: '1.74'
4254
4257
  AllowedMethods: []
4255
4258
  AllowedPatterns: []
4256
4259
 
@@ -4444,9 +4447,9 @@ Style/IdenticalConditionalBranches:
4444
4447
  Style/IfInsideElse:
4445
4448
  Description: 'Finds if nodes inside else, which can be converted to elsif.'
4446
4449
  Enabled: true
4447
- AllowIfModifier: false
4448
4450
  VersionAdded: '0.36'
4449
4451
  VersionChanged: '1.3'
4452
+ AllowIfModifier: false
4450
4453
 
4451
4454
  Style/IfUnlessModifier:
4452
4455
  Description: >-
@@ -4577,14 +4580,14 @@ Style/ItAssignment:
4577
4580
  Style/ItBlockParameter:
4578
4581
  Description: 'Checks for blocks with one argument where `it` block parameter can be used.'
4579
4582
  Enabled: pending
4583
+ VersionAdded: '1.75'
4584
+ VersionChanged: '1.76'
4580
4585
  EnforcedStyle: allow_single_line
4581
4586
  SupportedStyles:
4582
4587
  - allow_single_line
4583
4588
  - only_numbered_parameters
4584
4589
  - always
4585
4590
  - disallow
4586
- VersionAdded: '1.75'
4587
- VersionChanged: '1.76'
4588
4591
 
4589
4592
  Style/KeywordArgumentsMerging:
4590
4593
  Description: >-
@@ -4657,7 +4660,9 @@ Style/MagicCommentFormat:
4657
4660
  Style/MapCompactWithConditionalBlock:
4658
4661
  Description: 'Prefer `select` or `reject` over `map { ... }.compact`.'
4659
4662
  Enabled: pending
4663
+ SafeAutoCorrect: false
4660
4664
  VersionAdded: '1.30'
4665
+ VersionChanged: '1.88'
4661
4666
 
4662
4667
  Style/MapIntoArray:
4663
4668
  Description: 'Checks for usages of `each` with `<<`, `push`, or `append` which can be replaced by `map`.'
@@ -4709,10 +4714,10 @@ Style/MethodCallWithoutArgsParentheses:
4709
4714
  Description: 'Do not use parentheses for method calls with no arguments.'
4710
4715
  StyleGuide: '#method-invocation-parens'
4711
4716
  Enabled: true
4712
- AllowedMethods: []
4713
- AllowedPatterns: []
4714
4717
  VersionAdded: '0.47'
4715
4718
  VersionChanged: '0.55'
4719
+ AllowedMethods: []
4720
+ AllowedPatterns: []
4716
4721
 
4717
4722
  Style/MethodCalledOnDoEndBlock:
4718
4723
  Description: 'Avoid chaining a method call on a do...end block.'
@@ -4818,7 +4823,7 @@ Style/MultilineBlockChain:
4818
4823
  VersionAdded: '0.13'
4819
4824
 
4820
4825
  Style/MultilineIfModifier:
4821
- Description: 'Only use if/unless modifiers on single line statements.'
4826
+ Description: 'Checks for uses of `if`/`unless` modifiers with multiline bodies.'
4822
4827
  StyleGuide: '#no-multiline-if-modifiers'
4823
4828
  Enabled: true
4824
4829
  VersionAdded: '0.45'
@@ -4881,7 +4886,7 @@ Style/MutableConstant:
4881
4886
  Description: 'Do not assign mutable objects to constants.'
4882
4887
  Enabled: true
4883
4888
  VersionAdded: '0.34'
4884
- VersionChanged: '1.8'
4889
+ VersionChanged: '1.88'
4885
4890
  SafeAutoCorrect: false
4886
4891
  EnforcedStyle: literals
4887
4892
  SupportedStyles:
@@ -4893,6 +4898,9 @@ Style/MutableConstant:
4893
4898
  # no harm in freezing an already frozen object.
4894
4899
  - literals
4895
4900
  - strict
4901
+ # When `true`, recursively check and freeze mutable literals nested inside
4902
+ # arrays and hashes (e.g. `[{a: []}]` becomes `[{a: [].freeze}.freeze].freeze`).
4903
+ Recursive: false
4896
4904
 
4897
4905
  Style/NegatedIf:
4898
4906
  Description: >-
@@ -5137,9 +5145,9 @@ Style/OneLineConditional:
5137
5145
  single-line if/then/else/end constructs.
5138
5146
  StyleGuide: '#ternary-operator'
5139
5147
  Enabled: true
5140
- AlwaysCorrectToMultiline: false
5141
5148
  VersionAdded: '0.9'
5142
5149
  VersionChanged: '0.90'
5150
+ AlwaysCorrectToMultiline: false
5143
5151
 
5144
5152
  Style/OpenStructUse:
5145
5153
  Description: >-
@@ -5232,6 +5240,7 @@ Style/PercentLiteralDelimiters:
5232
5240
  StyleGuide: '#percent-literal-braces'
5233
5241
  Enabled: true
5234
5242
  VersionAdded: '0.19'
5243
+ VersionChanged: '0.48'
5235
5244
  # Specify the default preferred delimiter for all types with the 'default' key
5236
5245
  # Override individual delimiters (even with default specified) by specifying
5237
5246
  # an individual key
@@ -5242,7 +5251,6 @@ Style/PercentLiteralDelimiters:
5242
5251
  '%r': '{}'
5243
5252
  '%w': '[]'
5244
5253
  '%W': '[]'
5245
- VersionChanged: '0.48'
5246
5254
 
5247
5255
  Style/PercentQLiterals:
5248
5256
  Description: 'Checks if uses of %Q/%q match the configured preference.'
@@ -5469,9 +5477,9 @@ Style/RedundantInitialize:
5469
5477
  Enabled: pending
5470
5478
  AutoCorrect: contextual
5471
5479
  Safe: false
5472
- AllowComments: true
5473
5480
  VersionAdded: '1.27'
5474
5481
  VersionChanged: '1.61'
5482
+ AllowComments: true
5475
5483
 
5476
5484
  Style/RedundantInterpolation:
5477
5485
  Description: 'Checks for strings that are just an interpolated expression.'
@@ -5635,10 +5643,10 @@ Style/ReturnNilInPredicateMethodDefinition:
5635
5643
  StyleGuide: '#bool-methods-qmark'
5636
5644
  Enabled: pending
5637
5645
  SafeAutoCorrect: false
5638
- AllowedMethods: []
5639
- AllowedPatterns: []
5640
5646
  VersionAdded: '1.53'
5641
5647
  VersionChanged: '1.67'
5648
+ AllowedMethods: []
5649
+ AllowedPatterns: []
5642
5650
 
5643
5651
  Style/ReverseFind:
5644
5652
  Description: 'Use `array.rfind` instead of `array.reverse.find`.'
@@ -5987,12 +5995,12 @@ Style/TrailingBodyOnClass:
5987
5995
  VersionAdded: '0.53'
5988
5996
 
5989
5997
  Style/TrailingBodyOnMethodDefinition:
5990
- Description: 'Method body goes below definition.'
5998
+ Description: 'Checks for trailing code after the method definition.'
5991
5999
  Enabled: true
5992
6000
  VersionAdded: '0.52'
5993
6001
 
5994
6002
  Style/TrailingBodyOnModule:
5995
- Description: 'Module body goes below module statement.'
6003
+ Description: 'Checks for trailing code after the module definition.'
5996
6004
  Enabled: true
5997
6005
  VersionAdded: '0.53'
5998
6006
 
@@ -6065,10 +6073,10 @@ Style/TrailingUnderscoreVariable:
6065
6073
  Description: >-
6066
6074
  Checks for the usage of unneeded trailing underscores at the
6067
6075
  end of parallel variable assignment.
6068
- AllowNamedUnderscoreVariables: true
6069
6076
  Enabled: true
6070
6077
  VersionAdded: '0.31'
6071
6078
  VersionChanged: '0.35'
6079
+ AllowNamedUnderscoreVariables: true
6072
6080
 
6073
6081
  # `TrivialAccessors` requires exact name matches and doesn't allow
6074
6082
  # predicated methods by default.
@@ -6201,6 +6209,9 @@ Style/YodaCondition:
6201
6209
  References:
6202
6210
  - 'https://en.wikipedia.org/wiki/Yoda_conditions'
6203
6211
  Enabled: true
6212
+ Safe: false
6213
+ VersionAdded: '0.49'
6214
+ VersionChanged: '0.75'
6204
6215
  EnforcedStyle: forbid_for_all_comparison_operators
6205
6216
  SupportedStyles:
6206
6217
  # check all comparison operators
@@ -6211,9 +6222,6 @@ Style/YodaCondition:
6211
6222
  - require_for_all_comparison_operators
6212
6223
  # enforce yoda only for equality operators: `!=` and `==`
6213
6224
  - require_for_equality_operators_only
6214
- Safe: false
6215
- VersionAdded: '0.49'
6216
- VersionChanged: '0.75'
6217
6225
 
6218
6226
  Style/YodaExpression:
6219
6227
  Description: 'Forbid the use of yoda expressions.'
@@ -171,7 +171,7 @@ changed_parameters:
171
171
  reason: "`SafeMode` has been removed. Use `SafeAutoCorrect` instead."
172
172
  - cops: Bundler/GemComment
173
173
  parameters: Whitelist
174
- alternative: IgnoredGems
174
+ alternative: AllowedGems
175
175
  - cops:
176
176
  - Lint/SafeNavigationChain
177
177
  - Lint/SafeNavigationConsistency
@@ -238,6 +238,26 @@ changed_parameters:
238
238
  reason: "`AllowOnlyRestArgument` has no effect with TargetRubyVersion >= 3.2."
239
239
  severity: warning
240
240
  minimum_ruby_version: 3.2
241
+ - cops: Bundler/GemComment
242
+ parameters: IgnoredGems
243
+ alternative: AllowedGems
244
+ severity: warning
245
+ - cops: Lint/NumberConversion
246
+ parameters: IgnoredClasses
247
+ alternative: AllowedClasses
248
+ severity: warning
249
+ - cops: Lint/MissingCopEnableDirective
250
+ parameters: MaximumRangeSize
251
+ alternative: MaxRangeSize
252
+ severity: warning
253
+ - cops: Metrics/CollectionLiteralLength
254
+ parameters: LengthThreshold
255
+ alternative: Max
256
+ severity: warning
257
+ - cops: Style/FetchEnvVar
258
+ parameters: AllowedVars
259
+ alternative: AllowedVariables
260
+ severity: warning
241
261
 
242
262
  # Enforced styles that have been removed or replaced
243
263
  changed_enforced_styles:
@@ -31,6 +31,12 @@ module RuboCop
31
31
  result = run_all_cops(line_length_contents)
32
32
  reset_auto_gen_tmp_dir
33
33
  result
34
+ ensure
35
+ # `auto_gen_tmp_dir` points `ExcludeLimit.tmp_dir` at this command's
36
+ # tmp directory. Clear that process-global state on the way out so
37
+ # later in-process callers (e.g. other specs in the same test worker)
38
+ # don't read this run's leftover directory.
39
+ RuboCop::ExcludeLimit.tmp_dir = nil
34
40
  end
35
41
 
36
42
  private