sorbet-result 0.2.1 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2511,6 +2511,22 @@ module RuboCop::Cop::AllowedPattern
2511
2511
  def matches_ignored_pattern?(line); end
2512
2512
  end
2513
2513
 
2514
+ # This module encapsulates the ability to allow certain receivers in a cop.
2515
+ #
2516
+ # source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#6
2517
+ module RuboCop::Cop::AllowedReceivers
2518
+ # @return [Boolean]
2519
+ #
2520
+ # source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#7
2521
+ def allowed_receiver?(receiver); end
2522
+
2523
+ # source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#29
2524
+ def allowed_receivers; end
2525
+
2526
+ # source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#13
2527
+ def receiver_name(receiver); end
2528
+ end
2529
+
2514
2530
  # Error raised when an unqualified cop name is used that could
2515
2531
  # refer to two or more cops under different departments
2516
2532
  #
@@ -4862,7 +4878,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter
4862
4878
 
4863
4879
  # Legacy
4864
4880
  #
4865
- # source://parser/3.2.2.1/lib/parser/source/tree_rewriter.rb#252
4881
+ # source://parser/3.2.2.3/lib/parser/source/tree_rewriter.rb#252
4866
4882
  def rewrite; end
4867
4883
 
4868
4884
  # Swaps sources at the given ranges.
@@ -7937,53 +7953,53 @@ RuboCop::Cop::Layout::ClassStructure::MSG = T.let(T.unsafe(nil), String)
7937
7953
  # Hi
7938
7954
  # EOS
7939
7955
  #
7940
- # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#49
7956
+ # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#48
7941
7957
  class RuboCop::Cop::Layout::ClosingHeredocIndentation < ::RuboCop::Cop::Base
7942
7958
  include ::RuboCop::Cop::Heredoc
7943
7959
  extend ::RuboCop::Cop::AutoCorrector
7944
7960
 
7945
- # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#58
7961
+ # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#57
7946
7962
  def on_heredoc(node); end
7947
7963
 
7948
7964
  private
7949
7965
 
7950
7966
  # @return [Boolean]
7951
7967
  #
7952
- # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#75
7968
+ # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#74
7953
7969
  def argument_indentation_correct?(node); end
7954
7970
 
7955
- # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#83
7971
+ # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#82
7956
7972
  def closing_indentation(node); end
7957
7973
 
7958
- # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#102
7974
+ # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#101
7959
7975
  def find_node_used_heredoc_argument(node); end
7960
7976
 
7961
- # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#91
7977
+ # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#90
7962
7978
  def heredoc_closing(node); end
7963
7979
 
7964
- # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#87
7980
+ # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#86
7965
7981
  def heredoc_opening(node); end
7966
7982
 
7967
- # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#118
7983
+ # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#117
7968
7984
  def indent_level(source_line); end
7969
7985
 
7970
- # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#95
7986
+ # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#94
7971
7987
  def indented_end(node); end
7972
7988
 
7973
- # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#110
7989
+ # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#109
7974
7990
  def message(node); end
7975
7991
 
7976
- # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#71
7992
+ # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#70
7977
7993
  def opening_indentation(node); end
7978
7994
  end
7979
7995
 
7980
- # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#54
7996
+ # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#53
7981
7997
  RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG = T.let(T.unsafe(nil), String)
7982
7998
 
7983
- # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#55
7999
+ # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#54
7984
8000
  RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG_ARG = T.let(T.unsafe(nil), String)
7985
8001
 
7986
- # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#53
8002
+ # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#52
7987
8003
  RuboCop::Cop::Layout::ClosingHeredocIndentation::SIMPLE_HEREDOC = T.let(T.unsafe(nil), String)
7988
8004
 
7989
8005
  # Checks the indentation of hanging closing parentheses in
@@ -18673,7 +18689,7 @@ end
18673
18689
  # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#51
18674
18690
  RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String)
18675
18691
 
18676
- # This cop emulates the following Ruby warnings in Ruby 2.6.
18692
+ # Emulates the following Ruby warnings in Ruby 2.6.
18677
18693
  #
18678
18694
  # [source,console]
18679
18695
  # ----
@@ -18728,42 +18744,42 @@ RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String)
18728
18744
  # ERB.new(str, nil, '-', '@output_buffer')
18729
18745
  # end
18730
18746
  #
18731
- # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#62
18747
+ # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#61
18732
18748
  class RuboCop::Cop::Lint::ErbNewArguments < ::RuboCop::Cop::Base
18733
18749
  include ::RuboCop::Cop::RangeHelp
18734
18750
  extend ::RuboCop::Cop::AutoCorrector
18735
18751
  extend ::RuboCop::Cop::TargetRubyVersion
18736
18752
 
18737
- # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#84
18753
+ # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#83
18738
18754
  def erb_new_with_non_keyword_arguments(param0 = T.unsafe(nil)); end
18739
18755
 
18740
- # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#89
18756
+ # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#88
18741
18757
  def on_send(node); end
18742
18758
 
18743
18759
  private
18744
18760
 
18745
- # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#154
18761
+ # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#153
18746
18762
  def arguments_range(node); end
18747
18763
 
18748
- # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#109
18764
+ # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#108
18749
18765
  def autocorrect(corrector, node); end
18750
18766
 
18751
- # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#124
18767
+ # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#123
18752
18768
  def build_kwargs(node); end
18753
18769
 
18754
18770
  # @return [Boolean]
18755
18771
  #
18756
- # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#120
18772
+ # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#119
18757
18773
  def correct_arguments?(arguments); end
18758
18774
 
18759
- # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#141
18775
+ # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#140
18760
18776
  def override_by_legacy_args(kwargs, node); end
18761
18777
  end
18762
18778
 
18763
- # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#69
18779
+ # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#68
18764
18780
  RuboCop::Cop::Lint::ErbNewArguments::MESSAGES = T.let(T.unsafe(nil), Array)
18765
18781
 
18766
- # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#81
18782
+ # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#80
18767
18783
  RuboCop::Cop::Lint::ErbNewArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
18768
18784
 
18769
18785
  # Looks for uses of flip-flop operator
@@ -19168,30 +19184,30 @@ RuboCop::Cop::Lint::HeredocMethodCallPosition::MSG = T.let(T.unsafe(nil), String
19168
19184
  # # good
19169
19185
  # foo.equal?(bar)
19170
19186
  #
19171
- # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#19
19187
+ # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#18
19172
19188
  class RuboCop::Cop::Lint::IdentityComparison < ::RuboCop::Cop::Base
19173
19189
  extend ::RuboCop::Cop::AutoCorrector
19174
19190
 
19175
- # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#25
19191
+ # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#24
19176
19192
  def on_send(node); end
19177
19193
 
19178
19194
  private
19179
19195
 
19180
19196
  # @return [Boolean]
19181
19197
  #
19182
- # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#41
19198
+ # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#40
19183
19199
  def compare_between_object_id_by_double_equal?(node); end
19184
19200
 
19185
19201
  # @return [Boolean]
19186
19202
  #
19187
- # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#45
19203
+ # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#44
19188
19204
  def object_id_method?(node); end
19189
19205
  end
19190
19206
 
19191
- # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#22
19207
+ # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#21
19192
19208
  RuboCop::Cop::Lint::IdentityComparison::MSG = T.let(T.unsafe(nil), String)
19193
19209
 
19194
- # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#23
19210
+ # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#22
19195
19211
  RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
19196
19212
 
19197
19213
  # Checks for implicit string concatenation of string literals
@@ -19252,7 +19268,7 @@ RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil
19252
19268
  # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#26
19253
19269
  RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), String)
19254
19270
 
19255
- # This cop checks for `IO.select` that is incompatible with Fiber Scheduler since Ruby 3.0.
19271
+ # Checks for `IO.select` that is incompatible with Fiber Scheduler since Ruby 3.0.
19256
19272
  #
19257
19273
  # When an array of IO objects waiting for an exception (the third argument of `IO.select`)
19258
19274
  # is used as an argument, there is no alternative API, so offenses are not registered.
@@ -19276,31 +19292,31 @@ RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), Stri
19276
19292
  # # good
19277
19293
  # io.wait_writable(timeout)
19278
19294
  #
19279
- # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#35
19295
+ # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#34
19280
19296
  class RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler < ::RuboCop::Cop::Base
19281
19297
  extend ::RuboCop::Cop::AutoCorrector
19282
19298
 
19283
- # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#42
19299
+ # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#41
19284
19300
  def io_select(param0 = T.unsafe(nil)); end
19285
19301
 
19286
- # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#47
19302
+ # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#46
19287
19303
  def on_send(node); end
19288
19304
 
19289
19305
  private
19290
19306
 
19291
- # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#70
19307
+ # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#69
19292
19308
  def preferred_method(read, write, timeout); end
19293
19309
 
19294
19310
  # @return [Boolean]
19295
19311
  #
19296
- # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#64
19312
+ # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#63
19297
19313
  def scheduler_compatible?(io1, io2); end
19298
19314
  end
19299
19315
 
19300
- # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#38
19316
+ # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#37
19301
19317
  RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::MSG = T.let(T.unsafe(nil), String)
19302
19318
 
19303
- # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#39
19319
+ # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#38
19304
19320
  RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
19305
19321
 
19306
19322
  # Checks for `private` or `protected` access modifiers which are
@@ -19429,20 +19445,25 @@ class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base
19429
19445
  # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#59
19430
19446
  def on_class(node); end
19431
19447
 
19432
- # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#69
19448
+ # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#70
19433
19449
  def on_send(node); end
19434
19450
 
19435
19451
  private
19436
19452
 
19437
19453
  # @return [Boolean]
19438
19454
  #
19439
- # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#86
19455
+ # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#87
19440
19456
  def exception_class?(class_node); end
19441
19457
 
19442
- # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#82
19458
+ # @return [Boolean]
19459
+ #
19460
+ # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#91
19461
+ def inherit_exception_class_with_omitted_namespace?(class_node); end
19462
+
19463
+ # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#83
19443
19464
  def message(node); end
19444
19465
 
19445
- # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#90
19466
+ # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#99
19446
19467
  def preferred_base_class; end
19447
19468
  end
19448
19469
 
@@ -19848,6 +19869,9 @@ RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil),
19848
19869
  # missing method. In other cases, the theoretical ideal handling could be
19849
19870
  # challenging or verbose for no actual gain.
19850
19871
  #
19872
+ # Autocorrection is not supported because the position of `super` cannot be
19873
+ # determined automatically.
19874
+ #
19851
19875
  # @example
19852
19876
  # # bad
19853
19877
  # class Employee < Person
@@ -19894,61 +19918,61 @@ RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil),
19894
19918
  # end
19895
19919
  # end
19896
19920
  #
19897
- # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#60
19921
+ # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#63
19898
19922
  class RuboCop::Cop::Lint::MissingSuper < ::RuboCop::Cop::Base
19899
- # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#74
19923
+ # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#77
19900
19924
  def class_new_block(param0 = T.unsafe(nil)); end
19901
19925
 
19902
- # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#80
19926
+ # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#83
19903
19927
  def on_def(node); end
19904
19928
 
19905
- # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#90
19929
+ # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#93
19906
19930
  def on_defs(node); end
19907
19931
 
19908
19932
  private
19909
19933
 
19910
19934
  # @return [Boolean]
19911
19935
  #
19912
- # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#102
19936
+ # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#105
19913
19937
  def callback_method_def?(node); end
19914
19938
 
19915
19939
  # @return [Boolean]
19916
19940
  #
19917
- # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#108
19941
+ # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#111
19918
19942
  def contains_super?(node); end
19919
19943
 
19920
19944
  # @return [Boolean]
19921
19945
  #
19922
- # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#112
19946
+ # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#115
19923
19947
  def inside_class_with_stateful_parent?(node); end
19924
19948
 
19925
19949
  # @return [Boolean]
19926
19950
  #
19927
- # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#98
19951
+ # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#101
19928
19952
  def offender?(node); end
19929
19953
 
19930
19954
  # @return [Boolean]
19931
19955
  #
19932
- # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#124
19956
+ # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#127
19933
19957
  def stateless_class?(node); end
19934
19958
  end
19935
19959
 
19936
- # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#71
19960
+ # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#74
19937
19961
  RuboCop::Cop::Lint::MissingSuper::CALLBACKS = T.let(T.unsafe(nil), Set)
19938
19962
 
19939
- # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#62
19963
+ # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#65
19940
19964
  RuboCop::Cop::Lint::MissingSuper::CALLBACK_MSG = T.let(T.unsafe(nil), String)
19941
19965
 
19942
- # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#66
19966
+ # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#69
19943
19967
  RuboCop::Cop::Lint::MissingSuper::CLASS_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array)
19944
19968
 
19945
- # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#61
19969
+ # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#64
19946
19970
  RuboCop::Cop::Lint::MissingSuper::CONSTRUCTOR_MSG = T.let(T.unsafe(nil), String)
19947
19971
 
19948
- # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#67
19972
+ # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#70
19949
19973
  RuboCop::Cop::Lint::MissingSuper::METHOD_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array)
19950
19974
 
19951
- # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#64
19975
+ # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#67
19952
19976
  RuboCop::Cop::Lint::MissingSuper::STATELESS_CLASSES = T.let(T.unsafe(nil), Array)
19953
19977
 
19954
19978
  # Do not mix named captures and numbered captures in a Regexp literal
@@ -20798,24 +20822,24 @@ RuboCop::Cop::Lint::OrAssignmentToConstant::MSG = T.let(T.unsafe(nil), String)
20798
20822
  # # frozen_string_literal: true
20799
20823
  # p [''.frozen?, ''.encoding] #=> [true, #<Encoding:US-ASCII>]
20800
20824
  #
20801
- # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#33
20825
+ # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#32
20802
20826
  class RuboCop::Cop::Lint::OrderedMagicComments < ::RuboCop::Cop::Base
20803
20827
  include ::RuboCop::Cop::FrozenStringLiteral
20804
20828
  extend ::RuboCop::Cop::AutoCorrector
20805
20829
 
20806
- # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#39
20830
+ # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#38
20807
20831
  def on_new_investigation; end
20808
20832
 
20809
20833
  private
20810
20834
 
20811
- # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#56
20835
+ # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#55
20812
20836
  def autocorrect(corrector, encoding_line, frozen_string_literal_line); end
20813
20837
 
20814
- # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#64
20838
+ # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#63
20815
20839
  def magic_comment_lines; end
20816
20840
  end
20817
20841
 
20818
- # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#37
20842
+ # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#36
20819
20843
  RuboCop::Cop::Lint::OrderedMagicComments::MSG = T.let(T.unsafe(nil), String)
20820
20844
 
20821
20845
  # Looks for references of Regexp captures that are out of range
@@ -22462,7 +22486,7 @@ RuboCop::Cop::Lint::SelfAssignment::ASSIGNMENT_TYPE_TO_RHS_TYPE = T.let(T.unsafe
22462
22486
  # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#20
22463
22487
  RuboCop::Cop::Lint::SelfAssignment::MSG = T.let(T.unsafe(nil), String)
22464
22488
 
22465
- # This cop checks for `send`, `public_send`, and `__send__` methods
22489
+ # Checks for `send`, `public_send`, and `__send__` methods
22466
22490
  # when using mix-in.
22467
22491
  #
22468
22492
  # `include` and `prepend` methods were private methods until Ruby 2.0,
@@ -22492,41 +22516,41 @@ RuboCop::Cop::Lint::SelfAssignment::MSG = T.let(T.unsafe(nil), String)
22492
22516
  # Foo.prepend Bar
22493
22517
  # Foo.extend Bar
22494
22518
  #
22495
- # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#37
22519
+ # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#36
22496
22520
  class RuboCop::Cop::Lint::SendWithMixinArgument < ::RuboCop::Cop::Base
22497
22521
  include ::RuboCop::Cop::RangeHelp
22498
22522
  extend ::RuboCop::Cop::AutoCorrector
22499
22523
 
22500
- # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#54
22524
+ # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#53
22501
22525
  def on_send(node); end
22502
22526
 
22503
- # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#47
22527
+ # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#46
22504
22528
  def send_with_mixin_argument?(param0 = T.unsafe(nil)); end
22505
22529
 
22506
22530
  private
22507
22531
 
22508
- # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#68
22532
+ # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#67
22509
22533
  def bad_location(node); end
22510
22534
 
22511
- # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#74
22535
+ # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#73
22512
22536
  def message(method, module_name, bad_method); end
22513
22537
 
22514
22538
  # @return [Boolean]
22515
22539
  #
22516
- # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#78
22540
+ # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#77
22517
22541
  def mixin_method?(node); end
22518
22542
  end
22519
22543
 
22520
- # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#42
22544
+ # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#41
22521
22545
  RuboCop::Cop::Lint::SendWithMixinArgument::MIXIN_METHODS = T.let(T.unsafe(nil), Array)
22522
22546
 
22523
- # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#41
22547
+ # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#40
22524
22548
  RuboCop::Cop::Lint::SendWithMixinArgument::MSG = T.let(T.unsafe(nil), String)
22525
22549
 
22526
- # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#44
22550
+ # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#43
22527
22551
  RuboCop::Cop::Lint::SendWithMixinArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
22528
22552
 
22529
- # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#43
22553
+ # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#42
22530
22554
  RuboCop::Cop::Lint::SendWithMixinArgument::SEND_METHODS = T.let(T.unsafe(nil), Array)
22531
22555
 
22532
22556
  # Checks for shadowed arguments.
@@ -22716,7 +22740,7 @@ class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base
22716
22740
  # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#119
22717
22741
  def evaluate_exceptions(group); end
22718
22742
 
22719
- # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#158
22743
+ # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#152
22720
22744
  def find_shadowing_rescue(rescues); end
22721
22745
 
22722
22746
  # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#84
@@ -22727,7 +22751,7 @@ class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base
22727
22751
 
22728
22752
  # @return [Boolean]
22729
22753
  #
22730
- # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#143
22754
+ # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#137
22731
22755
  def sorted?(rescued_groups); end
22732
22756
 
22733
22757
  # @return [Boolean]
@@ -24360,7 +24384,7 @@ class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base
24360
24384
  # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50
24361
24385
  def after_leaving_scope(scope, _variable_table); end
24362
24386
 
24363
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#135
24387
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#136
24364
24388
  def autocorrect(corrector, assignment); end
24365
24389
 
24366
24390
  # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#54
@@ -24381,19 +24405,19 @@ class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base
24381
24405
  # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#95
24382
24406
  def operator_assignment_message(scope, assignment); end
24383
24407
 
24384
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#150
24408
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#153
24385
24409
  def remove_exception_assignment_part(corrector, node); end
24386
24410
 
24387
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#174
24411
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#177
24388
24412
  def remove_local_variable_assignment_part(corrector, node); end
24389
24413
 
24390
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#163
24414
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#166
24391
24415
  def remove_trailing_character_from_operator(corrector, node); end
24392
24416
 
24393
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#159
24417
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#162
24394
24418
  def rename_variable_with_underscore(corrector, node); end
24395
24419
 
24396
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#167
24420
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#170
24397
24421
  def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end
24398
24422
 
24399
24423
  # TODO: More precise handling (rescue, ensure, nested begin, etc.)
@@ -25797,7 +25821,7 @@ class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator
25797
25821
 
25798
25822
  # @return [Boolean]
25799
25823
  #
25800
- # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#128
25824
+ # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#127
25801
25825
  def argument?(node); end
25802
25826
 
25803
25827
  # @return [Boolean]
@@ -25807,7 +25831,7 @@ class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator
25807
25831
 
25808
25832
  # @return [Boolean]
25809
25833
  #
25810
- # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#124
25834
+ # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#123
25811
25835
  def branch?(node); end
25812
25836
 
25813
25837
  # @return [Boolean]
@@ -25820,7 +25844,7 @@ class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator
25820
25844
 
25821
25845
  # @return [Boolean]
25822
25846
  #
25823
- # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#132
25847
+ # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#131
25824
25848
  def condition?(node); end
25825
25849
 
25826
25850
  # @return [Boolean]
@@ -27873,11 +27897,14 @@ RuboCop::Cop::Naming::RescuedExceptionsVariableName::MSG = T.let(T.unsafe(nil),
27873
27897
  #
27874
27898
  # # good
27875
27899
  # fooBar = 1
27900
+ # @example AllowedIdentifiers: ['fooBar']
27901
+ # # good (with EnforcedStyle: snake_case)
27902
+ # fooBar = 1
27876
27903
  # @example AllowedPatterns: ['_v\d+\z']
27877
- # # good
27904
+ # # good (with EnforcedStyle: camelCase)
27878
27905
  # :release_v1
27879
27906
  #
27880
- # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#26
27907
+ # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#31
27881
27908
  class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base
27882
27909
  include ::RuboCop::Cop::AllowedIdentifiers
27883
27910
  include ::RuboCop::Cop::ConfigurableEnforcedStyle
@@ -27885,51 +27912,51 @@ class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base
27885
27912
  include ::RuboCop::Cop::ConfigurableNaming
27886
27913
  include ::RuboCop::Cop::AllowedPattern
27887
27914
 
27888
- # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37
27915
+ # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
27889
27916
  def on_arg(node); end
27890
27917
 
27891
- # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37
27918
+ # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
27892
27919
  def on_blockarg(node); end
27893
27920
 
27894
- # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37
27921
+ # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
27895
27922
  def on_cvasgn(node); end
27896
27923
 
27897
- # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37
27924
+ # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
27898
27925
  def on_ivasgn(node); end
27899
27926
 
27900
- # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37
27927
+ # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
27901
27928
  def on_kwarg(node); end
27902
27929
 
27903
- # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37
27930
+ # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
27904
27931
  def on_kwoptarg(node); end
27905
27932
 
27906
- # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37
27933
+ # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
27907
27934
  def on_kwrestarg(node); end
27908
27935
 
27909
- # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37
27936
+ # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
27910
27937
  def on_lvar(node); end
27911
27938
 
27912
- # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37
27939
+ # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
27913
27940
  def on_lvasgn(node); end
27914
27941
 
27915
- # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37
27942
+ # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
27916
27943
  def on_optarg(node); end
27917
27944
 
27918
- # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37
27945
+ # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
27919
27946
  def on_restarg(node); end
27920
27947
 
27921
27948
  # @return [Boolean]
27922
27949
  #
27923
- # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#33
27950
+ # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#38
27924
27951
  def valid_name?(node, name, given_style = T.unsafe(nil)); end
27925
27952
 
27926
27953
  private
27927
27954
 
27928
- # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#57
27955
+ # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#62
27929
27956
  def message(style); end
27930
27957
  end
27931
27958
 
27932
- # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#31
27959
+ # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#36
27933
27960
  RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String)
27934
27961
 
27935
27962
  # Makes sure that all numbered variables use the
@@ -29990,29 +30017,29 @@ class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base
29990
30017
  # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#71
29991
30018
  def check(send_node); end
29992
30019
 
29993
- # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#110
30020
+ # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#114
29994
30021
  def class_send_elements(class_node); end
29995
30022
 
29996
- # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#153
30023
+ # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#157
29997
30024
  def group_accessors(node, accessors); end
29998
30025
 
29999
30026
  # @return [Boolean]
30000
30027
  #
30001
- # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#95
30028
+ # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#96
30002
30029
  def groupable_accessor?(node); end
30003
30030
 
30004
- # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#130
30031
+ # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#134
30005
30032
  def groupable_sibling_accessors(send_node); end
30006
30033
 
30007
30034
  # @return [Boolean]
30008
30035
  #
30009
- # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#122
30036
+ # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#126
30010
30037
  def grouped_style?; end
30011
30038
 
30012
- # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#139
30039
+ # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#143
30013
30040
  def message(send_node); end
30014
30041
 
30015
- # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#144
30042
+ # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#148
30016
30043
  def preferred_accessors(node); end
30017
30044
 
30018
30045
  # @return [Boolean]
@@ -30020,12 +30047,12 @@ class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base
30020
30047
  # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#91
30021
30048
  def previous_line_comment?(node); end
30022
30049
 
30023
- # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#159
30050
+ # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#163
30024
30051
  def separate_accessors(node); end
30025
30052
 
30026
30053
  # @return [Boolean]
30027
30054
  #
30028
- # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#126
30055
+ # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#130
30029
30056
  def separated_style?; end
30030
30057
  end
30031
30058
 
@@ -30631,19 +30658,19 @@ end
30631
30658
  # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#30
30632
30659
  RuboCop::Cop::Style::BarePercentLiterals::MSG = T.let(T.unsafe(nil), String)
30633
30660
 
30634
- # This cop checks for BEGIN blocks.
30661
+ # Checks for BEGIN blocks.
30635
30662
  #
30636
30663
  # @example
30637
30664
  # # bad
30638
30665
  # BEGIN { test }
30639
30666
  #
30640
- # source://rubocop//lib/rubocop/cop/style/begin_block.rb#13
30667
+ # source://rubocop//lib/rubocop/cop/style/begin_block.rb#12
30641
30668
  class RuboCop::Cop::Style::BeginBlock < ::RuboCop::Cop::Base
30642
- # source://rubocop//lib/rubocop/cop/style/begin_block.rb#16
30669
+ # source://rubocop//lib/rubocop/cop/style/begin_block.rb#15
30643
30670
  def on_preexe(node); end
30644
30671
  end
30645
30672
 
30646
- # source://rubocop//lib/rubocop/cop/style/begin_block.rb#14
30673
+ # source://rubocop//lib/rubocop/cop/style/begin_block.rb#13
30647
30674
  RuboCop::Cop::Style::BeginBlock::MSG = T.let(T.unsafe(nil), String)
30648
30675
 
30649
30676
  # Checks for places where `attr_reader` and `attr_writer`
@@ -31571,7 +31598,7 @@ RuboCop::Cop::Style::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
31571
31598
 
31572
31599
  # Enforces the use of `Object#instance_of?` instead of class comparison
31573
31600
  # for equality.
31574
- # `==`, `equal?`, and `eql?` methods are allowed by default.
31601
+ # `==`, `equal?`, and `eql?` custom method definitions are allowed by default.
31575
31602
  # These are customizable with `AllowedMethods` option.
31576
31603
  #
31577
31604
  # @example
@@ -31583,98 +31610,77 @@ RuboCop::Cop::Style::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
31583
31610
  #
31584
31611
  # # good
31585
31612
  # var.instance_of?(Date)
31586
- # @example AllowedMethods: [] (default)
31613
+ # @example AllowedMethods: ['==', 'equal?', 'eql?'] (default)
31587
31614
  # # good
31588
- # var.instance_of?(Date)
31615
+ # def ==(other)
31616
+ # self.class == other.class && name == other.name
31617
+ # end
31589
31618
  #
31590
- # # bad
31591
- # var.class == Date
31592
- # var.class.equal?(Date)
31593
- # var.class.eql?(Date)
31594
- # var.class.name == 'Date'
31595
- # var.class.to_s == 'Date'
31596
- # var.class.inspect == 'Date'
31597
- # @example AllowedMethods: [`==`]
31598
- # # good
31599
- # var.instance_of?(Date)
31600
- # var.class == Date
31601
- # var.class.name == 'Date'
31602
- # var.class.to_s == 'Date'
31603
- # var.class.inspect == 'Date'
31619
+ # def equal?(other)
31620
+ # self.class.equal?(other.class) && name.equal?(other.name)
31621
+ # end
31604
31622
  #
31605
- # # bad
31606
- # var.class.equal?(Date)
31607
- # var.class.eql?(Date)
31623
+ # def eql?(other)
31624
+ # self.class.eql?(other.class) && name.eql?(other.name)
31625
+ # end
31608
31626
  # @example AllowedPatterns: [] (default)
31609
- # # good
31610
- # var.instance_of?(Date)
31611
- #
31612
31627
  # # bad
31613
- # var.class == Date
31614
- # var.class.equal?(Date)
31615
- # var.class.eql?(Date)
31616
- # var.class.name == 'Date'
31617
- # var.class.to_s == 'Date'
31618
- # var.class.inspect == 'Date'
31628
+ # def eq(other)
31629
+ # self.class.eq(other.class) && name.eq(other.name)
31630
+ # end
31619
31631
  # @example AllowedPatterns: ['eq']
31620
31632
  # # good
31621
- # var.instance_of?(Date)
31622
- # var.class.equal?(Date)
31623
- # var.class.eql?(Date)
31624
- #
31625
- # # bad
31626
- # var.class == Date
31627
- # var.class.name == 'Date'
31628
- # var.class.to_s == 'Date'
31629
- # var.class.inspect == 'Date'
31633
+ # def eq(other)
31634
+ # self.class.eq(other.class) && name.eq(other.name)
31635
+ # end
31630
31636
  #
31631
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#69
31637
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#47
31632
31638
  class RuboCop::Cop::Style::ClassEqualityComparison < ::RuboCop::Cop::Base
31633
31639
  include ::RuboCop::Cop::RangeHelp
31634
31640
  include ::RuboCop::Cop::AllowedMethods
31635
31641
  include ::RuboCop::Cop::AllowedPattern
31636
31642
  extend ::RuboCop::Cop::AutoCorrector
31637
31643
 
31638
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#81
31644
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#59
31639
31645
  def class_comparison_candidate?(param0 = T.unsafe(nil)); end
31640
31646
 
31641
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#87
31647
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#65
31642
31648
  def on_send(node); end
31643
31649
 
31644
31650
  private
31645
31651
 
31646
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#107
31652
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#85
31647
31653
  def class_name(class_node, node); end
31648
31654
 
31649
31655
  # @return [Boolean]
31650
31656
  #
31651
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#127
31657
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#105
31652
31658
  def class_name_method?(method_name); end
31653
31659
 
31654
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#143
31660
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#121
31655
31661
  def offense_range(receiver_node, node); end
31656
31662
 
31657
31663
  # @return [Boolean]
31658
31664
  #
31659
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#131
31665
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#109
31660
31666
  def require_cbase?(class_node); end
31661
31667
 
31662
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#139
31668
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#117
31663
31669
  def trim_string_quotes(class_node); end
31664
31670
 
31665
31671
  # @return [Boolean]
31666
31672
  #
31667
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#135
31673
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#113
31668
31674
  def unable_to_determine_type?(class_node); end
31669
31675
  end
31670
31676
 
31671
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#78
31677
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#56
31672
31678
  RuboCop::Cop::Style::ClassEqualityComparison::CLASS_NAME_METHODS = T.let(T.unsafe(nil), Array)
31673
31679
 
31674
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#75
31680
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#53
31675
31681
  RuboCop::Cop::Style::ClassEqualityComparison::MSG = T.let(T.unsafe(nil), String)
31676
31682
 
31677
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#77
31683
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#55
31678
31684
  RuboCop::Cop::Style::ClassEqualityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
31679
31685
 
31680
31686
  # Checks for uses of the class/module name instead of
@@ -31896,49 +31902,53 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
31896
31902
  #
31897
31903
  # # good
31898
31904
  # hash.compact!
31905
+ # @example AllowedReceivers: ['params']
31906
+ # # good
31907
+ # params.reject(&:nil?)
31899
31908
  #
31900
- # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#38
31909
+ # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#42
31901
31910
  class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base
31911
+ include ::RuboCop::Cop::AllowedReceivers
31902
31912
  include ::RuboCop::Cop::RangeHelp
31903
31913
  extend ::RuboCop::Cop::AutoCorrector
31904
31914
  extend ::RuboCop::Cop::TargetRubyVersion
31905
31915
 
31906
- # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#77
31916
+ # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#82
31907
31917
  def on_send(node); end
31908
31918
 
31909
- # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#57
31919
+ # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#62
31910
31920
  def reject_method?(param0 = T.unsafe(nil)); end
31911
31921
 
31912
- # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#50
31922
+ # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#55
31913
31923
  def reject_method_with_block_pass?(param0 = T.unsafe(nil)); end
31914
31924
 
31915
- # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#67
31925
+ # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#72
31916
31926
  def select_method?(param0 = T.unsafe(nil)); end
31917
31927
 
31918
31928
  private
31919
31929
 
31920
- # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#113
31930
+ # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#119
31921
31931
  def good_method_name(node); end
31922
31932
 
31923
- # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#91
31933
+ # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#97
31924
31934
  def offense_range(node); end
31925
31935
 
31926
- # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#121
31936
+ # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#127
31927
31937
  def range(begin_pos_node, end_pos_node); end
31928
31938
 
31929
31939
  # @return [Boolean]
31930
31940
  #
31931
- # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#107
31941
+ # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#113
31932
31942
  def to_enum_method?(node); end
31933
31943
  end
31934
31944
 
31935
- # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#43
31945
+ # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#48
31936
31946
  RuboCop::Cop::Style::CollectionCompact::MSG = T.let(T.unsafe(nil), String)
31937
31947
 
31938
- # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#44
31948
+ # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#49
31939
31949
  RuboCop::Cop::Style::CollectionCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
31940
31950
 
31941
- # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#45
31951
+ # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#50
31942
31952
  RuboCop::Cop::Style::CollectionCompact::TO_ENUM_METHODS = T.let(T.unsafe(nil), Array)
31943
31953
 
31944
31954
  # Enforces the use of consistent method names
@@ -33232,7 +33242,7 @@ end
33232
33242
  # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45
33233
33243
  RuboCop::Cop::Style::DefWithParentheses::MSG = T.let(T.unsafe(nil), String)
33234
33244
 
33235
- # Checks for places where the `#__dir__` method can replace more
33245
+ # Checks for places where the `#\_\_dir\_\_` method can replace more
33236
33246
  # complex constructs to retrieve a canonicalized absolute path to the
33237
33247
  # current file.
33238
33248
  #
@@ -33291,12 +33301,12 @@ class RuboCop::Cop::Style::DirEmpty < ::RuboCop::Cop::Base
33291
33301
  # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#28
33292
33302
  def offensive?(param0 = T.unsafe(nil)); end
33293
33303
 
33294
- # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#39
33304
+ # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#37
33295
33305
  def on_send(node); end
33296
33306
 
33297
33307
  private
33298
33308
 
33299
- # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#51
33309
+ # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#48
33300
33310
  def bang(node); end
33301
33311
  end
33302
33312
 
@@ -34715,12 +34725,12 @@ RuboCop::Cop::Style::EnvHome::MSG = T.let(T.unsafe(nil), String)
34715
34725
  RuboCop::Cop::Style::EnvHome::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
34716
34726
 
34717
34727
  # Ensures that eval methods (`eval`, `instance_eval`, `class_eval`
34718
- # and `module_eval`) are given filename and line number values (`__FILE__`
34719
- # and `__LINE__`). This data is used to ensure that any errors raised
34728
+ # and `module_eval`) are given filename and line number values (`\_\_FILE\_\_`
34729
+ # and `\_\_LINE\_\_`). This data is used to ensure that any errors raised
34720
34730
  # within the evaluated code will be given the correct identification
34721
34731
  # in a backtrace.
34722
34732
  #
34723
- # The cop also checks that the line number given relative to `__LINE__` is
34733
+ # The cop also checks that the line number given relative to `\_\_LINE\_\_` is
34724
34734
  # correct.
34725
34735
  #
34726
34736
  # This cop will autocorrect incorrect or missing filename and line number
@@ -34924,7 +34934,12 @@ class RuboCop::Cop::Style::ExactRegexpMatch < ::RuboCop::Cop::Base
34924
34934
 
34925
34935
  private
34926
34936
 
34927
- # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#56
34937
+ # @return [Boolean]
34938
+ #
34939
+ # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#55
34940
+ def exact_match_pattern?(parsed_regexp); end
34941
+
34942
+ # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#62
34928
34943
  def new_method(node); end
34929
34944
  end
34930
34945
 
@@ -36458,68 +36473,58 @@ RuboCop::Cop::Style::HashConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr
36458
36473
  #
36459
36474
  # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#30
36460
36475
  class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base
36476
+ include ::RuboCop::Cop::AllowedReceivers
36461
36477
  include ::RuboCop::Cop::Lint::UnusedArgument
36462
36478
  extend ::RuboCop::Cop::AutoCorrector
36463
36479
 
36464
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#37
36480
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#38
36465
36481
  def kv_each(param0 = T.unsafe(nil)); end
36466
36482
 
36467
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#42
36483
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#43
36468
36484
  def kv_each_with_block_pass(param0 = T.unsafe(nil)); end
36469
36485
 
36470
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#46
36486
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#47
36471
36487
  def on_block(node); end
36472
36488
 
36473
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#54
36489
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#55
36474
36490
  def on_block_pass(node); end
36475
36491
 
36476
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#46
36492
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#47
36477
36493
  def on_numblock(node); end
36478
36494
 
36479
36495
  private
36480
36496
 
36481
- # @return [Boolean]
36482
- #
36483
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#120
36484
- def allowed_receiver?(receiver); end
36485
-
36486
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#138
36487
- def allowed_receivers; end
36488
-
36489
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#85
36497
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#86
36490
36498
  def check_argument(variable); end
36491
36499
 
36492
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#109
36500
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#110
36493
36501
  def correct_args(node, corrector); end
36494
36502
 
36495
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#95
36503
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#96
36496
36504
  def correct_implicit(node, corrector, method_name); end
36497
36505
 
36498
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#100
36506
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#101
36499
36507
  def correct_key_value_each(node, corrector); end
36500
36508
 
36501
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#81
36509
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#82
36502
36510
  def format_message(method_name); end
36503
36511
 
36504
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#116
36512
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#117
36505
36513
  def kv_range(outer_node); end
36506
36514
 
36507
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#126
36508
- def receiver_name(receiver); end
36509
-
36510
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#62
36515
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#63
36511
36516
  def register_kv_offense(target, method); end
36512
36517
 
36513
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#71
36518
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#72
36514
36519
  def register_kv_with_block_pass_offense(node, target, method); end
36515
36520
 
36516
36521
  # @return [Boolean]
36517
36522
  #
36518
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#91
36523
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#92
36519
36524
  def used?(arg); end
36520
36525
  end
36521
36526
 
36522
- # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#34
36527
+ # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#35
36523
36528
  RuboCop::Cop::Style::HashEachMethods::MSG = T.let(T.unsafe(nil), String)
36524
36529
 
36525
36530
  # Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods
@@ -36842,8 +36847,8 @@ RuboCop::Cop::Style::HashSyntax::MSG_HASH_ROCKETS = T.let(T.unsafe(nil), String)
36842
36847
  # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#120
36843
36848
  RuboCop::Cop::Style::HashSyntax::MSG_NO_MIXED_KEYS = T.let(T.unsafe(nil), String)
36844
36849
 
36845
- # Looks for uses of `_.each_with_object({}) {...}`,
36846
- # `_.map {...}.to_h`, and `Hash[_.map {...}]` that are actually just
36850
+ # Looks for uses of `\_.each_with_object({}) {...}`,
36851
+ # `\_.map {...}.to_h`, and `Hash[\_.map {...}]` that are actually just
36847
36852
  # transforming the keys of a hash, and tries to use a simpler & faster
36848
36853
  # call to `transform_keys` instead.
36849
36854
  # It should only be enabled on Ruby version 2.5 or newer.
@@ -36887,8 +36892,8 @@ class RuboCop::Cop::Style::HashTransformKeys < ::RuboCop::Cop::Base
36887
36892
  def new_method_name; end
36888
36893
  end
36889
36894
 
36890
- # Looks for uses of `_.each_with_object({}) {...}`,
36891
- # `_.map {...}.to_h`, and `Hash[_.map {...}]` that are actually just
36895
+ # Looks for uses of `\_.each_with_object({}) {...}`,
36896
+ # `\_.map {...}.to_h`, and `Hash[\_.map {...}]` that are actually just
36892
36897
  # transforming the values of a hash, and tries to use a simpler & faster
36893
36898
  # call to `transform_values` instead.
36894
36899
  #
@@ -38865,12 +38870,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
38865
38870
 
38866
38871
  # @return [Boolean]
38867
38872
  #
38868
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#159
38873
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#158
38869
38874
  def allowed_chained_call_with_parentheses?(node); end
38870
38875
 
38871
38876
  # @return [Boolean]
38872
38877
  #
38873
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#155
38878
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#154
38874
38879
  def allowed_multiline_call_with_parentheses?(node); end
38875
38880
 
38876
38881
  # @return [Boolean]
@@ -38880,17 +38885,17 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
38880
38885
 
38881
38886
  # @return [Boolean]
38882
38887
  #
38883
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#168
38888
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#167
38884
38889
  def ambiguous_literal?(node); end
38885
38890
 
38886
38891
  # @return [Boolean]
38887
38892
  #
38888
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#197
38893
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#196
38889
38894
  def assigned_before?(node, target); end
38890
38895
 
38891
38896
  # @return [Boolean]
38892
38897
  #
38893
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#205
38898
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#204
38894
38899
  def assignment_in_condition?(node); end
38895
38900
 
38896
38901
  # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#31
@@ -38898,7 +38903,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
38898
38903
 
38899
38904
  # @return [Boolean]
38900
38905
  #
38901
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#142
38906
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#141
38902
38907
  def call_as_argument_or_chain?(node); end
38903
38908
 
38904
38909
  # @return [Boolean]
@@ -38933,17 +38938,17 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
38933
38938
 
38934
38939
  # @return [Boolean]
38935
38940
  #
38936
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#215
38941
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#214
38937
38942
  def forwards_anonymous_rest_arguments?(node); end
38938
38943
 
38939
38944
  # @return [Boolean]
38940
38945
  #
38941
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#184
38946
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#183
38942
38947
  def hash_literal?(node); end
38943
38948
 
38944
38949
  # @return [Boolean]
38945
38950
  #
38946
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#148
38951
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#147
38947
38952
  def hash_literal_in_arguments?(node); end
38948
38953
 
38949
38954
  # @return [Boolean]
@@ -38953,7 +38958,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
38953
38958
 
38954
38959
  # @return [Boolean]
38955
38960
  #
38956
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#201
38961
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#200
38957
38962
  def inside_string_interpolation?(node); end
38958
38963
 
38959
38964
  # Require hash value omission be enclosed in parentheses to prevent the following issue:
@@ -38971,7 +38976,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
38971
38976
 
38972
38977
  # @return [Boolean]
38973
38978
  #
38974
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#180
38979
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#179
38975
38980
  def logical_operator?(node); end
38976
38981
 
38977
38982
  # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#40
@@ -38987,7 +38992,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
38987
38992
 
38988
38993
  # @return [Boolean]
38989
38994
  #
38990
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#188
38995
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#187
38991
38996
  def regexp_slash_literal?(node); end
38992
38997
 
38993
38998
  # @return [Boolean]
@@ -38997,7 +39002,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
38997
39002
 
38998
39003
  # @return [Boolean]
38999
39004
  #
39000
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#172
39005
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#171
39001
39006
  def splat?(node); end
39002
39007
 
39003
39008
  # @return [Boolean]
@@ -39012,12 +39017,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
39012
39017
 
39013
39018
  # @return [Boolean]
39014
39019
  #
39015
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#176
39020
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#175
39016
39021
  def ternary_if?(node); end
39017
39022
 
39018
39023
  # @return [Boolean]
39019
39024
  #
39020
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#192
39025
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#191
39021
39026
  def unary_literal?(node); end
39022
39027
  end
39023
39028
 
@@ -40293,70 +40298,79 @@ RuboCop::Cop::Style::MultilineWhenThen::MSG = T.let(T.unsafe(nil), String)
40293
40298
  #
40294
40299
  # # good
40295
40300
  # foo if [b.lightweight, b.heavyweight].include?(a)
40301
+ # @example ComparisonsThreshold: 2 (default)
40302
+ # # bad
40303
+ # foo if a == 'a' || a == 'b'
40304
+ # @example ComparisonsThreshold: 3
40305
+ # # good
40306
+ # foo if a == 'a' || a == 'b'
40296
40307
  #
40297
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#43
40308
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#52
40298
40309
  class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base
40299
40310
  extend ::RuboCop::Cop::AutoCorrector
40300
40311
 
40301
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#49
40312
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#58
40302
40313
  def on_new_investigation; end
40303
40314
 
40304
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#53
40315
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#62
40305
40316
  def on_or(node); end
40306
40317
 
40307
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#78
40318
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#88
40308
40319
  def simple_comparison_lhs?(param0 = T.unsafe(nil)); end
40309
40320
 
40310
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#83
40321
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#93
40311
40322
  def simple_comparison_rhs?(param0 = T.unsafe(nil)); end
40312
40323
 
40313
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#75
40324
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#85
40314
40325
  def simple_double_comparison?(param0 = T.unsafe(nil)); end
40315
40326
 
40316
40327
  private
40317
40328
 
40318
40329
  # @return [Boolean]
40319
40330
  #
40320
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#151
40331
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#161
40321
40332
  def allow_method_comparison?; end
40322
40333
 
40323
40334
  # @return [Boolean]
40324
40335
  #
40325
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#126
40336
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#136
40326
40337
  def comparison?(node); end
40327
40338
 
40339
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#165
40340
+ def comparisons_threshold; end
40341
+
40328
40342
  # @return [Boolean]
40329
40343
  #
40330
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#118
40344
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#128
40331
40345
  def nested_comparison?(node); end
40332
40346
 
40333
40347
  # @return [Boolean]
40334
40348
  #
40335
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#87
40349
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#97
40336
40350
  def nested_variable_comparison?(node); end
40337
40351
 
40338
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#146
40352
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#156
40339
40353
  def reset_comparison; end
40340
40354
 
40341
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#130
40355
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#140
40342
40356
  def root_of_or_node(or_node); end
40343
40357
 
40344
40358
  # @return [Boolean]
40345
40359
  #
40346
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#140
40360
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#150
40347
40361
  def switch_comparison?(node); end
40348
40362
 
40349
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#114
40363
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#124
40350
40364
  def variable_name(node); end
40351
40365
 
40352
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#93
40366
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#103
40353
40367
  def variables_in_node(node); end
40354
40368
 
40355
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#101
40369
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#111
40356
40370
  def variables_in_simple_node(node); end
40357
40371
  end
40358
40372
 
40359
- # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#46
40373
+ # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#55
40360
40374
  RuboCop::Cop::Style::MultipleComparison::MSG = T.let(T.unsafe(nil), String)
40361
40375
 
40362
40376
  # Checks whether some constant value isn't a
@@ -43122,6 +43136,47 @@ end
43122
43136
  # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#57
43123
43137
  RuboCop::Cop::Style::RedundantArgument::MSG = T.let(T.unsafe(nil), String)
43124
43138
 
43139
+ # Checks for the instantiation of array using redundant `Array` constructor.
43140
+ # Autocorrect replaces to array literal which is the simplest and fastest.
43141
+ #
43142
+ # @example
43143
+ #
43144
+ # # bad
43145
+ # Array.new([])
43146
+ # Array[]
43147
+ # Array([])
43148
+ # Array.new(['foo', 'foo', 'foo'])
43149
+ # Array['foo', 'foo', 'foo']
43150
+ # Array(['foo', 'foo', 'foo'])
43151
+ #
43152
+ # # good
43153
+ # []
43154
+ # ['foo', 'foo', 'foo']
43155
+ # Array.new(3, 'foo')
43156
+ # Array.new(3) { 'foo' }
43157
+ #
43158
+ # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#25
43159
+ class RuboCop::Cop::Style::RedundantArrayConstructor < ::RuboCop::Cop::Base
43160
+ extend ::RuboCop::Cop::AutoCorrector
43161
+
43162
+ # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#47
43163
+ def on_send(node); end
43164
+
43165
+ # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#33
43166
+ def redundant_array_constructor(param0 = T.unsafe(nil)); end
43167
+
43168
+ private
43169
+
43170
+ # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#69
43171
+ def register_offense(range, node, replacement); end
43172
+ end
43173
+
43174
+ # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#28
43175
+ RuboCop::Cop::Style::RedundantArrayConstructor::MSG = T.let(T.unsafe(nil), String)
43176
+
43177
+ # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#30
43178
+ RuboCop::Cop::Style::RedundantArrayConstructor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
43179
+
43125
43180
  # Checks for redundant assignment before returning.
43126
43181
  #
43127
43182
  # @example
@@ -43919,6 +43974,70 @@ RuboCop::Cop::Style::RedundantFileExtensionInRequire::MSG = T.let(T.unsafe(nil),
43919
43974
  # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#32
43920
43975
  RuboCop::Cop::Style::RedundantFileExtensionInRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
43921
43976
 
43977
+ # Identifies usages of `any?`, `empty?` or `none?` predicate methods
43978
+ # chained to `select`/`filter`/`find_all` and change them to use predicate method instead.
43979
+ #
43980
+ # @example
43981
+ # # bad
43982
+ # arr.select { |x| x > 1 }.any?
43983
+ #
43984
+ # # good
43985
+ # arr.any? { |x| x > 1 }
43986
+ #
43987
+ # # bad
43988
+ # arr.select { |x| x > 1 }.empty?
43989
+ # arr.select { |x| x > 1 }.none?
43990
+ #
43991
+ # # good
43992
+ # arr.none? { |x| x > 1 }
43993
+ #
43994
+ # # good
43995
+ # relation.select(:name).any?
43996
+ # arr.select { |x| x > 1 }.any?(&:odd?)
43997
+ # @example AllCops:ActiveSupportExtensionsEnabled: false (default)
43998
+ # # good
43999
+ # arr.select { |x| x > 1 }.many?
44000
+ # @example AllCops:ActiveSupportExtensionsEnabled: true
44001
+ # # bad
44002
+ # arr.select { |x| x > 1 }.many?
44003
+ #
44004
+ # # good
44005
+ # arr.many? { |x| x > 1 }
44006
+ #
44007
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#38
44008
+ class RuboCop::Cop::Style::RedundantFilterChain < ::RuboCop::Cop::Base
44009
+ extend ::RuboCop::Cop::AutoCorrector
44010
+
44011
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#65
44012
+ def on_send(node); end
44013
+
44014
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#47
44015
+ def select_predicate?(param0 = T.unsafe(nil)); end
44016
+
44017
+ private
44018
+
44019
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#91
44020
+ def offense_range(select_node, predicate_node); end
44021
+
44022
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#95
44023
+ def predicate_range(predicate_node); end
44024
+
44025
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#77
44026
+ def register_offense(select_node, predicate_node); end
44027
+ end
44028
+
44029
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#41
44030
+ RuboCop::Cop::Style::RedundantFilterChain::MSG = T.let(T.unsafe(nil), String)
44031
+
44032
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#43
44033
+ RuboCop::Cop::Style::RedundantFilterChain::RAILS_METHODS = T.let(T.unsafe(nil), Array)
44034
+
44035
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#56
44036
+ RuboCop::Cop::Style::RedundantFilterChain::REPLACEMENT_METHODS = T.let(T.unsafe(nil), Hash)
44037
+
44038
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#44
44039
+ RuboCop::Cop::Style::RedundantFilterChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
44040
+
43922
44041
  # Check for uses of `Object#freeze` on immutable objects.
43923
44042
  #
43924
44043
  # NOTE: Regexp and Range literals are frozen objects since Ruby 3.0.
@@ -44700,6 +44819,37 @@ RuboCop::Cop::Style::RedundantRegexpCharacterClass::MSG_REDUNDANT_CHARACTER_CLAS
44700
44819
  # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#33
44701
44820
  RuboCop::Cop::Style::RedundantRegexpCharacterClass::REQUIRES_ESCAPE_OUTSIDE_CHAR_CLASS_CHARS = T.let(T.unsafe(nil), Array)
44702
44821
 
44822
+ # Checks for the instantiation of regexp using redundant `Regexp.new` or `Regexp.compile`.
44823
+ # Autocorrect replaces to regexp literal which is the simplest and fastest.
44824
+ #
44825
+ # @example
44826
+ #
44827
+ # # bad
44828
+ # Regexp.new(/regexp/)
44829
+ # Regexp.compile(/regexp/)
44830
+ #
44831
+ # # good
44832
+ # /regexp/
44833
+ # Regexp.new('regexp')
44834
+ # Regexp.compile('regexp')
44835
+ #
44836
+ # source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#20
44837
+ class RuboCop::Cop::Style::RedundantRegexpConstructor < ::RuboCop::Cop::Base
44838
+ extend ::RuboCop::Cop::AutoCorrector
44839
+
44840
+ # source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#33
44841
+ def on_send(node); end
44842
+
44843
+ # source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#27
44844
+ def redundant_regexp_constructor(param0 = T.unsafe(nil)); end
44845
+ end
44846
+
44847
+ # source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#23
44848
+ RuboCop::Cop::Style::RedundantRegexpConstructor::MSG = T.let(T.unsafe(nil), String)
44849
+
44850
+ # source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#24
44851
+ RuboCop::Cop::Style::RedundantRegexpConstructor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
44852
+
44703
44853
  # Checks for redundant escapes inside Regexp literals.
44704
44854
  #
44705
44855
  # @example
@@ -45692,7 +45842,7 @@ class RuboCop::Cop::Style::RequireOrder < ::RuboCop::Cop::Base
45692
45842
 
45693
45843
  private
45694
45844
 
45695
- # source://rubocop//lib/rubocop/cop/style/require_order.rb#114
45845
+ # source://rubocop//lib/rubocop/cop/style/require_order.rb#115
45696
45846
  def autocorrect(corrector, node, previous_older_sibling); end
45697
45847
 
45698
45848
  # source://rubocop//lib/rubocop/cop/style/require_order.rb#101
@@ -45700,7 +45850,7 @@ class RuboCop::Cop::Style::RequireOrder < ::RuboCop::Cop::Base
45700
45850
 
45701
45851
  # @return [Boolean]
45702
45852
  #
45703
- # source://rubocop//lib/rubocop/cop/style/require_order.rb#132
45853
+ # source://rubocop//lib/rubocop/cop/style/require_order.rb#133
45704
45854
  def in_same_section?(node1, node2); end
45705
45855
 
45706
45856
  # @return [Boolean]
@@ -45708,10 +45858,10 @@ class RuboCop::Cop::Style::RequireOrder < ::RuboCop::Cop::Base
45708
45858
  # source://rubocop//lib/rubocop/cop/style/require_order.rb#97
45709
45859
  def not_modifier_form?(node); end
45710
45860
 
45711
- # source://rubocop//lib/rubocop/cop/style/require_order.rb#122
45861
+ # source://rubocop//lib/rubocop/cop/style/require_order.rb#123
45712
45862
  def search_node(node); end
45713
45863
 
45714
- # source://rubocop//lib/rubocop/cop/style/require_order.rb#126
45864
+ # source://rubocop//lib/rubocop/cop/style/require_order.rb#127
45715
45865
  def sibling_node(node); end
45716
45866
  end
45717
45867
 
@@ -45721,9 +45871,7 @@ RuboCop::Cop::Style::RequireOrder::MSG = T.let(T.unsafe(nil), String)
45721
45871
  # source://rubocop//lib/rubocop/cop/style/require_order.rb#71
45722
45872
  RuboCop::Cop::Style::RequireOrder::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
45723
45873
 
45724
- # Checks for uses of rescue in its modifier form.
45725
- #
45726
- # The cop to check `rescue` in its modifier form is added for following
45874
+ # Checks for uses of `rescue` in its modifier form is added for following
45727
45875
  # reasons:
45728
45876
  #
45729
45877
  # * The syntax of modifier form `rescue` can be misleading because it
@@ -45758,36 +45906,36 @@ RuboCop::Cop::Style::RequireOrder::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array
45758
45906
  # handle_error
45759
45907
  # end
45760
45908
  #
45761
- # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#42
45909
+ # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#40
45762
45910
  class RuboCop::Cop::Style::RescueModifier < ::RuboCop::Cop::Base
45763
45911
  include ::RuboCop::Cop::Alignment
45764
45912
  include ::RuboCop::Cop::RangeHelp
45765
45913
  include ::RuboCop::Cop::RescueNode
45766
45914
  extend ::RuboCop::Cop::AutoCorrector
45767
45915
 
45768
- # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#54
45916
+ # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#52
45769
45917
  def on_resbody(node); end
45770
45918
 
45771
45919
  private
45772
45920
 
45773
- # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#72
45921
+ # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#70
45774
45922
  def correct_rescue_block(corrector, node, parenthesized); end
45775
45923
 
45776
- # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#88
45924
+ # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#86
45777
45925
  def indentation_and_offset(node, parenthesized); end
45778
45926
 
45779
45927
  # @return [Boolean]
45780
45928
  #
45781
- # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#68
45929
+ # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#66
45782
45930
  def parenthesized?(node); end
45783
45931
 
45784
45932
  class << self
45785
- # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#50
45933
+ # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#48
45786
45934
  def autocorrect_incompatible_with; end
45787
45935
  end
45788
45936
  end
45789
45937
 
45790
- # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#48
45938
+ # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#46
45791
45939
  RuboCop::Cop::Style::RescueModifier::MSG = T.let(T.unsafe(nil), String)
45792
45940
 
45793
45941
  # Checks for rescuing `StandardError`. There are two supported
@@ -46262,7 +46410,7 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base
46262
46410
  # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#74
46263
46411
  def env_const?(param0 = T.unsafe(nil)); end
46264
46412
 
46265
- # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#87
46413
+ # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#88
46266
46414
  def on_send(node); end
46267
46415
 
46268
46416
  # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#56
@@ -46270,29 +46418,32 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base
46270
46418
 
46271
46419
  private
46272
46420
 
46273
- # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#122
46421
+ # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#132
46274
46422
  def extract_send_node(block_node); end
46275
46423
 
46276
- # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#135
46424
+ # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#145
46277
46425
  def find_regexp(node, block); end
46278
46426
 
46279
46427
  # @return [Boolean]
46280
46428
  #
46281
- # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#146
46429
+ # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#156
46282
46430
  def match_predicate_without_receiver?(node); end
46283
46431
 
46284
46432
  # @return [Boolean]
46285
46433
  #
46286
- # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#131
46434
+ # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#141
46287
46435
  def opposite?(regexp_method_send_node); end
46288
46436
 
46289
46437
  # @return [Boolean]
46290
46438
  #
46291
- # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#102
46439
+ # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#106
46292
46440
  def receiver_allowed?(node); end
46293
46441
 
46294
- # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#108
46295
- def register_offense(node, block_node, regexp, opposite); end
46442
+ # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#120
46443
+ def register_offense(node, block_node, regexp, replacement); end
46444
+
46445
+ # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#112
46446
+ def replacement(regexp_method_send_node, node); end
46296
46447
  end
46297
46448
 
46298
46449
  # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#49
@@ -46920,10 +47071,10 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
46920
47071
 
46921
47072
  # @return [Boolean]
46922
47073
  #
46923
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#238
47074
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#240
46924
47075
  def allow_modifier?; end
46925
47076
 
46926
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#223
47077
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#225
46927
47078
  def arguments_range(node); end
46928
47079
 
46929
47080
  # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81
@@ -46956,10 +47107,10 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
46956
47107
  # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#182
46957
47108
  def correct_outer_condition(corrector, condition); end
46958
47109
 
46959
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#193
47110
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#195
46960
47111
  def insert_bang(corrector, node, is_modify_form); end
46961
47112
 
46962
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#206
47113
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#208
46963
47114
  def insert_bang_for_and(corrector, node); end
46964
47115
 
46965
47116
  # @return [Boolean]
@@ -46969,15 +47120,15 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
46969
47120
 
46970
47121
  # @return [Boolean]
46971
47122
  #
46972
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#242
47123
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#244
46973
47124
  def outer_condition_modify_form?(node, if_branch); end
46974
47125
 
46975
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#234
47126
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#236
46976
47127
  def replace_condition(condition); end
46977
47128
 
46978
47129
  # @return [Boolean]
46979
47130
  #
46980
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#218
47131
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#220
46981
47132
  def require_parentheses?(condition); end
46982
47133
 
46983
47134
  # @return [Boolean]
@@ -46990,7 +47141,7 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
46990
47141
 
46991
47142
  # @return [Boolean]
46992
47143
  #
46993
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#229
47144
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#231
46994
47145
  def wrap_condition?(node); end
46995
47146
 
46996
47147
  class << self
@@ -47002,7 +47153,7 @@ end
47002
47153
  # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#53
47003
47154
  RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String)
47004
47155
 
47005
- # This cop looks for uses of Perl-style global variables.
47156
+ # Looks for uses of Perl-style global variables.
47006
47157
  # Correcting to global variables in the 'English' library
47007
47158
  # will add a require statement to the top of the file if
47008
47159
  # enabled by RequireEnglish config.
@@ -47077,88 +47228,88 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String)
47077
47228
  # puts $*
47078
47229
  # @example EnforcedStyle: use_builtin_english_names
47079
47230
  #
47080
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#88
47231
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#87
47081
47232
  class RuboCop::Cop::Style::SpecialGlobalVars < ::RuboCop::Cop::Base
47082
47233
  include ::RuboCop::Cop::ConfigurableEnforcedStyle
47083
47234
  include ::RuboCop::Cop::RangeHelp
47084
47235
  include ::RuboCop::Cop::RequireLibrary
47085
47236
  extend ::RuboCop::Cop::AutoCorrector
47086
47237
 
47087
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#177
47238
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#176
47088
47239
  def autocorrect(corrector, node, global_var); end
47089
47240
 
47090
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#169
47241
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#168
47091
47242
  def message(global_var); end
47092
47243
 
47093
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#153
47244
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#152
47094
47245
  def on_gvar(node); end
47095
47246
 
47096
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#148
47247
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#147
47097
47248
  def on_new_investigation; end
47098
47249
 
47099
47250
  private
47100
47251
 
47101
47252
  # @return [Boolean]
47102
47253
  #
47103
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#248
47254
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#247
47104
47255
  def add_require_english?; end
47105
47256
 
47106
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#242
47257
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#241
47107
47258
  def english_name_replacement(preferred_name, node); end
47108
47259
 
47109
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#191
47260
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#190
47110
47261
  def format_english_message(global_var); end
47111
47262
 
47112
47263
  # For now, we assume that lists are 2 items or less. Easy grammar!
47113
47264
  #
47114
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#213
47265
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#212
47115
47266
  def format_list(items); end
47116
47267
 
47117
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#199
47268
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#198
47118
47269
  def format_message(english, regular, global); end
47119
47270
 
47120
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#236
47271
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#235
47121
47272
  def matching_styles(global); end
47122
47273
 
47123
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#228
47274
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#227
47124
47275
  def preferred_names(global); end
47125
47276
 
47126
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#217
47277
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#216
47127
47278
  def replacement(node, global_var); end
47128
47279
 
47129
47280
  # @return [Boolean]
47130
47281
  #
47131
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#252
47282
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#251
47132
47283
  def should_require_english?(global_var); end
47133
47284
  end
47134
47285
 
47135
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#129
47286
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#128
47136
47287
  RuboCop::Cop::Style::SpecialGlobalVars::BUILTIN_VARS = T.let(T.unsafe(nil), Hash)
47137
47288
 
47138
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#101
47289
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#100
47139
47290
  RuboCop::Cop::Style::SpecialGlobalVars::ENGLISH_VARS = T.let(T.unsafe(nil), Hash)
47140
47291
 
47141
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#146
47292
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#145
47142
47293
  RuboCop::Cop::Style::SpecialGlobalVars::LIBRARY_NAME = T.let(T.unsafe(nil), String)
47143
47294
 
47144
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#94
47295
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#93
47145
47296
  RuboCop::Cop::Style::SpecialGlobalVars::MSG_BOTH = T.let(T.unsafe(nil), String)
47146
47297
 
47147
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#97
47298
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#96
47148
47299
  RuboCop::Cop::Style::SpecialGlobalVars::MSG_ENGLISH = T.let(T.unsafe(nil), String)
47149
47300
 
47150
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#99
47301
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#98
47151
47302
  RuboCop::Cop::Style::SpecialGlobalVars::MSG_REGULAR = T.let(T.unsafe(nil), String)
47152
47303
 
47153
47304
  # Anything *not* in this set is provided by the English library.
47154
47305
  #
47155
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#123
47306
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#122
47156
47307
  RuboCop::Cop::Style::SpecialGlobalVars::NON_ENGLISH_VARS = T.let(T.unsafe(nil), Set)
47157
47308
 
47158
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#125
47309
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#124
47159
47310
  RuboCop::Cop::Style::SpecialGlobalVars::PERL_VARS = T.let(T.unsafe(nil), Hash)
47160
47311
 
47161
- # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#140
47312
+ # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#139
47162
47313
  RuboCop::Cop::Style::SpecialGlobalVars::STYLE_VARS_MAP = T.let(T.unsafe(nil), Hash)
47163
47314
 
47164
47315
  # Check for parentheses around stabby lambda arguments.
@@ -50630,59 +50781,59 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force
50630
50781
  #
50631
50782
  # @api private
50632
50783
  #
50633
- # source://rubocop//lib/rubocop/cop/variable_force.rb#75
50784
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#76
50634
50785
  def investigate(processed_source); end
50635
50786
 
50636
50787
  # @api private
50637
50788
  #
50638
- # source://rubocop//lib/rubocop/cop/variable_force.rb#84
50789
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#85
50639
50790
  def process_node(node); end
50640
50791
 
50641
50792
  # @api private
50642
50793
  #
50643
- # source://rubocop//lib/rubocop/cop/variable_force.rb#70
50794
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#71
50644
50795
  def variable_table; end
50645
50796
 
50646
50797
  private
50647
50798
 
50648
- # source://rubocop//lib/rubocop/cop/variable_force.rb#367
50799
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#368
50649
50800
  def after_declaring_variable(arg); end
50650
50801
 
50651
- # source://rubocop//lib/rubocop/cop/variable_force.rb#367
50802
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#368
50652
50803
  def after_entering_scope(arg); end
50653
50804
 
50654
- # source://rubocop//lib/rubocop/cop/variable_force.rb#367
50805
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#368
50655
50806
  def after_leaving_scope(arg); end
50656
50807
 
50657
- # source://rubocop//lib/rubocop/cop/variable_force.rb#367
50808
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#368
50658
50809
  def before_declaring_variable(arg); end
50659
50810
 
50660
- # source://rubocop//lib/rubocop/cop/variable_force.rb#367
50811
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#368
50661
50812
  def before_entering_scope(arg); end
50662
50813
 
50663
- # source://rubocop//lib/rubocop/cop/variable_force.rb#367
50814
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#368
50664
50815
  def before_leaving_scope(arg); end
50665
50816
 
50666
50817
  # @api private
50667
50818
  #
50668
- # source://rubocop//lib/rubocop/cop/variable_force.rb#338
50819
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#339
50669
50820
  def descendant_reference(node); end
50670
50821
 
50671
50822
  # @api private
50672
50823
  #
50673
- # source://rubocop//lib/rubocop/cop/variable_force.rb#328
50824
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#329
50674
50825
  def each_descendant_reference(loop_node); end
50675
50826
 
50676
50827
  # @api private
50677
50828
  #
50678
- # source://rubocop//lib/rubocop/cop/variable_force.rb#313
50829
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#314
50679
50830
  def find_variables_in_loop(loop_node); end
50680
50831
 
50681
50832
  # This is called for each scope recursively.
50682
50833
  #
50683
50834
  # @api private
50684
50835
  #
50685
- # source://rubocop//lib/rubocop/cop/variable_force.rb#93
50836
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#94
50686
50837
  def inspect_variables_in_scope(scope_node); end
50687
50838
 
50688
50839
  # Mark all assignments which are referenced in the same loop
@@ -50691,98 +50842,98 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force
50691
50842
  #
50692
50843
  # @api private
50693
50844
  #
50694
- # source://rubocop//lib/rubocop/cop/variable_force.rb#294
50845
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#295
50695
50846
  def mark_assignments_as_referenced_in_loop(node); end
50696
50847
 
50697
50848
  # @api private
50698
50849
  #
50699
- # source://rubocop//lib/rubocop/cop/variable_force.rb#125
50850
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#126
50700
50851
  def node_handler_method_name(node); end
50701
50852
 
50702
50853
  # @api private
50703
50854
  #
50704
- # source://rubocop//lib/rubocop/cop/variable_force.rb#99
50855
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#100
50705
50856
  def process_children(origin_node); end
50706
50857
 
50707
50858
  # @api private
50708
50859
  #
50709
- # source://rubocop//lib/rubocop/cop/variable_force.rb#230
50860
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#231
50710
50861
  def process_loop(node); end
50711
50862
 
50712
50863
  # @api private
50713
50864
  #
50714
- # source://rubocop//lib/rubocop/cop/variable_force.rb#159
50865
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#160
50715
50866
  def process_regexp_named_captures(node); end
50716
50867
 
50717
50868
  # @api private
50718
50869
  #
50719
- # source://rubocop//lib/rubocop/cop/variable_force.rb#245
50870
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#246
50720
50871
  def process_rescue(node); end
50721
50872
 
50722
50873
  # @api private
50723
50874
  #
50724
- # source://rubocop//lib/rubocop/cop/variable_force.rb#264
50875
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#265
50725
50876
  def process_scope(node); end
50726
50877
 
50727
50878
  # @api private
50728
50879
  #
50729
- # source://rubocop//lib/rubocop/cop/variable_force.rb#283
50880
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#284
50730
50881
  def process_send(node); end
50731
50882
 
50732
50883
  # @api private
50733
50884
  #
50734
- # source://rubocop//lib/rubocop/cop/variable_force.rb#141
50885
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#142
50735
50886
  def process_variable_assignment(node); end
50736
50887
 
50737
50888
  # @api private
50738
50889
  #
50739
- # source://rubocop//lib/rubocop/cop/variable_force.rb#129
50890
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#130
50740
50891
  def process_variable_declaration(node); end
50741
50892
 
50742
50893
  # @api private
50743
50894
  #
50744
- # source://rubocop//lib/rubocop/cop/variable_force.rb#218
50895
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#219
50745
50896
  def process_variable_multiple_assignment(node); end
50746
50897
 
50747
50898
  # @api private
50748
50899
  #
50749
- # source://rubocop//lib/rubocop/cop/variable_force.rb#183
50900
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#184
50750
50901
  def process_variable_operator_assignment(node); end
50751
50902
 
50752
50903
  # @api private
50753
50904
  #
50754
- # source://rubocop//lib/rubocop/cop/variable_force.rb#225
50905
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#226
50755
50906
  def process_variable_referencing(node); end
50756
50907
 
50757
50908
  # @api private
50758
50909
  #
50759
- # source://rubocop//lib/rubocop/cop/variable_force.rb#256
50910
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#257
50760
50911
  def process_zero_arity_super(node); end
50761
50912
 
50762
50913
  # @api private
50763
50914
  #
50764
- # source://rubocop//lib/rubocop/cop/variable_force.rb#177
50915
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#178
50765
50916
  def regexp_captured_names(node); end
50766
50917
 
50767
50918
  # @api private
50768
50919
  # @return [Boolean]
50769
50920
  #
50770
- # source://rubocop//lib/rubocop/cop/variable_force.rb#350
50921
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#351
50771
50922
  def scanned_node?(node); end
50772
50923
 
50773
50924
  # @api private
50774
50925
  #
50775
- # source://rubocop//lib/rubocop/cop/variable_force.rb#354
50926
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#355
50776
50927
  def scanned_nodes; end
50777
50928
 
50778
50929
  # @api private
50779
50930
  #
50780
- # source://rubocop//lib/rubocop/cop/variable_force.rb#107
50931
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#108
50781
50932
  def skip_children!; end
50782
50933
 
50783
50934
  # @api private
50784
50935
  #
50785
- # source://rubocop//lib/rubocop/cop/variable_force.rb#277
50936
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#278
50786
50937
  def twisted_nodes(node); end
50787
50938
  end
50788
50939
 
@@ -50807,7 +50958,12 @@ class RuboCop::Cop::VariableForce::Assignment
50807
50958
  # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#50
50808
50959
  def exception_assignment?; end
50809
50960
 
50810
- # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#71
50961
+ # @return [Boolean]
50962
+ #
50963
+ # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#72
50964
+ def for_assignment?; end
50965
+
50966
+ # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#83
50811
50967
  def meta_assignment_node; end
50812
50968
 
50813
50969
  # @return [Boolean]
@@ -50823,7 +50979,7 @@ class RuboCop::Cop::VariableForce::Assignment
50823
50979
  # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12
50824
50980
  def node; end
50825
50981
 
50826
- # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#66
50982
+ # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#78
50827
50983
  def operator; end
50828
50984
 
50829
50985
  # @return [Boolean]
@@ -50854,6 +51010,11 @@ class RuboCop::Cop::VariableForce::Assignment
50854
51010
  # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#46
50855
51011
  def regexp_named_capture?; end
50856
51012
 
51013
+ # @return [Boolean]
51014
+ #
51015
+ # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#66
51016
+ def rest_assignment?; end
51017
+
50857
51018
  # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#33
50858
51019
  def scope; end
50859
51020
 
@@ -50869,11 +51030,17 @@ class RuboCop::Cop::VariableForce::Assignment
50869
51030
 
50870
51031
  private
50871
51032
 
50872
- # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#89
51033
+ # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#120
51034
+ def for_assignment_node; end
51035
+
51036
+ # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#104
50873
51037
  def multiple_assignment_node; end
50874
51038
 
50875
- # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#81
51039
+ # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#96
50876
51040
  def operator_assignment_node; end
51041
+
51042
+ # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#113
51043
+ def rest_assignment_node; end
50877
51044
  end
50878
51045
 
50879
51046
  # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#10
@@ -50881,12 +51048,12 @@ RuboCop::Cop::VariableForce::Assignment::MULTIPLE_LEFT_HAND_SIDE_TYPE = T.let(T.
50881
51048
 
50882
51049
  # @api private
50883
51050
  #
50884
- # source://rubocop//lib/rubocop/cop/variable_force.rb#64
51051
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#65
50885
51052
  class RuboCop::Cop::VariableForce::AssignmentReference < ::Struct
50886
51053
  # @api private
50887
51054
  # @return [Boolean]
50888
51055
  #
50889
- # source://rubocop//lib/rubocop/cop/variable_force.rb#65
51056
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#66
50890
51057
  def assignment?; end
50891
51058
 
50892
51059
  # Returns the value of attribute node
@@ -51331,7 +51498,7 @@ RuboCop::Cop::VariableForce::LOGICAL_OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(
51331
51498
 
51332
51499
  # @api private
51333
51500
  #
51334
- # source://rubocop//lib/rubocop/cop/variable_force.rb#47
51501
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#48
51335
51502
  RuboCop::Cop::VariableForce::LOOP_TYPES = T.let(T.unsafe(nil), Array)
51336
51503
 
51337
51504
  # @api private
@@ -51341,7 +51508,7 @@ RuboCop::Cop::VariableForce::MULTIPLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Sym
51341
51508
 
51342
51509
  # @api private
51343
51510
  #
51344
- # source://rubocop//lib/rubocop/cop/variable_force.rb#111
51511
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#112
51345
51512
  RuboCop::Cop::VariableForce::NODE_HANDLER_METHOD_NAMES = T.let(T.unsafe(nil), Hash)
51346
51513
 
51347
51514
  # @api private
@@ -51351,7 +51518,7 @@ RuboCop::Cop::VariableForce::OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Ar
51351
51518
 
51352
51519
  # @api private
51353
51520
  #
51354
- # source://rubocop//lib/rubocop/cop/variable_force.rb#46
51521
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#47
51355
51522
  RuboCop::Cop::VariableForce::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array)
51356
51523
 
51357
51524
  # @api private
@@ -51361,9 +51528,14 @@ RuboCop::Cop::VariableForce::REGEXP_NAMED_CAPTURE_TYPE = T.let(T.unsafe(nil), Sy
51361
51528
 
51362
51529
  # @api private
51363
51530
  #
51364
- # source://rubocop//lib/rubocop/cop/variable_force.rb#49
51531
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#50
51365
51532
  RuboCop::Cop::VariableForce::RESCUE_TYPE = T.let(T.unsafe(nil), Symbol)
51366
51533
 
51534
+ # @api private
51535
+ #
51536
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#43
51537
+ RuboCop::Cop::VariableForce::REST_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol)
51538
+
51367
51539
  # This class represents each reference of a variable.
51368
51540
  #
51369
51541
  # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#7
@@ -51411,12 +51583,12 @@ RuboCop::Cop::VariableForce::Reference::VARIABLE_REFERENCE_TYPES = T.let(T.unsaf
51411
51583
 
51412
51584
  # @api private
51413
51585
  #
51414
- # source://rubocop//lib/rubocop/cop/variable_force.rb#54
51586
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#55
51415
51587
  RuboCop::Cop::VariableForce::SCOPE_TYPES = T.let(T.unsafe(nil), Array)
51416
51588
 
51417
51589
  # @api private
51418
51590
  #
51419
- # source://rubocop//lib/rubocop/cop/variable_force.rb#56
51591
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#57
51420
51592
  RuboCop::Cop::VariableForce::SEND_TYPE = T.let(T.unsafe(nil), Symbol)
51421
51593
 
51422
51594
  # A Scope represents a context of local variable visibility.
@@ -51495,7 +51667,7 @@ RuboCop::Cop::VariableForce::Scope::OUTER_SCOPE_CHILD_INDICES = T.let(T.unsafe(n
51495
51667
 
51496
51668
  # @api private
51497
51669
  #
51498
- # source://rubocop//lib/rubocop/cop/variable_force.rb#53
51670
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#54
51499
51671
  RuboCop::Cop::VariableForce::TWISTED_SCOPE_TYPES = T.let(T.unsafe(nil), Array)
51500
51672
 
51501
51673
  # @api private
@@ -51510,7 +51682,7 @@ RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Ar
51510
51682
 
51511
51683
  # @api private
51512
51684
  #
51513
- # source://rubocop//lib/rubocop/cop/variable_force.rb#44
51685
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#45
51514
51686
  RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symbol)
51515
51687
 
51516
51688
  # A Variable represents existence of a local variable.
@@ -51627,12 +51799,12 @@ RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsa
51627
51799
 
51628
51800
  # @api private
51629
51801
  #
51630
- # source://rubocop//lib/rubocop/cop/variable_force.rb#58
51802
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#59
51631
51803
  class RuboCop::Cop::VariableForce::VariableReference < ::Struct
51632
51804
  # @api private
51633
51805
  # @return [Boolean]
51634
51806
  #
51635
- # source://rubocop//lib/rubocop/cop/variable_force.rb#59
51807
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#60
51636
51808
  def assignment?; end
51637
51809
 
51638
51810
  # Returns the value of attribute name
@@ -51714,7 +51886,7 @@ end
51714
51886
 
51715
51887
  # @api private
51716
51888
  #
51717
- # source://rubocop//lib/rubocop/cop/variable_force.rb#51
51889
+ # source://rubocop//lib/rubocop/cop/variable_force.rb#52
51718
51890
  RuboCop::Cop::VariableForce::ZERO_ARITY_SUPER_TYPE = T.let(T.unsafe(nil), Symbol)
51719
51891
 
51720
51892
  # Help methods for determining node visibility.
@@ -55222,12 +55394,12 @@ module RuboCop::Version
55222
55394
  class << self
55223
55395
  # @api private
55224
55396
  #
55225
- # source://rubocop//lib/rubocop/version.rb#89
55397
+ # source://rubocop//lib/rubocop/version.rb#93
55226
55398
  def document_version; end
55227
55399
 
55228
55400
  # @api private
55229
55401
  #
55230
- # source://rubocop//lib/rubocop/version.rb#39
55402
+ # source://rubocop//lib/rubocop/version.rb#43
55231
55403
  def extension_versions(env); end
55232
55404
 
55233
55405
  # Returns feature version in one of two ways:
@@ -55237,17 +55409,17 @@ module RuboCop::Version
55237
55409
  #
55238
55410
  # @api private
55239
55411
  #
55240
- # source://rubocop//lib/rubocop/version.rb#73
55412
+ # source://rubocop//lib/rubocop/version.rb#77
55241
55413
  def feature_version(feature); end
55242
55414
 
55243
55415
  # @api private
55244
55416
  #
55245
- # source://rubocop//lib/rubocop/version.rb#94
55417
+ # source://rubocop//lib/rubocop/version.rb#98
55246
55418
  def server_mode; end
55247
55419
 
55248
55420
  # @api private
55249
55421
  #
55250
- # source://rubocop//lib/rubocop/version.rb#17
55422
+ # source://rubocop//lib/rubocop/version.rb#21
55251
55423
  def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end
55252
55424
  end
55253
55425
  end
@@ -55255,7 +55427,7 @@ end
55255
55427
  # source://rubocop//lib/rubocop/version.rb#12
55256
55428
  RuboCop::Version::CANONICAL_FEATURE_NAMES = T.let(T.unsafe(nil), Hash)
55257
55429
 
55258
- # source://rubocop//lib/rubocop/version.rb#14
55430
+ # source://rubocop//lib/rubocop/version.rb#16
55259
55431
  RuboCop::Version::EXTENSION_PATH_NAMES = T.let(T.unsafe(nil), Hash)
55260
55432
 
55261
55433
  # source://rubocop//lib/rubocop/version.rb#8