mangrove 0.18.0 → 0.19.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -0
  3. data/lib/mangrove/result.rb +92 -3
  4. data/lib/mangrove/version.rb +1 -1
  5. data/sorbet/rbi/annotations/.gitattributes +1 -0
  6. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1 -5
  7. data/sorbet/rbi/gems/docile@1.4.0.rbi +376 -0
  8. data/sorbet/rbi/gems/json@2.6.3.rbi +73 -65
  9. data/sorbet/rbi/gems/prism@0.15.1.rbi +23916 -2
  10. data/sorbet/rbi/gems/rake@13.0.6.rbi +1 -141
  11. data/sorbet/rbi/gems/{rbi@0.1.1.rbi → rbi@0.1.3.rbi} +53 -57
  12. data/sorbet/rbi/gems/regexp_parser@2.8.2.rbi +37 -37
  13. data/sorbet/rbi/gems/rexml@3.2.6.rbi +2 -2
  14. data/sorbet/rbi/gems/rspec-core@3.12.2.rbi +8 -39
  15. data/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi +25 -25
  16. data/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi +4 -8
  17. data/sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi +2 -2
  18. data/sorbet/rbi/gems/rspec-support@3.12.1.rbi +2 -2
  19. data/sorbet/rbi/gems/rspec@3.12.0.rbi +1 -1
  20. data/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi +263 -176
  21. data/sorbet/rbi/gems/rubocop@1.57.1.rbi +1019 -719
  22. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +5 -5
  23. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +216 -0
  24. data/sorbet/rbi/gems/simplecov@0.21.2.rbi +2135 -0
  25. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
  26. data/sorbet/rbi/gems/spoom@1.2.4.rbi +15 -15
  27. data/sorbet/rbi/gems/{tapioca@0.11.9.rbi → tapioca@0.11.10.rbi} +40 -29
  28. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +1 -1
  29. data/sorbet/rbi/gems/yard@0.9.34.rbi +46 -50
  30. data/sorbet/tapioca/require.rb +6 -1
  31. metadata +9 -34
  32. data/docs/Mangrove/ControlFlow/ControlSignal.html +0 -223
  33. data/docs/Mangrove/ControlFlow/Handler/ClassMethods.html +0 -563
  34. data/docs/Mangrove/ControlFlow/Handler.html +0 -139
  35. data/docs/Mangrove/ControlFlow/Rewriter.html +0 -331
  36. data/docs/Mangrove/ControlFlow.html +0 -115
  37. data/docs/Mangrove/Option/ControlSignal.html +0 -434
  38. data/docs/Mangrove/Option/None.html +0 -1085
  39. data/docs/Mangrove/Option/Some.html +0 -1202
  40. data/docs/Mangrove/Option.html +0 -1145
  41. data/docs/Mangrove/Result/ControlSignal.html +0 -434
  42. data/docs/Mangrove/Result/Err.html +0 -2254
  43. data/docs/Mangrove/Result/Ok.html +0 -2219
  44. data/docs/Mangrove/Result.html +0 -2475
  45. data/docs/Mangrove.html +0 -144
  46. data/docs/_index.html +0 -225
  47. data/docs/class_list.html +0 -51
  48. data/docs/css/common.css +0 -1
  49. data/docs/css/full_list.css +0 -58
  50. data/docs/css/style.css +0 -497
  51. data/docs/file.README.html +0 -245
  52. data/docs/file_list.html +0 -56
  53. data/docs/frames.html +0 -17
  54. data/docs/index.html +0 -245
  55. data/docs/js/app.js +0 -314
  56. data/docs/js/full_list.js +0 -216
  57. data/docs/js/jquery.js +0 -4
  58. data/docs/method_list.html +0 -939
  59. data/docs/top-level-namespace.html +0 -110
  60. data/sorbet/rbi/gems/yarp@0.13.0.rbi +0 -21646
  61. data/sorbet/rbi/shims/mangrove/option.rbi +0 -15
  62. data/sorbet/rbi/shims/mangrove/result.rbi +0 -15
@@ -522,7 +522,7 @@ end
522
522
  #
523
523
  # @api private
524
524
  #
525
- # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#11
525
+ # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#12
526
526
  class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base
527
527
  # @api private
528
528
  #
@@ -752,7 +752,7 @@ class RuboCop::CommentConfig
752
752
  # source://rubocop//lib/rubocop/comment_config.rb#63
753
753
  def comment_only_line?(line_number); end
754
754
 
755
- # source://forwardable/1.3.3/forwardable.rb#231
755
+ # source://forwardable/1.3.2/forwardable.rb#229
756
756
  def config(*args, **_arg1, &block); end
757
757
 
758
758
  # source://rubocop//lib/rubocop/comment_config.rb#51
@@ -776,7 +776,7 @@ class RuboCop::CommentConfig
776
776
  # source://rubocop//lib/rubocop/comment_config.rb#30
777
777
  def processed_source; end
778
778
 
779
- # source://forwardable/1.3.3/forwardable.rb#231
779
+ # source://forwardable/1.3.2/forwardable.rb#229
780
780
  def registry(*args, **_arg1, &block); end
781
781
 
782
782
  private
@@ -952,10 +952,10 @@ class RuboCop::Config
952
952
  # source://rubocop//lib/rubocop/config.rb#32
953
953
  def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end
954
954
 
955
- # source://forwardable/1.3.3/forwardable.rb#231
955
+ # source://forwardable/1.3.2/forwardable.rb#229
956
956
  def [](*args, **_arg1, &block); end
957
957
 
958
- # source://forwardable/1.3.3/forwardable.rb#231
958
+ # source://forwardable/1.3.2/forwardable.rb#229
959
959
  def []=(*args, **_arg1, &block); end
960
960
 
961
961
  # @return [Boolean]
@@ -992,13 +992,13 @@ class RuboCop::Config
992
992
  # source://rubocop//lib/rubocop/config.rb#144
993
993
  def clusivity_config_for_badge?(badge); end
994
994
 
995
- # source://forwardable/1.3.3/forwardable.rb#231
995
+ # source://forwardable/1.3.2/forwardable.rb#229
996
996
  def delete(*args, **_arg1, &block); end
997
997
 
998
998
  # source://rubocop//lib/rubocop/config.rb#110
999
999
  def deprecation_check; end
1000
1000
 
1001
- # source://forwardable/1.3.3/forwardable.rb#231
1001
+ # source://forwardable/1.3.2/forwardable.rb#229
1002
1002
  def dig(*args, **_arg1, &block); end
1003
1003
 
1004
1004
  # @return [Boolean]
@@ -1006,10 +1006,10 @@ class RuboCop::Config
1006
1006
  # source://rubocop//lib/rubocop/config.rb#164
1007
1007
  def disabled_new_cops?; end
1008
1008
 
1009
- # source://forwardable/1.3.3/forwardable.rb#231
1009
+ # source://forwardable/1.3.2/forwardable.rb#229
1010
1010
  def each(*args, **_arg1, &block); end
1011
1011
 
1012
- # source://forwardable/1.3.3/forwardable.rb#231
1012
+ # source://forwardable/1.3.2/forwardable.rb#229
1013
1013
  def each_key(*args, **_arg1, &block); end
1014
1014
 
1015
1015
  # @return [Boolean]
@@ -1017,7 +1017,7 @@ class RuboCop::Config
1017
1017
  # source://rubocop//lib/rubocop/config.rb#168
1018
1018
  def enabled_new_cops?; end
1019
1019
 
1020
- # source://forwardable/1.3.3/forwardable.rb#231
1020
+ # source://forwardable/1.3.2/forwardable.rb#229
1021
1021
  def fetch(*args, **_arg1, &block); end
1022
1022
 
1023
1023
  # @return [Boolean]
@@ -1066,10 +1066,10 @@ class RuboCop::Config
1066
1066
  # source://rubocop//lib/rubocop/config.rb#78
1067
1067
  def internal?; end
1068
1068
 
1069
- # source://forwardable/1.3.3/forwardable.rb#231
1069
+ # source://forwardable/1.3.2/forwardable.rb#229
1070
1070
  def key?(*args, **_arg1, &block); end
1071
1071
 
1072
- # source://forwardable/1.3.3/forwardable.rb#231
1072
+ # source://forwardable/1.3.2/forwardable.rb#229
1073
1073
  def keys(*args, **_arg1, &block); end
1074
1074
 
1075
1075
  # source://rubocop//lib/rubocop/config.rb#49
@@ -1083,10 +1083,10 @@ class RuboCop::Config
1083
1083
  # source://rubocop//lib/rubocop/config.rb#83
1084
1084
  def make_excludes_absolute; end
1085
1085
 
1086
- # source://forwardable/1.3.3/forwardable.rb#231
1086
+ # source://forwardable/1.3.2/forwardable.rb#229
1087
1087
  def map(*args, **_arg1, &block); end
1088
1088
 
1089
- # source://forwardable/1.3.3/forwardable.rb#231
1089
+ # source://forwardable/1.3.2/forwardable.rb#229
1090
1090
  def merge(*args, **_arg1, &block); end
1091
1091
 
1092
1092
  # source://rubocop//lib/rubocop/config.rb#230
@@ -1109,7 +1109,7 @@ class RuboCop::Config
1109
1109
  # source://rubocop//lib/rubocop/config.rb#209
1110
1110
  def possibly_include_hidden?; end
1111
1111
 
1112
- # source://forwardable/1.3.3/forwardable.rb#231
1112
+ # source://forwardable/1.3.2/forwardable.rb#229
1113
1113
  def replace(*args, **_arg1, &block); end
1114
1114
 
1115
1115
  # source://rubocop//lib/rubocop/config.rb#73
@@ -1121,22 +1121,22 @@ class RuboCop::Config
1121
1121
  # source://rubocop//lib/rubocop/config.rb#249
1122
1122
  def target_rails_version; end
1123
1123
 
1124
- # source://forwardable/1.3.3/forwardable.rb#231
1124
+ # source://forwardable/1.3.2/forwardable.rb#229
1125
1125
  def target_ruby_version(*args, **_arg1, &block); end
1126
1126
 
1127
- # source://forwardable/1.3.3/forwardable.rb#231
1127
+ # source://forwardable/1.3.2/forwardable.rb#229
1128
1128
  def to_h(*args, **_arg1, &block); end
1129
1129
 
1130
- # source://forwardable/1.3.3/forwardable.rb#231
1130
+ # source://forwardable/1.3.2/forwardable.rb#229
1131
1131
  def to_hash(*args, **_arg1, &block); end
1132
1132
 
1133
1133
  # source://rubocop//lib/rubocop/config.rb#69
1134
1134
  def to_s; end
1135
1135
 
1136
- # source://forwardable/1.3.3/forwardable.rb#231
1136
+ # source://forwardable/1.3.2/forwardable.rb#229
1137
1137
  def transform_values(*args, **_arg1, &block); end
1138
1138
 
1139
- # source://forwardable/1.3.3/forwardable.rb#231
1139
+ # source://forwardable/1.3.2/forwardable.rb#229
1140
1140
  def validate(*args, **_arg1, &block); end
1141
1141
 
1142
1142
  # source://rubocop//lib/rubocop/config.rb#60
@@ -2206,10 +2206,10 @@ class RuboCop::ConfigValidator
2206
2206
  # source://rubocop//lib/rubocop/config_validator.rb#27
2207
2207
  def initialize(config); end
2208
2208
 
2209
- # source://forwardable/1.3.3/forwardable.rb#231
2209
+ # source://forwardable/1.3.2/forwardable.rb#229
2210
2210
  def for_all_cops(*args, **_arg1, &block); end
2211
2211
 
2212
- # source://forwardable/1.3.3/forwardable.rb#231
2212
+ # source://forwardable/1.3.2/forwardable.rb#229
2213
2213
  def smart_loaded_path(*args, **_arg1, &block); end
2214
2214
 
2215
2215
  # source://rubocop//lib/rubocop/config_validator.rb#63
@@ -2741,25 +2741,25 @@ module RuboCop::Cop::AutocorrectLogic
2741
2741
  # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#46
2742
2742
  def disable_offense(offense_range); end
2743
2743
 
2744
- # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#111
2744
+ # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#113
2745
2745
  def disable_offense_at_end_of_line(range, eol_comment); end
2746
2746
 
2747
- # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#115
2747
+ # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#117
2748
2748
  def disable_offense_before_and_after(range_by_lines); end
2749
2749
 
2750
2750
  # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#56
2751
2751
  def disable_offense_with_eol_or_surround_comment(range); end
2752
2752
 
2753
- # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#107
2753
+ # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#109
2754
2754
  def max_line_length; end
2755
2755
 
2756
2756
  # Expand the given range to include all of any lines it covers. Does not
2757
2757
  # include newline at end of the last line.
2758
2758
  #
2759
- # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#97
2759
+ # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#99
2760
2760
  def range_by_lines(range); end
2761
2761
 
2762
- # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#88
2762
+ # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#90
2763
2763
  def range_of_first_line(range); end
2764
2764
 
2765
2765
  # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#67
@@ -3332,6 +3332,24 @@ RuboCop::Cop::Bundler::DuplicatedGem::MSG = T.let(T.unsafe(nil), String)
3332
3332
 
3333
3333
  # A Gem group, or a set of groups, should be listed only once in a Gemfile.
3334
3334
  #
3335
+ # For example, if the values of `source`, `git`, `platforms`, or `path`
3336
+ # surrounding `group` are different, no offense will be registered:
3337
+ #
3338
+ # [source,ruby]
3339
+ # -----
3340
+ # platforms :ruby do
3341
+ # group :default do
3342
+ # gem 'openssl'
3343
+ # end
3344
+ # end
3345
+ #
3346
+ # platforms :jruby do
3347
+ # group :default do
3348
+ # gem 'jruby-openssl'
3349
+ # end
3350
+ # end
3351
+ # -----
3352
+ #
3335
3353
  # @example
3336
3354
  # # bad
3337
3355
  # group :development do
@@ -3364,28 +3382,37 @@ RuboCop::Cop::Bundler::DuplicatedGem::MSG = T.let(T.unsafe(nil), String)
3364
3382
  # gem 'rubocop', groups: [:development, :test]
3365
3383
  # gem 'rspec', groups: [:development, :test]
3366
3384
  #
3367
- # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#40
3385
+ # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#58
3368
3386
  class RuboCop::Cop::Bundler::DuplicatedGroup < ::RuboCop::Cop::Base
3369
3387
  include ::RuboCop::Cop::RangeHelp
3370
3388
 
3371
- # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#59
3389
+ # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#66
3372
3390
  def group_declarations(param0); end
3373
3391
 
3374
- # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#46
3392
+ # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#68
3375
3393
  def on_new_investigation; end
3376
3394
 
3377
3395
  private
3378
3396
 
3379
- # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#61
3397
+ # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#82
3380
3398
  def duplicated_group_nodes; end
3381
3399
 
3382
- # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#68
3400
+ # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#105
3401
+ def find_source_key(node); end
3402
+
3403
+ # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#115
3404
+ def group_attributes(node); end
3405
+
3406
+ # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#94
3383
3407
  def register_offense(node, group_name, line_of_first_occurrence); end
3384
3408
  end
3385
3409
 
3386
- # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#43
3410
+ # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#61
3387
3411
  RuboCop::Cop::Bundler::DuplicatedGroup::MSG = T.let(T.unsafe(nil), String)
3388
3412
 
3413
+ # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#63
3414
+ RuboCop::Cop::Bundler::DuplicatedGroup::SOURCE_BLOCK_NAMES = T.let(T.unsafe(nil), Array)
3415
+
3389
3416
  # Each gem in the Gemfile should have a comment explaining
3390
3417
  # its purpose in the project, or the reason for its version
3391
3418
  # or source.
@@ -4962,7 +4989,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter
4962
4989
 
4963
4990
  # Legacy
4964
4991
  #
4965
- # source://parser/3.2.2.3/lib/parser/source/tree_rewriter.rb#252
4992
+ # source://parser/3.2.2.4/lib/parser/source/tree_rewriter.rb#252
4966
4993
  def rewrite; end
4967
4994
 
4968
4995
  # Swaps sources at the given ranges.
@@ -6989,74 +7016,74 @@ class RuboCop::Cop::LambdaLiteralToMethodCorrector
6989
7016
 
6990
7017
  # @return [Boolean]
6991
7018
  #
6992
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#115
7019
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#118
6993
7020
  def arg_to_unparenthesized_call?; end
6994
7021
 
6995
7022
  # Returns the value of attribute arguments.
6996
7023
  #
6997
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#31
7024
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34
6998
7025
  def arguments; end
6999
7026
 
7000
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#99
7027
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#102
7001
7028
  def arguments_begin_pos; end
7002
7029
 
7003
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#95
7030
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#98
7004
7031
  def arguments_end_pos; end
7005
7032
 
7006
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#107
7033
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#110
7007
7034
  def block_begin; end
7008
7035
 
7009
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#103
7036
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#106
7010
7037
  def block_end; end
7011
7038
 
7012
7039
  # Returns the value of attribute block_node.
7013
7040
  #
7014
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#31
7041
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34
7015
7042
  def block_node; end
7016
7043
 
7017
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#56
7044
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#59
7018
7045
  def insert_arguments(corrector); end
7019
7046
 
7020
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#40
7047
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#43
7021
7048
  def insert_separating_space(corrector); end
7022
7049
 
7023
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#85
7050
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#88
7024
7051
  def lambda_arg_string; end
7025
7052
 
7026
7053
  # Returns the value of attribute method.
7027
7054
  #
7028
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#31
7055
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34
7029
7056
  def method; end
7030
7057
 
7031
7058
  # @return [Boolean]
7032
7059
  #
7033
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#89
7060
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#92
7034
7061
  def needs_separating_space?; end
7035
7062
 
7036
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#50
7063
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#53
7037
7064
  def remove_arguments(corrector); end
7038
7065
 
7039
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#63
7066
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#66
7040
7067
  def remove_leading_whitespace(corrector); end
7041
7068
 
7042
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#71
7069
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#74
7043
7070
  def remove_trailing_whitespace(corrector); end
7044
7071
 
7045
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#33
7072
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#36
7046
7073
  def remove_unparenthesized_whitespace(corrector); end
7047
7074
 
7048
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#76
7075
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#79
7049
7076
  def replace_delimiters(corrector); end
7050
7077
 
7051
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#46
7078
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#49
7052
7079
  def replace_selector(corrector); end
7053
7080
 
7054
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#111
7081
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#114
7055
7082
  def selector_end; end
7056
7083
 
7057
7084
  # @return [Boolean]
7058
7085
  #
7059
- # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#131
7086
+ # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#134
7060
7087
  def separating_space?; end
7061
7088
  end
7062
7089
 
@@ -8463,11 +8490,6 @@ class RuboCop::Cop::Layout::DotPosition < ::RuboCop::Cop::Base
8463
8490
 
8464
8491
  private
8465
8492
 
8466
- # @return [Boolean]
8467
- #
8468
- # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#137
8469
- def ampersand_dot?(node); end
8470
-
8471
8493
  # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#49
8472
8494
  def autocorrect(corrector, dot, node); end
8473
8495
 
@@ -8690,7 +8712,23 @@ end
8690
8712
  # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#67
8691
8713
  RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String)
8692
8714
 
8693
- # Enforces empty line after guard clause
8715
+ # Enforces empty line after guard clause.
8716
+ #
8717
+ # This cop allows `# :nocov:` directive after guard clause because
8718
+ # SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`:
8719
+ #
8720
+ # [source,ruby]
8721
+ # ----
8722
+ # def foo
8723
+ # # :nocov:
8724
+ # return if condition
8725
+ # # :nocov:
8726
+ # bar
8727
+ # end
8728
+ # ----
8729
+ #
8730
+ # Refer to SimpleCov's documentation for more details:
8731
+ # https://github.com/simplecov-ruby/simplecov#ignoringskipping-code
8694
8732
  #
8695
8733
  # @example
8696
8734
  #
@@ -8723,90 +8761,106 @@ RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String)
8723
8761
  # end
8724
8762
  # end
8725
8763
  #
8726
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#38
8764
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#54
8727
8765
  class RuboCop::Cop::Layout::EmptyLineAfterGuardClause < ::RuboCop::Cop::Base
8728
8766
  include ::RuboCop::Cop::RangeHelp
8729
8767
  extend ::RuboCop::Cop::AutoCorrector
8730
8768
  extend ::RuboCop::PathUtil
8731
8769
  extend ::RuboCop::Cop::Util
8732
8770
 
8733
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#46
8771
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#63
8734
8772
  def on_if(node); end
8735
8773
 
8736
8774
  private
8737
8775
 
8738
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#65
8776
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#84
8739
8777
  def autocorrect(corrector, node); end
8740
8778
 
8741
8779
  # @return [Boolean]
8742
8780
  #
8743
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#87
8781
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#106
8744
8782
  def contains_guard_clause?(node); end
8745
8783
 
8746
8784
  # @return [Boolean]
8747
8785
  #
8748
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#80
8786
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#99
8749
8787
  def correct_style?(node); end
8750
8788
 
8751
8789
  # @return [Boolean]
8752
8790
  #
8753
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#160
8791
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#181
8754
8792
  def heredoc?(node); end
8755
8793
 
8756
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#153
8794
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#174
8757
8795
  def heredoc_line(node, heredoc_node); end
8758
8796
 
8759
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#129
8797
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#148
8760
8798
  def last_heredoc_argument(node); end
8761
8799
 
8762
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#143
8800
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#162
8763
8801
  def last_heredoc_argument_node(node); end
8764
8802
 
8765
8803
  # @return [Boolean]
8766
8804
  #
8767
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#172
8805
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#199
8768
8806
  def multiple_statements_on_line?(node); end
8769
8807
 
8770
8808
  # @return [Boolean]
8771
8809
  #
8772
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#98
8773
- def next_line_empty?(line); end
8810
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#121
8811
+ def next_line_allowed_directive_comment?(line); end
8774
8812
 
8775
8813
  # @return [Boolean]
8776
8814
  #
8777
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#91
8778
- def next_line_empty_or_enable_directive_comment?(line); end
8815
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#117
8816
+ def next_line_empty?(line); end
8779
8817
 
8780
8818
  # @return [Boolean]
8781
8819
  #
8782
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#102
8783
- def next_line_enable_directive_comment?(line); end
8820
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#110
8821
+ def next_line_empty_or_allowed_directive_comment?(line); end
8784
8822
 
8785
8823
  # @return [Boolean]
8786
8824
  #
8787
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#108
8825
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#127
8788
8826
  def next_line_rescue_or_ensure?(node); end
8789
8827
 
8790
8828
  # @return [Boolean]
8791
8829
  #
8792
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#122
8830
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#141
8793
8831
  def next_sibling_empty_or_guard_clause?(node); end
8794
8832
 
8795
8833
  # @return [Boolean]
8796
8834
  #
8797
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#113
8835
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#132
8798
8836
  def next_sibling_parent_empty_or_else?(node); end
8799
8837
 
8800
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#164
8838
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#191
8801
8839
  def offense_location(node); end
8840
+
8841
+ # SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`:
8842
+ # https://github.com/simplecov-ruby/simplecov#ignoringskipping-code
8843
+ #
8844
+ # @return [Boolean]
8845
+ #
8846
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#208
8847
+ def simplecov_directive_comment?(comment); end
8848
+
8849
+ # @return [Boolean]
8850
+ #
8851
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#185
8852
+ def use_heredoc_in_condition?(condition); end
8802
8853
  end
8803
8854
 
8804
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#44
8855
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#60
8805
8856
  RuboCop::Cop::Layout::EmptyLineAfterGuardClause::END_OF_HEREDOC_LINE = T.let(T.unsafe(nil), Integer)
8806
8857
 
8807
- # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#43
8858
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#59
8808
8859
  RuboCop::Cop::Layout::EmptyLineAfterGuardClause::MSG = T.let(T.unsafe(nil), String)
8809
8860
 
8861
+ # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#61
8862
+ RuboCop::Cop::Layout::EmptyLineAfterGuardClause::SIMPLE_DIRECTIVE_COMMENT_PATTERN = T.let(T.unsafe(nil), Regexp)
8863
+
8810
8864
  # Checks for a newline after the final magic comment.
8811
8865
  #
8812
8866
  # @example
@@ -8964,19 +9018,14 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil
8964
9018
  # `AllowAdjacentOneLineDefs` configures whether adjacent
8965
9019
  # one-line definitions are considered an offense.
8966
9020
  #
8967
- # @example AllowAdjacentOneLineDefs: false
9021
+ # @example EmptyLineBetweenMethodDefs: true (default)
9022
+ # # checks for empty lines between method definitions.
8968
9023
  #
8969
9024
  # # bad
8970
- # class ErrorA < BaseError; end
8971
- # class ErrorB < BaseError; end
8972
- # class ErrorC < BaseError; end
8973
- #
8974
- # # good
8975
- # class ErrorA < BaseError; end
8976
- #
8977
- # class ErrorB < BaseError; end
8978
- #
8979
- # class ErrorC < BaseError; end
9025
+ # def a
9026
+ # end
9027
+ # def b
9028
+ # end
8980
9029
  # @example
8981
9030
  #
8982
9031
  # # good
@@ -9040,14 +9089,19 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil
9040
9089
  # class ErrorB < BaseError; end
9041
9090
  #
9042
9091
  # class ErrorC < BaseError; end
9043
- # @example EmptyLineBetweenMethodDefs: true (default)
9044
- # # checks for empty lines between method definitions.
9092
+ # @example AllowAdjacentOneLineDefs: false
9045
9093
  #
9046
9094
  # # bad
9047
- # def a
9048
- # end
9049
- # def b
9050
- # end
9095
+ # class ErrorA < BaseError; end
9096
+ # class ErrorB < BaseError; end
9097
+ # class ErrorC < BaseError; end
9098
+ #
9099
+ # # good
9100
+ # class ErrorA < BaseError; end
9101
+ #
9102
+ # class ErrorB < BaseError; end
9103
+ #
9104
+ # class ErrorC < BaseError; end
9051
9105
  #
9052
9106
  # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#108
9053
9107
  class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base
@@ -11115,16 +11169,22 @@ RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), Stri
11115
11169
  # Alternatively you can specify multiple allowed styles. That's done by
11116
11170
  # passing a list of styles to EnforcedStyles.
11117
11171
  #
11118
- # @example EnforcedLastArgumentHashStyle: ignore_explicit
11119
- # # Ignore only explicit hashes.
11120
- #
11172
+ # @example EnforcedHashRocketStyle: key (default)
11121
11173
  # # bad
11122
- # do_something(foo: 1,
11123
- # bar: 2)
11174
+ # {
11175
+ # :foo => bar,
11176
+ # :ba => baz
11177
+ # }
11178
+ # {
11179
+ # :foo => bar,
11180
+ # :ba => baz
11181
+ # }
11124
11182
  #
11125
11183
  # # good
11126
- # do_something({foo: 1,
11127
- # bar: 2})
11184
+ # {
11185
+ # :foo => bar,
11186
+ # :ba => baz
11187
+ # }
11128
11188
  # @example EnforcedHashRocketStyle: separator
11129
11189
  # # bad
11130
11190
  # {
@@ -11243,22 +11303,16 @@ RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), Stri
11243
11303
  # # good
11244
11304
  # do_something(foo: 1,
11245
11305
  # bar: 2)
11246
- # @example EnforcedHashRocketStyle: key (default)
11306
+ # @example EnforcedLastArgumentHashStyle: ignore_explicit
11307
+ # # Ignore only explicit hashes.
11308
+ #
11247
11309
  # # bad
11248
- # {
11249
- # :foo => bar,
11250
- # :ba => baz
11251
- # }
11252
- # {
11253
- # :foo => bar,
11254
- # :ba => baz
11255
- # }
11310
+ # do_something(foo: 1,
11311
+ # bar: 2)
11256
11312
  #
11257
11313
  # # good
11258
- # {
11259
- # :foo => bar,
11260
- # :ba => baz
11261
- # }
11314
+ # do_something({foo: 1,
11315
+ # bar: 2})
11262
11316
  #
11263
11317
  # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#178
11264
11318
  class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base
@@ -11605,71 +11659,72 @@ class RuboCop::Cop::Layout::HeredocIndentation < ::RuboCop::Cop::Base
11605
11659
  include ::RuboCop::Cop::Alignment
11606
11660
  include ::RuboCop::Cop::Heredoc
11607
11661
  extend ::RuboCop::Cop::AutoCorrector
11662
+ extend ::RuboCop::Cop::TargetRubyVersion
11608
11663
 
11609
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#33
11664
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#36
11610
11665
  def on_heredoc(node); end
11611
11666
 
11612
11667
  private
11613
11668
 
11614
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#117
11669
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#120
11615
11670
  def adjust_minus(corrector, node); end
11616
11671
 
11617
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#112
11672
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#115
11618
11673
  def adjust_squiggly(corrector, node); end
11619
11674
 
11620
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#141
11675
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#144
11621
11676
  def base_indent_level(node); end
11622
11677
 
11623
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#152
11678
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#155
11624
11679
  def heredoc_body(node); end
11625
11680
 
11626
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#156
11681
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#159
11627
11682
  def heredoc_end(node); end
11628
11683
 
11629
11684
  # Returns '~', '-' or nil
11630
11685
  #
11631
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#148
11686
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#151
11632
11687
  def heredoc_indent_type(node); end
11633
11688
 
11634
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#123
11689
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#126
11635
11690
  def indented_body(node); end
11636
11691
 
11637
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#130
11692
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#133
11638
11693
  def indented_end(node); end
11639
11694
 
11640
11695
  # @return [Boolean]
11641
11696
  #
11642
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#88
11697
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#91
11643
11698
  def line_too_long?(node); end
11644
11699
 
11645
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#100
11700
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#103
11646
11701
  def longest_line(lines); end
11647
11702
 
11648
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#108
11703
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#111
11649
11704
  def max_line_length; end
11650
11705
 
11651
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#66
11706
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#69
11652
11707
  def message(heredoc_indent_type); end
11653
11708
 
11654
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#54
11709
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#57
11655
11710
  def register_offense(node, heredoc_indent_type); end
11656
11711
 
11657
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#76
11712
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#79
11658
11713
  def type_message(indentation_width, current_indent_type); end
11659
11714
 
11660
11715
  # @return [Boolean]
11661
11716
  #
11662
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#104
11717
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#107
11663
11718
  def unlimited_heredoc_length?; end
11664
11719
 
11665
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#84
11720
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#87
11666
11721
  def width_message(indentation_width); end
11667
11722
  end
11668
11723
 
11669
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#29
11724
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#32
11670
11725
  RuboCop::Cop::Layout::HeredocIndentation::TYPE_MSG = T.let(T.unsafe(nil), String)
11671
11726
 
11672
- # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#31
11727
+ # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#34
11673
11728
  RuboCop::Cop::Layout::HeredocIndentation::WIDTH_MSG = T.let(T.unsafe(nil), String)
11674
11729
 
11675
11730
  # Checks for inconsistent indentation.
@@ -12329,35 +12384,38 @@ class RuboCop::Cop::Layout::LineContinuationLeadingSpace < ::RuboCop::Cop::Base
12329
12384
 
12330
12385
  private
12331
12386
 
12332
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#105
12387
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#113
12333
12388
  def autocorrect(corrector, offense_range, insert_pos, spaces); end
12334
12389
 
12335
12390
  # @return [Boolean]
12336
12391
  #
12337
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#101
12338
- def continuation?(line); end
12392
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#106
12393
+ def continuation?(line, line_num, node); end
12339
12394
 
12340
12395
  # @return [Boolean]
12341
12396
  #
12342
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#130
12397
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#138
12343
12398
  def enforced_style_leading?; end
12344
12399
 
12345
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#79
12400
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#76
12401
+ def investigate(first_line, second_line, end_of_first_line); end
12402
+
12403
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#84
12346
12404
  def investigate_leading_style(first_line, second_line, end_of_first_line); end
12347
12405
 
12348
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#90
12406
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#95
12349
12407
  def investigate_trailing_style(first_line, second_line, end_of_first_line); end
12350
12408
 
12351
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#110
12409
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#118
12352
12410
  def leading_offense_range(end_of_first_line, matches); end
12353
12411
 
12354
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#122
12412
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#130
12355
12413
  def message(_range); end
12356
12414
 
12357
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#75
12415
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#72
12358
12416
  def raw_lines(node); end
12359
12417
 
12360
- # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#116
12418
+ # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#124
12361
12419
  def trailing_offense_range(end_of_first_line, matches); end
12362
12420
  end
12363
12421
 
@@ -13523,10 +13581,13 @@ class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Bas
13523
13581
  # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#101
13524
13582
  def extra_indentation(given_style, parent); end
13525
13583
 
13526
- # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#222
13584
+ # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#226
13585
+ def find_multiline_block_chain_node(node); end
13586
+
13587
+ # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#237
13527
13588
  def first_call_has_a_dot(node); end
13528
13589
 
13529
- # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#213
13590
+ # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#217
13530
13591
  def get_dot_right_above(node); end
13531
13592
 
13532
13593
  # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#113
@@ -13540,12 +13601,12 @@ class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Bas
13540
13601
 
13541
13602
  # @yield [operation_rhs.first_argument]
13542
13603
  #
13543
- # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#232
13604
+ # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#247
13544
13605
  def operation_rhs(node); end
13545
13606
 
13546
13607
  # @return [Boolean]
13547
13608
  #
13548
- # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#242
13609
+ # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#257
13549
13610
  def operator_rhs?(node, receiver); end
13550
13611
 
13551
13612
  # a
@@ -14035,7 +14096,7 @@ class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base
14035
14096
  # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#68
14036
14097
  def end_with_percent_blank_string?(processed_source); end
14037
14098
 
14038
- # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#140
14099
+ # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#142
14039
14100
  def max_line_length; end
14040
14101
 
14041
14102
  # @return [Boolean]
@@ -14061,12 +14122,12 @@ class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base
14061
14122
  # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#107
14062
14123
  def suitable_as_single_line?(node); end
14063
14124
 
14064
- # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#131
14125
+ # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#133
14065
14126
  def to_single_line(source); end
14066
14127
 
14067
14128
  # @return [Boolean]
14068
14129
  #
14069
- # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#126
14130
+ # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#128
14070
14131
  def too_long?(node); end
14071
14132
  end
14072
14133
 
@@ -17247,12 +17308,17 @@ class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base
17247
17308
 
17248
17309
  private
17249
17310
 
17311
+ # @return [Boolean]
17312
+ #
17313
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#116
17314
+ def assumed_argument?(node); end
17315
+
17250
17316
  # @return [Boolean]
17251
17317
  #
17252
17318
  # source://rubocop//lib/rubocop/cop/lint/debugger.rb#95
17253
17319
  def assumed_usage_context?(node); end
17254
17320
 
17255
- # source://rubocop//lib/rubocop/cop/lint/debugger.rb#102
17321
+ # source://rubocop//lib/rubocop/cop/lint/debugger.rb#105
17256
17322
  def chained_method_name(send_node); end
17257
17323
 
17258
17324
  # @return [Boolean]
@@ -18266,7 +18332,7 @@ RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String)
18266
18332
 
18267
18333
  # Checks for blocks without a body.
18268
18334
  # Such empty blocks are typically an oversight or we should provide a comment
18269
- # be clearer what we're aiming for.
18335
+ # to clarify what we're aiming for.
18270
18336
  #
18271
18337
  # Empty lambdas and procs are ignored by default.
18272
18338
  #
@@ -19076,7 +19142,7 @@ RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String)
19076
19142
  #
19077
19143
  # format('Numbered format: %1$s and numbered %2$s', a_value, another)
19078
19144
  #
19079
- # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#37
19145
+ # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#38
19080
19146
  class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base
19081
19147
  # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#100
19082
19148
  def called_on_string?(param0 = T.unsafe(nil)); end
@@ -20284,14 +20350,17 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe
20284
20350
 
20285
20351
  # Checks for nested method definitions.
20286
20352
  #
20287
- # @example AllowedPatterns: ['baz']
20288
- # # good
20289
- # def foo(obj)
20290
- # obj.do_baz do
20353
+ # @example
20354
+ #
20355
+ # # bad
20356
+ #
20357
+ # # `bar` definition actually produces methods in the same scope
20358
+ # # as the outer `foo` method. Furthermore, the `bar` method
20359
+ # # will be redefined every time `foo` is invoked.
20360
+ # def foo
20291
20361
  # def bar
20292
20362
  # end
20293
20363
  # end
20294
- # end
20295
20364
  # @example
20296
20365
  #
20297
20366
  # # good
@@ -20354,17 +20423,14 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe
20354
20423
  # end
20355
20424
  # end
20356
20425
  # end
20357
- # @example
20358
- #
20359
- # # bad
20360
- #
20361
- # # `bar` definition actually produces methods in the same scope
20362
- # # as the outer `foo` method. Furthermore, the `bar` method
20363
- # # will be redefined every time `foo` is invoked.
20364
- # def foo
20426
+ # @example AllowedPatterns: ['baz']
20427
+ # # good
20428
+ # def foo(obj)
20429
+ # obj.do_baz do
20365
20430
  # def bar
20366
20431
  # end
20367
20432
  # end
20433
+ # end
20368
20434
  #
20369
20435
  # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97
20370
20436
  class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base
@@ -20588,89 +20654,91 @@ RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String)
20588
20654
  #
20589
20655
  # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#44
20590
20656
  class RuboCop::Cop::Lint::NonAtomicFileOperation < ::RuboCop::Cop::Base
20591
- include ::RuboCop::Cop::Alignment
20592
20657
  extend ::RuboCop::Cop::AutoCorrector
20593
20658
 
20594
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#75
20659
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#76
20595
20660
  def explicit_not_force?(param0); end
20596
20661
 
20597
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#70
20662
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#71
20598
20663
  def force?(param0); end
20599
20664
 
20600
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#79
20665
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#80
20601
20666
  def on_send(node); end
20602
20667
 
20603
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#65
20668
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#66
20604
20669
  def receiver_and_method_name(param0 = T.unsafe(nil)); end
20605
20670
 
20606
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#60
20671
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#61
20607
20672
  def send_exist_node(param0); end
20608
20673
 
20609
20674
  private
20610
20675
 
20611
20676
  # @return [Boolean]
20612
20677
  #
20613
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#96
20678
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#97
20614
20679
  def allowable_use_with_if?(if_node); end
20615
20680
 
20616
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#120
20681
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#121
20617
20682
  def autocorrect(corrector, node, range); end
20618
20683
 
20619
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#131
20684
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#132
20620
20685
  def autocorrect_replace_method(corrector, node); end
20621
20686
 
20622
20687
  # @return [Boolean]
20623
20688
  #
20624
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#148
20689
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#151
20625
20690
  def force_method?(node); end
20626
20691
 
20627
20692
  # @return [Boolean]
20628
20693
  #
20629
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#156
20694
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#159
20630
20695
  def force_method_name?(node); end
20631
20696
 
20632
20697
  # @return [Boolean]
20633
20698
  #
20634
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#152
20699
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#155
20635
20700
  def force_option?(node); end
20636
20701
 
20637
20702
  # @return [Boolean]
20638
20703
  #
20639
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#90
20704
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#91
20640
20705
  def if_node_child?(node); end
20641
20706
 
20642
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#111
20707
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#112
20643
20708
  def message_change_force_method(node); end
20644
20709
 
20645
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#115
20710
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#116
20646
20711
  def message_remove_file_exist_check(node); end
20647
20712
 
20648
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#100
20713
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#101
20649
20714
  def register_offense(node, exist_node); end
20650
20715
 
20651
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#138
20716
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#139
20652
20717
  def replacement_method(node); end
20653
20718
  end
20654
20719
 
20655
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#51
20720
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#50
20656
20721
  RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_FORCE_METHODS = T.let(T.unsafe(nil), Array)
20657
20722
 
20658
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#52
20723
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#51
20659
20724
  RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_METHODS = T.let(T.unsafe(nil), Array)
20660
20725
 
20661
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#50
20726
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#49
20662
20727
  RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_CHANGE_FORCE_METHOD = T.let(T.unsafe(nil), String)
20663
20728
 
20664
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#48
20729
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#47
20665
20730
  RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_REMOVE_FILE_EXIST_CHECK = T.let(T.unsafe(nil), String)
20666
20731
 
20667
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#53
20732
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#54
20733
+ RuboCop::Cop::Lint::NonAtomicFileOperation::RECURSIVE_REMOVE_METHODS = T.let(T.unsafe(nil), Array)
20734
+
20735
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#52
20668
20736
  RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_FORCE_METHODS = T.let(T.unsafe(nil), Array)
20669
20737
 
20670
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#54
20738
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#53
20671
20739
  RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_METHODS = T.let(T.unsafe(nil), Array)
20672
20740
 
20673
- # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#56
20741
+ # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#55
20674
20742
  RuboCop::Cop::Lint::NonAtomicFileOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
20675
20743
 
20676
20744
  # `Dir[...]` and `Dir.glob(...)` do not make any guarantees about
@@ -21809,48 +21877,52 @@ RuboCop::Cop::Lint::RedundantRegexpQuantifiers::MSG_REDUNDANT_QUANTIFIER = T.let
21809
21877
  # # good
21810
21878
  # require 'unloaded_feature'
21811
21879
  #
21812
- # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#34
21880
+ # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#38
21813
21881
  class RuboCop::Cop::Lint::RedundantRequireStatement < ::RuboCop::Cop::Base
21814
21882
  include ::RuboCop::Cop::RangeHelp
21815
21883
  extend ::RuboCop::Cop::AutoCorrector
21816
21884
 
21817
- # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#57
21885
+ # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#61
21818
21886
  def on_send(node); end
21819
21887
 
21820
- # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#53
21888
+ # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#57
21821
21889
  def pp_const?(param0 = T.unsafe(nil)); end
21822
21890
 
21823
- # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#47
21891
+ # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#51
21824
21892
  def redundant_require_statement?(param0 = T.unsafe(nil)); end
21825
21893
 
21826
21894
  private
21827
21895
 
21828
21896
  # @return [Boolean]
21829
21897
  #
21830
- # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#87
21898
+ # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#91
21831
21899
  def need_to_require_pp?; end
21832
21900
 
21833
21901
  # @return [Boolean]
21834
21902
  #
21835
- # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#76
21903
+ # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#80
21836
21904
  def redundant_feature?(feature_name); end
21837
21905
  end
21838
21906
 
21839
- # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#38
21907
+ # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#42
21840
21908
  RuboCop::Cop::Lint::RedundantRequireStatement::MSG = T.let(T.unsafe(nil), String)
21841
21909
 
21842
- # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#41
21910
+ # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#45
21843
21911
  RuboCop::Cop::Lint::RedundantRequireStatement::PRETTY_PRINT_METHODS = T.let(T.unsafe(nil), Array)
21844
21912
 
21845
- # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#39
21913
+ # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#43
21846
21914
  RuboCop::Cop::Lint::RedundantRequireStatement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
21847
21915
 
21848
- # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#40
21916
+ # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#44
21849
21917
  RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T.unsafe(nil), Array)
21850
21918
 
21851
21919
  # Checks for redundant safe navigation calls.
21852
- # `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`, and `equal?` methods
21853
- # are checked by default. These are customizable with `AllowedMethods` option.
21920
+ # Use cases where a constant, named in camel case for classes and modules is `nil` are rare,
21921
+ # and an offense is not detected when the receiver is a snake case constant.
21922
+ #
21923
+ # For all receivers, the `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`,
21924
+ # and `equal?` methods are checked by default.
21925
+ # These are customizable with `AllowedMethods` option.
21854
21926
  #
21855
21927
  # The `AllowedMethods` option specifies nil-safe methods,
21856
21928
  # in other words, it is a method that is allowed to skip safe navigation.
@@ -21862,6 +21934,9 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T
21862
21934
  #
21863
21935
  # @example
21864
21936
  # # bad
21937
+ # CamelCaseConst&.do_something
21938
+ #
21939
+ # # bad
21865
21940
  # do_something if attrs&.respond_to?(:[])
21866
21941
  #
21867
21942
  # # good
@@ -21873,6 +21948,9 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T
21873
21948
  # end
21874
21949
  #
21875
21950
  # # good
21951
+ # CamelCaseConst.do_something
21952
+ #
21953
+ # # good
21876
21954
  # while node.is_a?(BeginNode)
21877
21955
  # node = node.parent
21878
21956
  # end
@@ -21887,37 +21965,40 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T
21887
21965
  # do_something if attrs.nil_safe_method(:[])
21888
21966
  # do_something if attrs&.not_nil_safe_method(:[])
21889
21967
  #
21890
- # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#51
21968
+ # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#61
21891
21969
  class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base
21892
21970
  include ::RuboCop::Cop::AllowedMethods
21893
21971
  include ::RuboCop::Cop::RangeHelp
21894
21972
  extend ::RuboCop::Cop::AutoCorrector
21895
21973
 
21896
- # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#65
21974
+ # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#78
21897
21975
  def on_csend(node); end
21898
21976
 
21899
- # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#61
21977
+ # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#73
21900
21978
  def respond_to_nil_specific_method?(param0 = T.unsafe(nil)); end
21901
21979
 
21902
21980
  private
21903
21981
 
21904
21982
  # @return [Boolean]
21905
21983
  #
21906
- # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#75
21984
+ # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#91
21907
21985
  def check?(node); end
21908
21986
 
21909
21987
  # @return [Boolean]
21910
21988
  #
21911
- # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#85
21989
+ # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#101
21912
21990
  def condition?(parent, node); end
21913
21991
  end
21914
21992
 
21915
- # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#56
21993
+ # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#66
21916
21994
  RuboCop::Cop::Lint::RedundantSafeNavigation::MSG = T.let(T.unsafe(nil), String)
21917
21995
 
21918
- # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#58
21996
+ # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#68
21919
21997
  RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsafe(nil), Set)
21920
21998
 
21999
+ # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#70
22000
+ RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp)
22001
+
21921
22002
  # Checks for unneeded usages of splat expansion
21922
22003
  #
21923
22004
  # @example
@@ -22599,8 +22680,13 @@ class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base
22599
22680
 
22600
22681
  # @return [Boolean]
22601
22682
  #
22602
- # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#92
22683
+ # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#91
22603
22684
  def brackets?(send_node); end
22685
+
22686
+ # @return [Boolean]
22687
+ #
22688
+ # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#95
22689
+ def require_parentheses?(send_node); end
22604
22690
  end
22605
22691
 
22606
22692
  # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33
@@ -24676,12 +24762,18 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String)
24676
24762
  # scope.
24677
24763
  # The basic idea for this cop was from the warning of `ruby -cw`:
24678
24764
  #
24679
- # assigned but unused variable - foo
24765
+ # [source,console]
24766
+ # ----
24767
+ # assigned but unused variable - foo
24768
+ # ----
24680
24769
  #
24681
24770
  # Currently this cop has advanced logic that detects unreferenced
24682
24771
  # reassignments and properly handles varied cases such as branch, loop,
24683
24772
  # rescue, ensure, etc.
24684
24773
  #
24774
+ # NOTE: Given the assignment `foo = 1, bar = 2`, removing unused variables
24775
+ # can lead to a syntax error, so this case is not autocorrected.
24776
+ #
24685
24777
  # @example
24686
24778
  #
24687
24779
  # # bad
@@ -24699,70 +24791,83 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String)
24699
24791
  # do_something(some_var)
24700
24792
  # end
24701
24793
  #
24702
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#39
24794
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45
24703
24795
  class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base
24704
24796
  include ::RuboCop::Cop::RangeHelp
24705
24797
  extend ::RuboCop::Cop::AutoCorrector
24706
24798
 
24707
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50
24799
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#56
24708
24800
  def after_leaving_scope(scope, _variable_table); end
24709
24801
 
24710
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#136
24802
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#162
24711
24803
  def autocorrect(corrector, assignment); end
24712
24804
 
24713
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#54
24805
+ # @return [Boolean]
24806
+ #
24807
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103
24808
+ def chained_assignment?(node); end
24809
+
24810
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#61
24714
24811
  def check_for_unused_assignments(variable); end
24715
24812
 
24716
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#120
24813
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#146
24717
24814
  def collect_variable_like_names(scope); end
24718
24815
 
24719
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#74
24816
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#79
24720
24817
  def message_for_useless_assignment(assignment); end
24721
24818
 
24722
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#80
24819
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#107
24723
24820
  def message_specification(assignment, variable); end
24724
24821
 
24725
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#90
24822
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#117
24726
24823
  def multiple_assignment_message(variable_name); end
24727
24824
 
24728
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#95
24825
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#85
24826
+ def offense_range(assignment); end
24827
+
24828
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#122
24729
24829
  def operator_assignment_message(scope, assignment); end
24730
24830
 
24731
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#153
24831
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#179
24732
24832
  def remove_exception_assignment_part(corrector, node); end
24733
24833
 
24734
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#177
24834
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#203
24735
24835
  def remove_local_variable_assignment_part(corrector, node); end
24736
24836
 
24737
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#166
24837
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#192
24738
24838
  def remove_trailing_character_from_operator(corrector, node); end
24739
24839
 
24740
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#162
24840
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#188
24741
24841
  def rename_variable_with_underscore(corrector, node); end
24742
24842
 
24743
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#170
24843
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#196
24744
24844
  def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end
24745
24845
 
24746
24846
  # TODO: More precise handling (rescue, ensure, nested begin, etc.)
24747
24847
  #
24748
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#110
24848
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#136
24749
24849
  def return_value_node_of_scope(scope); end
24750
24850
 
24751
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103
24851
+ # @return [Boolean]
24852
+ #
24853
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#93
24854
+ def sequential_assignment?(node); end
24855
+
24856
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#129
24752
24857
  def similar_name_message(variable); end
24753
24858
 
24754
24859
  # @return [Boolean]
24755
24860
  #
24756
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#129
24861
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#155
24757
24862
  def variable_like_method_invocation?(node); end
24758
24863
 
24759
24864
  class << self
24760
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#46
24865
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#52
24761
24866
  def joining_forces; end
24762
24867
  end
24763
24868
  end
24764
24869
 
24765
- # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#44
24870
+ # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50
24766
24871
  RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String)
24767
24872
 
24768
24873
  # Checks for useless `else` in `begin..end` without `rescue`.
@@ -25564,13 +25669,12 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String)
25564
25669
  # Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct
25565
25670
  # will be counted as one line regardless of its actual size.
25566
25671
  #
25672
+ # NOTE: This cop does not apply for `Struct` definitions.
25567
25673
  #
25568
25674
  # NOTE: The `ExcludedMethods` configuration is deprecated and only kept
25569
25675
  # for backwards compatibility. Please use `AllowedMethods` and `AllowedPatterns`
25570
25676
  # instead. By default, there are no methods to allowed.
25571
25677
  #
25572
- # NOTE: This cop does not apply for `Struct` definitions.
25573
- #
25574
25678
  # @example CountAsOne: ['array', 'heredoc', 'method_call']
25575
25679
  #
25576
25680
  # something do
@@ -26582,18 +26686,21 @@ end
26582
26686
  #
26583
26687
  # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#7
26584
26688
  module RuboCop::Cop::MultilineExpressionIndentation
26689
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#14
26690
+ def on_csend(node); end
26691
+
26585
26692
  # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#14
26586
26693
  def on_send(node); end
26587
26694
 
26588
26695
  private
26589
26696
 
26590
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#131
26697
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#132
26591
26698
  def argument_in_method_call(node, kind); end
26592
26699
 
26593
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#187
26700
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#188
26594
26701
  def assignment_rhs(node); end
26595
26702
 
26596
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#64
26703
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#65
26597
26704
  def check(range, node, lhs, rhs); end
26598
26705
 
26599
26706
  # The correct indentation of `node` is usually `IndentationWidth`, with
@@ -26613,62 +26720,62 @@ module RuboCop::Cop::MultilineExpressionIndentation
26613
26720
  # bar # normal indentation, not special
26614
26721
  # ```
26615
26722
  #
26616
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#54
26723
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#55
26617
26724
  def correct_indentation(node); end
26618
26725
 
26619
26726
  # @return [Boolean]
26620
26727
  #
26621
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#159
26728
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#160
26622
26729
  def disqualified_rhs?(candidate, ancestor); end
26623
26730
 
26624
26731
  # @return [Boolean]
26625
26732
  #
26626
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#203
26733
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#204
26627
26734
  def grouped_expression?(node); end
26628
26735
 
26629
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#72
26736
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#73
26630
26737
  def incorrect_style_detected(range, node, lhs, rhs); end
26631
26738
 
26632
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#84
26739
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#85
26633
26740
  def indentation(node); end
26634
26741
 
26635
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#121
26742
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#122
26636
26743
  def indented_keyword_expression(node); end
26637
26744
 
26638
26745
  # @return [Boolean]
26639
26746
  #
26640
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#207
26747
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#208
26641
26748
  def inside_arg_list_parentheses?(node, ancestor); end
26642
26749
 
26643
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#98
26750
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#99
26644
26751
  def keyword_message_tail(node); end
26645
26752
 
26646
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#106
26753
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#107
26647
26754
  def kw_node_with_special_indentation(node); end
26648
26755
 
26649
- # In a chain of method calls, we regard the top send node as the base
26756
+ # In a chain of method calls, we regard the top call node as the base
26650
26757
  # for indentation of all lines following the first. For example:
26651
26758
  # a.
26652
26759
  # b c { block }. <-- b is indented relative to a
26653
26760
  # d <-- d is indented relative to a
26654
26761
  #
26655
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#31
26762
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#32
26656
26763
  def left_hand_side(lhs); end
26657
26764
 
26658
26765
  # @return [Boolean]
26659
26766
  #
26660
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#197
26767
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#198
26661
26768
  def not_for_this_cop?(node); end
26662
26769
 
26663
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#88
26770
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#89
26664
26771
  def operation_description(node, rhs); end
26665
26772
 
26666
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#145
26773
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#146
26667
26774
  def part_of_assignment_rhs(node, candidate); end
26668
26775
 
26669
26776
  # @return [Boolean]
26670
26777
  #
26671
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#183
26778
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#184
26672
26779
  def part_of_block_body?(candidate, block_node); end
26673
26780
 
26674
26781
  # Returns true if `node` is a conditional whose `body` and `condition`
@@ -26676,29 +26783,29 @@ module RuboCop::Cop::MultilineExpressionIndentation
26676
26783
  #
26677
26784
  # @return [Boolean]
26678
26785
  #
26679
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#216
26786
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#217
26680
26787
  def postfix_conditional?(node); end
26681
26788
 
26682
26789
  # The []= operator and setters (a.b = c) are parsed as :send nodes.
26683
26790
  #
26684
26791
  # @return [Boolean]
26685
26792
  #
26686
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#175
26793
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#176
26687
26794
  def valid_method_rhs_candidate?(candidate, node); end
26688
26795
 
26689
26796
  # @return [Boolean]
26690
26797
  #
26691
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#164
26798
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#165
26692
26799
  def valid_rhs?(candidate, ancestor); end
26693
26800
 
26694
26801
  # @return [Boolean]
26695
26802
  #
26696
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#179
26803
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#180
26697
26804
  def valid_rhs_candidate?(candidate, node); end
26698
26805
 
26699
26806
  # @return [Boolean]
26700
26807
  #
26701
- # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#220
26808
+ # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#221
26702
26809
  def within_node?(inner, outer); end
26703
26810
  end
26704
26811
 
@@ -28289,9 +28396,22 @@ RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String)
28289
28396
  # can be used to specify whether method names and symbols should be checked.
28290
28397
  # Both are enabled by default.
28291
28398
  #
28292
- # @example AllowedPatterns: ['_v\d+\z']
28399
+ # @example EnforcedStyle: normalcase (default)
28400
+ # # bad
28401
+ # :some_sym_1
28402
+ # variable_1 = 1
28403
+ #
28404
+ # def some_method_1; end
28405
+ #
28406
+ # def some_method1(arg_1); end
28407
+ #
28293
28408
  # # good
28294
- # :some_sym_v1
28409
+ # :some_sym1
28410
+ # variable1 = 1
28411
+ #
28412
+ # def some_method1; end
28413
+ #
28414
+ # def some_method1(arg1); end
28295
28415
  # @example EnforcedStyle: snake_case
28296
28416
  # # bad
28297
28417
  # :some_sym1
@@ -28353,22 +28473,9 @@ RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String)
28353
28473
  # @example AllowedIdentifiers: [capture3]
28354
28474
  # # good
28355
28475
  # expect(Open3).to receive(:capture3)
28356
- # @example EnforcedStyle: normalcase (default)
28357
- # # bad
28358
- # :some_sym_1
28359
- # variable_1 = 1
28360
- #
28361
- # def some_method_1; end
28362
- #
28363
- # def some_method1(arg_1); end
28364
- #
28476
+ # @example AllowedPatterns: ['_v\d+\z']
28365
28477
  # # good
28366
- # :some_sym1
28367
- # variable1 = 1
28368
- #
28369
- # def some_method1; end
28370
- #
28371
- # def some_method1(arg1); end
28478
+ # :some_sym_v1
28372
28479
  #
28373
28480
  # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#103
28374
28481
  class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base
@@ -29045,7 +29152,7 @@ module RuboCop::Cop::PrecedingFollowingAlignment
29045
29152
 
29046
29153
  # @return [Boolean]
29047
29154
  #
29048
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#95
29155
+ # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#93
29049
29156
  def aligned_assignment?(range, line); end
29050
29157
 
29051
29158
  # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#70
@@ -29053,12 +29160,7 @@ module RuboCop::Cop::PrecedingFollowingAlignment
29053
29160
 
29054
29161
  # @return [Boolean]
29055
29162
  #
29056
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#89
29057
- def aligned_dot?(range, line); end
29058
-
29059
- # @return [Boolean]
29060
- #
29061
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#107
29163
+ # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#105
29062
29164
  def aligned_identical?(range, line); end
29063
29165
 
29064
29166
  # @return [Boolean]
@@ -29088,10 +29190,10 @@ module RuboCop::Cop::PrecedingFollowingAlignment
29088
29190
 
29089
29191
  # @return [Boolean]
29090
29192
  #
29091
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#100
29193
+ # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#98
29092
29194
  def aligned_with_append_operator?(range, line); end
29093
29195
 
29094
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#111
29196
+ # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#109
29095
29197
  def aligned_with_assignment(token, line_range); end
29096
29198
 
29097
29199
  # @return [Boolean]
@@ -29125,16 +29227,16 @@ module RuboCop::Cop::PrecedingFollowingAlignment
29125
29227
  # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#10
29126
29228
  def allow_for_alignment?; end
29127
29229
 
29128
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#129
29230
+ # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#127
29129
29231
  def assignment_lines; end
29130
29232
 
29131
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#133
29233
+ # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#131
29132
29234
  def assignment_tokens; end
29133
29235
 
29134
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#149
29236
+ # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#147
29135
29237
  def relevant_assignment_lines(line_range); end
29136
29238
 
29137
- # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#176
29239
+ # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#174
29138
29240
  def remove_optarg_equals(asgn_tokens, processed_source); end
29139
29241
  end
29140
29242
 
@@ -30651,171 +30753,184 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base
30651
30753
  extend ::RuboCop::Cop::AutoCorrector
30652
30754
  extend ::RuboCop::Cop::TargetRubyVersion
30653
30755
 
30654
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#88
30756
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#89
30655
30757
  def on_def(node); end
30656
30758
 
30657
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#88
30759
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#89
30658
30760
  def on_defs(node); end
30659
30761
 
30660
30762
  private
30661
30763
 
30662
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#121
30764
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#122
30663
30765
  def add_forward_all_offenses(node, send_classifications, forwardable_args); end
30664
30766
 
30665
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#230
30767
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#233
30666
30768
  def add_parens_if_missing(node, corrector); end
30667
30769
 
30668
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#130
30770
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#131
30669
30771
  def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end
30670
30772
 
30671
30773
  # @return [Boolean]
30672
30774
  #
30673
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#222
30775
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#225
30674
30776
  def allow_only_rest_arguments?; end
30675
30777
 
30676
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#214
30778
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#217
30677
30779
  def arguments_range(node, first_node); end
30678
30780
 
30679
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#171
30781
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#174
30680
30782
  def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end
30681
30783
 
30682
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#158
30784
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#159
30683
30785
  def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end
30684
30786
 
30685
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#113
30787
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#114
30686
30788
  def extract_forwardable_args(args); end
30687
30789
 
30688
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#148
30790
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#149
30689
30791
  def non_splat_or_block_pass_lvar_references(body); end
30690
30792
 
30691
30793
  # @return [Boolean]
30692
30794
  #
30693
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#117
30795
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#118
30694
30796
  def only_forwards_all?(send_classifications); end
30695
30797
 
30696
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#204
30798
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#207
30697
30799
  def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end
30698
30800
 
30699
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#188
30801
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#191
30700
30802
  def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end
30701
30803
 
30702
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#196
30804
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#199
30703
30805
  def register_forward_kwargs_offense(add_parens, def_arguments_or_send, kwrest_arg_or_splat); end
30704
30806
 
30705
30807
  # @return [Boolean]
30706
30808
  #
30707
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#226
30809
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#229
30708
30810
  def use_anonymous_forwarding?; end
30709
30811
  end
30710
30812
 
30711
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#85
30813
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#83
30814
+ RuboCop::Cop::Style::ArgumentsForwarding::ADDITIONAL_ARG_TYPES = T.let(T.unsafe(nil), Array)
30815
+
30816
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#86
30712
30817
  RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String)
30713
30818
 
30714
30819
  # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#82
30715
30820
  RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array)
30716
30821
 
30717
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#84
30822
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#85
30718
30823
  RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String)
30719
30824
 
30720
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#86
30825
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#87
30721
30826
  RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), String)
30722
30827
 
30723
30828
  # Classifies send nodes for possible rest/kwrest/all (including block) forwarding.
30724
30829
  #
30725
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#237
30830
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#240
30726
30831
  class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier
30727
30832
  extend ::RuboCop::AST::NodePattern::Macros
30728
30833
 
30729
30834
  # @return [SendNodeClassifier] a new instance of SendNodeClassifier
30730
30835
  #
30731
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#249
30836
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#252
30732
30837
  def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end
30733
30838
 
30734
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#277
30839
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#280
30735
30840
  def classification; end
30736
30841
 
30737
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#244
30842
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#247
30738
30843
  def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end
30739
30844
 
30740
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#271
30845
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#274
30741
30846
  def forwarded_block_arg; end
30742
30847
 
30743
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#247
30848
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#250
30744
30849
  def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end
30745
30850
 
30746
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#265
30851
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#268
30747
30852
  def forwarded_kwrest_arg; end
30748
30853
 
30749
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#259
30854
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#262
30750
30855
  def forwarded_rest_arg; end
30751
30856
 
30752
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#241
30857
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#244
30753
30858
  def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end
30754
30859
 
30755
30860
  private
30756
30861
 
30757
30862
  # @return [Boolean]
30758
30863
  #
30759
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#347
30864
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#348
30865
+ def additional_kwargs?; end
30866
+
30867
+ # @return [Boolean]
30868
+ #
30869
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#344
30870
+ def additional_kwargs_or_forwarded_kwargs?; end
30871
+
30872
+ # @return [Boolean]
30873
+ #
30874
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#358
30760
30875
  def allow_offense_for_no_block?; end
30761
30876
 
30762
30877
  # @return [Boolean]
30763
30878
  #
30764
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#326
30879
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#329
30765
30880
  def any_arg_referenced?; end
30766
30881
 
30767
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#310
30882
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#313
30768
30883
  def arguments; end
30769
30884
 
30770
30885
  # @return [Boolean]
30771
30886
  #
30772
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#289
30887
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#292
30773
30888
  def can_forward_all?; end
30774
30889
 
30775
30890
  # @return [Boolean]
30776
30891
  #
30777
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#341
30892
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#352
30778
30893
  def forward_additional_kwargs?; end
30779
30894
 
30780
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#306
30895
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#309
30781
30896
  def forwarded_rest_and_kwrest_args; end
30782
30897
 
30783
30898
  # @return [Boolean]
30784
30899
  #
30785
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#351
30900
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#362
30786
30901
  def no_additional_args?; end
30787
30902
 
30788
30903
  # @return [Boolean]
30789
30904
  #
30790
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#334
30905
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#337
30791
30906
  def no_post_splat_args?; end
30792
30907
 
30793
30908
  # @return [Boolean]
30794
30909
  #
30795
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#302
30910
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#305
30796
30911
  def offensive_block_forwarding?; end
30797
30912
 
30798
30913
  # @return [Boolean]
30799
30914
  #
30800
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#322
30915
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#325
30801
30916
  def referenced_block_arg?; end
30802
30917
 
30803
30918
  # @return [Boolean]
30804
30919
  #
30805
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#318
30920
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#321
30806
30921
  def referenced_kwrest_arg?; end
30807
30922
 
30808
30923
  # @return [Boolean]
30809
30924
  #
30810
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#314
30925
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#317
30811
30926
  def referenced_rest_arg?; end
30812
30927
 
30813
30928
  # @return [Boolean]
30814
30929
  #
30815
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#298
30930
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#301
30816
30931
  def ruby_32_missing_rest_or_kwest?; end
30817
30932
 
30818
- # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#330
30933
+ # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#333
30819
30934
  def target_ruby_version; end
30820
30935
  end
30821
30936
 
@@ -30865,6 +30980,15 @@ RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String)
30865
30980
  # The `array1.intersect?(array2)` method is faster than
30866
30981
  # `(array1 & array2).any?` and is more readable.
30867
30982
  #
30983
+ # In cases like the following, compatibility is not ensured,
30984
+ # so it will not be detected when using block argument.
30985
+ #
30986
+ # [source,ruby]
30987
+ # ----
30988
+ # ([1] & [1,2]).any? { |x| false } # => false
30989
+ # [1].intersect?([1,2]) { |x| false } # => true
30990
+ # ----
30991
+ #
30868
30992
  # @example
30869
30993
  # # bad
30870
30994
  # (array1 & array2).any?
@@ -30886,46 +31010,46 @@ RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String)
30886
31010
  # array1.intersect?(array2)
30887
31011
  # !array1.intersect?(array2)
30888
31012
  #
30889
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#40
31013
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#49
30890
31014
  class RuboCop::Cop::Style::ArrayIntersect < ::RuboCop::Cop::Base
30891
31015
  extend ::RuboCop::Cop::AutoCorrector
30892
31016
  extend ::RuboCop::Cop::TargetRubyVersion
30893
31017
 
30894
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#56
31018
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#65
30895
31019
  def active_support_bad_intersection_check?(param0 = T.unsafe(nil)); end
30896
31020
 
30897
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#70
31021
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#79
30898
31022
  def on_send(node); end
30899
31023
 
30900
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#47
31024
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#56
30901
31025
  def regular_bad_intersection_check?(param0 = T.unsafe(nil)); end
30902
31026
 
30903
31027
  private
30904
31028
 
30905
31029
  # @return [Boolean]
30906
31030
  #
30907
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#86
31031
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#94
30908
31032
  def bad_intersection_check?(node); end
30909
31033
 
30910
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#98
31034
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#106
30911
31035
  def message(receiver, argument, method_name); end
30912
31036
 
30913
31037
  # @return [Boolean]
30914
31038
  #
30915
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#94
31039
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#102
30916
31040
  def straight?(method_name); end
30917
31041
  end
30918
31042
 
30919
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#64
31043
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#73
30920
31044
  RuboCop::Cop::Style::ArrayIntersect::MSG = T.let(T.unsafe(nil), String)
30921
31045
 
30922
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#67
31046
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#76
30923
31047
  RuboCop::Cop::Style::ArrayIntersect::NEGATED_METHODS = T.let(T.unsafe(nil), Array)
30924
31048
 
30925
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#68
31049
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#77
30926
31050
  RuboCop::Cop::Style::ArrayIntersect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
30927
31051
 
30928
- # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#66
31052
+ # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#75
30929
31053
  RuboCop::Cop::Style::ArrayIntersect::STRAIGHT_METHODS = T.let(T.unsafe(nil), Array)
30930
31054
 
30931
31055
  # Checks for uses of "*" as a substitute for _join_.
@@ -31342,13 +31466,24 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String)
31342
31466
  # `lambda`, `proc`, and `it` are their defaults.
31343
31467
  # Additional methods can be added to the `AllowedMethods`.
31344
31468
  #
31345
- # @example AllowedPatterns: ['map']
31469
+ # @example EnforcedStyle: line_count_based (default)
31470
+ # # bad - single line block
31471
+ # items.each do |item| item / 5 end
31346
31472
  #
31347
- # # good
31473
+ # # good - single line block
31474
+ # items.each { |item| item / 5 }
31475
+ #
31476
+ # # bad - multi-line block
31348
31477
  # things.map { |thing|
31349
31478
  # something = thing.some_method
31350
31479
  # process(something)
31351
31480
  # }
31481
+ #
31482
+ # # good - multi-line block
31483
+ # things.map do |thing|
31484
+ # something = thing.some_method
31485
+ # process(something)
31486
+ # end
31352
31487
  # @example EnforcedStyle: semantic
31353
31488
  # # Prefer `do...end` over `{...}` for procedural blocks.
31354
31489
  #
@@ -31469,25 +31604,14 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String)
31469
31604
  # something = thing.some_method
31470
31605
  # process(something)
31471
31606
  # }
31472
- # @example EnforcedStyle: line_count_based (default)
31473
- # # bad - single line block
31474
- # items.each do |item| item / 5 end
31475
- #
31476
- # # good - single line block
31477
- # items.each { |item| item / 5 }
31607
+ # @example AllowedPatterns: ['map']
31478
31608
  #
31479
- # # bad - multi-line block
31609
+ # # good
31480
31610
  # things.map { |thing|
31481
31611
  # something = thing.some_method
31482
31612
  # process(something)
31483
31613
  # }
31484
31614
  #
31485
- # # good - multi-line block
31486
- # things.map do |thing|
31487
- # something = thing.some_method
31488
- # process(something)
31489
- # end
31490
- #
31491
31615
  # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#168
31492
31616
  class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base
31493
31617
  include ::RuboCop::Cop::ConfigurableEnforcedStyle
@@ -32100,53 +32224,53 @@ RuboCop::Cop::Style::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
32100
32224
  # self.class.eq(other.class) && name.eq(other.name)
32101
32225
  # end
32102
32226
  #
32103
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#47
32227
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#52
32104
32228
  class RuboCop::Cop::Style::ClassEqualityComparison < ::RuboCop::Cop::Base
32105
32229
  include ::RuboCop::Cop::RangeHelp
32106
32230
  include ::RuboCop::Cop::AllowedMethods
32107
32231
  include ::RuboCop::Cop::AllowedPattern
32108
32232
  extend ::RuboCop::Cop::AutoCorrector
32109
32233
 
32110
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#59
32234
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#64
32111
32235
  def class_comparison_candidate?(param0 = T.unsafe(nil)); end
32112
32236
 
32113
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#65
32237
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#70
32114
32238
  def on_send(node); end
32115
32239
 
32116
32240
  private
32117
32241
 
32118
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#87
32242
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#92
32119
32243
  def class_name(class_node, node); end
32120
32244
 
32121
32245
  # @return [Boolean]
32122
32246
  #
32123
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#107
32247
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#112
32124
32248
  def class_name_method?(method_name); end
32125
32249
 
32126
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#123
32250
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#128
32127
32251
  def offense_range(receiver_node, node); end
32128
32252
 
32129
32253
  # @return [Boolean]
32130
32254
  #
32131
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#111
32255
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#116
32132
32256
  def require_cbase?(class_node); end
32133
32257
 
32134
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#119
32258
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#124
32135
32259
  def trim_string_quotes(class_node); end
32136
32260
 
32137
32261
  # @return [Boolean]
32138
32262
  #
32139
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#115
32263
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#120
32140
32264
  def unable_to_determine_type?(class_node); end
32141
32265
  end
32142
32266
 
32143
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#56
32267
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#61
32144
32268
  RuboCop::Cop::Style::ClassEqualityComparison::CLASS_NAME_METHODS = T.let(T.unsafe(nil), Array)
32145
32269
 
32146
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#53
32270
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#58
32147
32271
  RuboCop::Cop::Style::ClassEqualityComparison::MSG = T.let(T.unsafe(nil), String)
32148
32272
 
32149
- # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#55
32273
+ # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#60
32150
32274
  RuboCop::Cop::Style::ClassEqualityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
32151
32275
 
32152
32276
  # Checks for uses of the class/module name instead of
@@ -32434,6 +32558,7 @@ RuboCop::Cop::Style::CollectionCompact::TO_ENUM_METHODS = T.let(T.unsafe(nil), A
32434
32558
  # # bad
32435
32559
  # items.collect
32436
32560
  # items.collect!
32561
+ # items.collect_concat
32437
32562
  # items.inject
32438
32563
  # items.detect
32439
32564
  # items.find_all
@@ -32442,46 +32567,47 @@ RuboCop::Cop::Style::CollectionCompact::TO_ENUM_METHODS = T.let(T.unsafe(nil), A
32442
32567
  # # good
32443
32568
  # items.map
32444
32569
  # items.map!
32570
+ # items.flat_map
32445
32571
  # items.reduce
32446
32572
  # items.find
32447
32573
  # items.select
32448
32574
  # items.include?
32449
32575
  #
32450
- # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#41
32576
+ # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#43
32451
32577
  class RuboCop::Cop::Style::CollectionMethods < ::RuboCop::Cop::Base
32452
32578
  include ::RuboCop::Cop::MethodPreference
32453
32579
  extend ::RuboCop::Cop::AutoCorrector
32454
32580
 
32455
- # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47
32581
+ # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49
32456
32582
  def on_block(node); end
32457
32583
 
32458
- # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47
32584
+ # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49
32459
32585
  def on_numblock(node); end
32460
32586
 
32461
- # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#53
32587
+ # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#55
32462
32588
  def on_send(node); end
32463
32589
 
32464
32590
  private
32465
32591
 
32466
- # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#61
32592
+ # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#63
32467
32593
  def check_method_node(node); end
32468
32594
 
32469
32595
  # @return [Boolean]
32470
32596
  #
32471
- # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#70
32597
+ # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#72
32472
32598
  def implicit_block?(node); end
32473
32599
 
32474
- # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#78
32600
+ # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#80
32475
32601
  def message(node); end
32476
32602
 
32477
32603
  # Some enumerable methods accept a bare symbol (ie. _not_ Symbol#to_proc) instead
32478
32604
  # of a block.
32479
32605
  #
32480
- # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#84
32606
+ # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#86
32481
32607
  def methods_accepting_symbol; end
32482
32608
  end
32483
32609
 
32484
- # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#45
32610
+ # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47
32485
32611
  RuboCop::Cop::Style::CollectionMethods::MSG = T.let(T.unsafe(nil), String)
32486
32612
 
32487
32613
  # Checks for methods invoked via the `::` operator instead
@@ -32614,7 +32740,7 @@ class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base
32614
32740
  # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#90
32615
32741
  def collection_looping_method?(node); end
32616
32742
 
32617
- # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#106
32743
+ # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#107
32618
32744
  def combine_with_left_sibling(corrector, node); end
32619
32745
 
32620
32746
  # @return [Boolean]
@@ -32624,7 +32750,7 @@ class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base
32624
32750
 
32625
32751
  # @return [Boolean]
32626
32752
  #
32627
- # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#102
32753
+ # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#103
32628
32754
  def same_collection_looping_for?(node, sibling); end
32629
32755
  end
32630
32756
 
@@ -34548,30 +34674,33 @@ class RuboCop::Cop::Style::EmptyCaseCondition < ::RuboCop::Cop::Base
34548
34674
  include ::RuboCop::Cop::RangeHelp
34549
34675
  extend ::RuboCop::Cop::AutoCorrector
34550
34676
 
34551
- # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#44
34677
+ # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#46
34552
34678
  def on_case(case_node); end
34553
34679
 
34554
34680
  private
34555
34681
 
34556
- # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#58
34682
+ # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#63
34557
34683
  def autocorrect(corrector, case_node); end
34558
34684
 
34559
- # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#65
34685
+ # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#70
34560
34686
  def correct_case_when(corrector, case_node, when_nodes); end
34561
34687
 
34562
- # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#77
34688
+ # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#82
34563
34689
  def correct_when_conditions(corrector, when_nodes); end
34564
34690
 
34565
- # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#92
34691
+ # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#97
34566
34692
  def keep_first_when_comment(case_range, corrector); end
34567
34693
 
34568
- # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#102
34694
+ # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#107
34569
34695
  def replace_then_with_line_break(corrector, conditions, when_node); end
34570
34696
  end
34571
34697
 
34572
34698
  # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#42
34573
34699
  RuboCop::Cop::Style::EmptyCaseCondition::MSG = T.let(T.unsafe(nil), String)
34574
34700
 
34701
+ # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#43
34702
+ RuboCop::Cop::Style::EmptyCaseCondition::NOT_SUPPORTED_PARENT_TYPES = T.let(T.unsafe(nil), Array)
34703
+
34575
34704
  # Checks for empty else-clauses, possibly including comments and/or an
34576
34705
  # explicit `nil` depending on the EnforcedStyle.
34577
34706
  #
@@ -36146,13 +36275,25 @@ RuboCop::Cop::Style::For::PREFER_EACH = T.let(T.unsafe(nil), String)
36146
36275
  RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String)
36147
36276
 
36148
36277
  # Enforces the use of a single string formatting utility.
36149
- # Valid options include Kernel#format, Kernel#sprintf and String#%.
36278
+ # Valid options include `Kernel#format`, `Kernel#sprintf`, and `String#%`.
36150
36279
  #
36151
- # The detection of String#% cannot be implemented in a reliable
36280
+ # The detection of `String#%` cannot be implemented in a reliable
36152
36281
  # manner for all cases, so only two scenarios are considered -
36153
36282
  # if the first argument is a string literal and if the second
36154
36283
  # argument is an array literal.
36155
36284
  #
36285
+ # Autocorrection will be applied when using argument is a literal or known built-in conversion
36286
+ # methods such as `to_d`, `to_f`, `to_h`, `to_i`, `to_r`, `to_s`, and `to_sym` on variables,
36287
+ # provided that their return value is not an array. For example, when using `to_s`,
36288
+ # `'%s' % [1, 2, 3].to_s` can be autocorrected without any incompatibility:
36289
+ #
36290
+ # [source,ruby]
36291
+ # ----
36292
+ # '%s' % [1, 2, 3] #=> '1'
36293
+ # format('%s', [1, 2, 3]) #=> '[1, 2, 3]'
36294
+ # '%s' % [1, 2, 3].to_s #=> '[1, 2, 3]'
36295
+ # ----
36296
+ #
36156
36297
  # @example EnforcedStyle: format (default)
36157
36298
  # # bad
36158
36299
  # puts sprintf('%10s', 'hoge')
@@ -36175,45 +36316,55 @@ RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String)
36175
36316
  # # good
36176
36317
  # puts '%10s' % 'hoge'
36177
36318
  #
36178
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#38
36319
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#50
36179
36320
  class RuboCop::Cop::Style::FormatString < ::RuboCop::Cop::Base
36180
36321
  include ::RuboCop::Cop::ConfigurableEnforcedStyle
36181
36322
  extend ::RuboCop::Cop::AutoCorrector
36182
36323
 
36183
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#46
36324
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#61
36184
36325
  def formatter(param0 = T.unsafe(nil)); end
36185
36326
 
36186
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#59
36327
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#74
36187
36328
  def on_send(node); end
36188
36329
 
36189
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#55
36330
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#70
36190
36331
  def variable_argument?(param0 = T.unsafe(nil)); end
36191
36332
 
36192
36333
  private
36193
36334
 
36194
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#81
36335
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#102
36195
36336
  def autocorrect(corrector, node); end
36196
36337
 
36197
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#97
36338
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#118
36198
36339
  def autocorrect_from_percent(corrector, node); end
36199
36340
 
36200
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#111
36341
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#132
36201
36342
  def autocorrect_to_percent(corrector, node); end
36202
36343
 
36203
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#124
36344
+ # @return [Boolean]
36345
+ #
36346
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#88
36347
+ def autocorrectable?(node); end
36348
+
36349
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#145
36204
36350
  def format_single_parameter(arg); end
36205
36351
 
36206
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#73
36352
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#94
36207
36353
  def message(detected_style); end
36208
36354
 
36209
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#77
36355
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#98
36210
36356
  def method_name(style_name); end
36211
36357
  end
36212
36358
 
36213
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#42
36359
+ # Known conversion methods whose return value is not an array.
36360
+ #
36361
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#58
36362
+ RuboCop::Cop::Style::FormatString::AUTOCORRECTABLE_METHODS = T.let(T.unsafe(nil), Array)
36363
+
36364
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#54
36214
36365
  RuboCop::Cop::Style::FormatString::MSG = T.let(T.unsafe(nil), String)
36215
36366
 
36216
- # source://rubocop//lib/rubocop/cop/style/format_string.rb#43
36367
+ # source://rubocop//lib/rubocop/cop/style/format_string.rb#55
36217
36368
  RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
36218
36369
 
36219
36370
  # Use a consistent style for named format string tokens.
@@ -36231,10 +36382,14 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array
36231
36382
  # if the number of them is less than or equals to
36232
36383
  # `MaxUnannotatedPlaceholdersAllowed`.
36233
36384
  #
36234
- # @example AllowedPatterns: ['redirect']
36385
+ # @example EnforcedStyle: annotated (default)
36386
+ #
36387
+ # # bad
36388
+ # format('%{greeting}', greeting: 'Hello')
36389
+ # format('%s', 'Hello')
36235
36390
  #
36236
36391
  # # good
36237
- # redirect('foo/%{bar_id}')
36392
+ # format('%<greeting>s', greeting: 'Hello')
36238
36393
  # @example EnforcedStyle: template
36239
36394
  #
36240
36395
  # # bad
@@ -36278,14 +36433,10 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array
36278
36433
  #
36279
36434
  # # bad
36280
36435
  # redirect('foo/%{bar_id}')
36281
- # @example EnforcedStyle: annotated (default)
36282
- #
36283
- # # bad
36284
- # format('%{greeting}', greeting: 'Hello')
36285
- # format('%s', 'Hello')
36436
+ # @example AllowedPatterns: ['redirect']
36286
36437
  #
36287
36438
  # # good
36288
- # format('%<greeting>s', greeting: 'Hello')
36439
+ # redirect('foo/%{bar_id}')
36289
36440
  #
36290
36441
  # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#85
36291
36442
  class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base
@@ -36646,6 +36797,25 @@ RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String)
36646
36797
  # # good
36647
36798
  # foo || raise('exception') if something
36648
36799
  # ok
36800
+ #
36801
+ # # bad
36802
+ # define_method(:test) do
36803
+ # if something
36804
+ # work
36805
+ # end
36806
+ # end
36807
+ #
36808
+ # # good
36809
+ # define_method(:test) do
36810
+ # return unless something
36811
+ #
36812
+ # work
36813
+ # end
36814
+ #
36815
+ # # also good
36816
+ # define_method(:test) do
36817
+ # work if something
36818
+ # end
36649
36819
  # @example AllowConsecutiveConditionals: false (default)
36650
36820
  # # bad
36651
36821
  # def test
@@ -36682,7 +36852,7 @@ RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String)
36682
36852
  # end
36683
36853
  # end
36684
36854
  #
36685
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#95
36855
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#114
36686
36856
  class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base
36687
36857
  include ::RuboCop::Cop::Alignment
36688
36858
  include ::RuboCop::Cop::LineLengthHelp
@@ -36691,83 +36861,89 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base
36691
36861
  include ::RuboCop::Cop::StatementModifier
36692
36862
  extend ::RuboCop::Cop::AutoCorrector
36693
36863
 
36694
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#104
36864
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#132
36865
+ def on_block(node); end
36866
+
36867
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#123
36695
36868
  def on_def(node); end
36696
36869
 
36697
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#104
36870
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#123
36698
36871
  def on_defs(node); end
36699
36872
 
36700
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#113
36873
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#139
36701
36874
  def on_if(node); end
36702
36875
 
36876
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#132
36877
+ def on_numblock(node); end
36878
+
36703
36879
  private
36704
36880
 
36705
36881
  # @return [Boolean]
36706
36882
  #
36707
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#249
36883
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#275
36708
36884
  def accepted_form?(node, ending: T.unsafe(nil)); end
36709
36885
 
36710
36886
  # @return [Boolean]
36711
36887
  #
36712
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#257
36888
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#283
36713
36889
  def accepted_if?(node, ending); end
36714
36890
 
36715
36891
  # @return [Boolean]
36716
36892
  #
36717
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#271
36893
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#297
36718
36894
  def allowed_consecutive_conditionals?; end
36719
36895
 
36720
36896
  # @return [Boolean]
36721
36897
  #
36722
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#239
36898
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#265
36723
36899
  def and_or_guard_clause?(guard_clause); end
36724
36900
 
36725
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#184
36901
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#210
36726
36902
  def autocorrect(corrector, node, condition, replacement, guard); end
36727
36903
 
36728
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#210
36904
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#236
36729
36905
  def autocorrect_heredoc_argument(corrector, node, heredoc_branch, leave_branch, guard); end
36730
36906
 
36731
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#133
36907
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#159
36732
36908
  def check_ending_body(body); end
36733
36909
 
36734
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#144
36910
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#170
36735
36911
  def check_ending_if(node); end
36736
36912
 
36737
36913
  # @return [Boolean]
36738
36914
  #
36739
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#154
36915
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#180
36740
36916
  def consecutive_conditionals?(parent, node); end
36741
36917
 
36742
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#231
36918
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#257
36743
36919
  def guard_clause_source(guard_clause); end
36744
36920
 
36745
36921
  # @return [Boolean]
36746
36922
  #
36747
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#206
36923
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#232
36748
36924
  def heredoc?(argument); end
36749
36925
 
36750
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#222
36926
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#248
36751
36927
  def range_of_branch_to_remove(node, guard); end
36752
36928
 
36753
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#162
36929
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#188
36754
36930
  def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end
36755
36931
 
36756
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#267
36932
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#293
36757
36933
  def remove_whole_lines(corrector, range); end
36758
36934
 
36759
36935
  # @return [Boolean]
36760
36936
  #
36761
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#244
36937
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#270
36762
36938
  def too_long_for_single_line?(node, example); end
36763
36939
 
36764
36940
  # @return [Boolean]
36765
36941
  #
36766
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#253
36942
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#279
36767
36943
  def trivial?(node); end
36768
36944
  end
36769
36945
 
36770
- # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#101
36946
+ # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#120
36771
36947
  RuboCop::Cop::Style::GuardClause::MSG = T.let(T.unsafe(nil), String)
36772
36948
 
36773
36949
  # Checks for presence or absence of braces around hash literal as a last
@@ -37160,22 +37336,15 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String)
37160
37336
  # * either - accepts both shorthand and explicit use of hash literal value
37161
37337
  # * consistent - forces use of the 3.1 syntax only if all values can be omitted in the hash
37162
37338
  #
37163
- # @example EnforcedShorthandSyntax: consistent
37164
- #
37165
- # # bad - `foo` and `bar` values can be omitted
37166
- # {foo: foo, bar: bar}
37167
- #
37168
- # # bad - `bar` value can be omitted
37169
- # {foo:, bar: bar}
37170
- #
37171
- # # bad - mixed syntaxes
37172
- # {foo:, bar: baz}
37339
+ # @example EnforcedStyle: ruby19 (default)
37340
+ # # bad
37341
+ # {:a => 2}
37342
+ # {b: 1, :c => 2}
37173
37343
  #
37174
37344
  # # good
37175
- # {foo:, bar:}
37176
- #
37177
- # # good - can't omit `baz`
37178
- # {foo: foo, bar: baz}
37345
+ # {a: 2, b: 1}
37346
+ # {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol
37347
+ # {d: 1, 'e' => 2} # technically not forbidden
37179
37348
  # @example EnforcedStyle: hash_rockets
37180
37349
  # # bad
37181
37350
  # {a: 1, b: 2}
@@ -37223,15 +37392,22 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String)
37223
37392
  #
37224
37393
  # # good
37225
37394
  # {foo:, bar:}
37226
- # @example EnforcedStyle: ruby19 (default)
37227
- # # bad
37228
- # {:a => 2}
37229
- # {b: 1, :c => 2}
37395
+ # @example EnforcedShorthandSyntax: consistent
37396
+ #
37397
+ # # bad - `foo` and `bar` values can be omitted
37398
+ # {foo: foo, bar: bar}
37399
+ #
37400
+ # # bad - `bar` value can be omitted
37401
+ # {foo:, bar: bar}
37402
+ #
37403
+ # # bad - mixed syntaxes
37404
+ # {foo:, bar: baz}
37230
37405
  #
37231
37406
  # # good
37232
- # {a: 2, b: 1}
37233
- # {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol
37234
- # {d: 1, 'e' => 2} # technically not forbidden
37407
+ # {foo:, bar:}
37408
+ #
37409
+ # # good - can't omit `baz`
37410
+ # {foo: foo, bar: baz}
37235
37411
  #
37236
37412
  # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#113
37237
37413
  class RuboCop::Cop::Style::HashSyntax < ::RuboCop::Cop::Base
@@ -37504,40 +37680,43 @@ class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base
37504
37680
 
37505
37681
  private
37506
37682
 
37683
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#173
37684
+ def assignable_condition_value(node); end
37685
+
37507
37686
  # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#140
37508
37687
  def check_branches(node, branches); end
37509
37688
 
37510
- # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#168
37689
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#182
37511
37690
  def check_expressions(node, expressions, insert_position); end
37512
37691
 
37513
37692
  # @return [Boolean]
37514
37693
  #
37515
- # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#156
37694
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#162
37516
37695
  def duplicated_expressions?(node, expressions); end
37517
37696
 
37518
37697
  # `elsif` branches show up in the if node as nested `else` branches. We
37519
37698
  # need to recursively iterate over all `else` branches.
37520
37699
  #
37521
- # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#208
37700
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#222
37522
37701
  def expand_elses(branch); end
37523
37702
 
37524
- # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#223
37703
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#237
37525
37704
  def head(node); end
37526
37705
 
37527
37706
  # @return [Boolean]
37528
37707
  #
37529
- # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#192
37708
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#206
37530
37709
  def last_child_of_parent?(node); end
37531
37710
 
37532
- # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#202
37711
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#216
37533
37712
  def message(node); end
37534
37713
 
37535
37714
  # @return [Boolean]
37536
37715
  #
37537
- # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#198
37716
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#212
37538
37717
  def single_child_branch?(branch_node); end
37539
37718
 
37540
- # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#219
37719
+ # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#233
37541
37720
  def tail(node); end
37542
37721
  end
37543
37722
 
@@ -38737,12 +38916,22 @@ RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.un
38737
38916
  #
38738
38917
  # NOTE: If one of these configuration is set to nil, any capitalization is allowed.
38739
38918
  #
38740
- # @example ValueCapitalization: uppercase
38919
+ # @example EnforcedStyle: snake_case (default)
38920
+ # # The `snake_case` style will enforce that the frozen string literal
38921
+ # # comment is written in snake case. (Words separated by underscores)
38741
38922
  # # bad
38742
38923
  # # frozen-string-literal: true
38743
38924
  #
38925
+ # module Bar
38926
+ # # ...
38927
+ # end
38928
+ #
38744
38929
  # # good
38745
- # # frozen-string-literal: TRUE
38930
+ # # frozen_string_literal: false
38931
+ #
38932
+ # module Bar
38933
+ # # ...
38934
+ # end
38746
38935
  # @example EnforcedStyle: kebab_case
38747
38936
  # # The `kebab_case` style will enforce that the frozen string literal
38748
38937
  # # comment is written in kebab case. (Words separated by hyphens)
@@ -38795,22 +38984,12 @@ RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.un
38795
38984
  #
38796
38985
  # # good
38797
38986
  # # frozen-string-literal: TRUE
38798
- # @example EnforcedStyle: snake_case (default)
38799
- # # The `snake_case` style will enforce that the frozen string literal
38800
- # # comment is written in snake case. (Words separated by underscores)
38987
+ # @example ValueCapitalization: uppercase
38801
38988
  # # bad
38802
38989
  # # frozen-string-literal: true
38803
38990
  #
38804
- # module Bar
38805
- # # ...
38806
- # end
38807
- #
38808
38991
  # # good
38809
- # # frozen_string_literal: false
38810
- #
38811
- # module Bar
38812
- # # ...
38813
- # end
38992
+ # # frozen-string-literal: TRUE
38814
38993
  #
38815
38994
  # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#97
38816
38995
  class RuboCop::Cop::Style::MagicCommentFormat < ::RuboCop::Cop::Base
@@ -38910,10 +39089,10 @@ class RuboCop::Cop::Style::MagicCommentFormat::CommentRange
38910
39089
  # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#125
38911
39090
  def directives; end
38912
39091
 
38913
- # source://forwardable/1.3.3/forwardable.rb#231
39092
+ # source://forwardable/1.3.2/forwardable.rb#229
38914
39093
  def loc(*args, **_arg1, &block); end
38915
39094
 
38916
- # source://forwardable/1.3.3/forwardable.rb#231
39095
+ # source://forwardable/1.3.2/forwardable.rb#229
38917
39096
  def text(*args, **_arg1, &block); end
38918
39097
 
38919
39098
  # A magic comment can contain one value (normal style) or
@@ -39156,13 +39335,27 @@ RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
39156
39335
  # - Parentheses are required in anonymous arguments, keyword arguments
39157
39336
  # and block passing in Ruby 3.2.
39158
39337
  #
39159
- # @example AllowParenthesesInStringInterpolation: true
39338
+ # @example EnforcedStyle: require_parentheses (default)
39339
+ #
39340
+ # # bad
39341
+ # array.delete e
39160
39342
  #
39161
39343
  # # good
39162
- # "#{t('this.is.good')}"
39344
+ # array.delete(e)
39163
39345
  #
39164
39346
  # # good
39165
- # "#{t 'this.is.also.good'}"
39347
+ # # Operators don't need parens
39348
+ # foo == bar
39349
+ #
39350
+ # # good
39351
+ # # Setter methods don't need parens
39352
+ # foo.bar = baz
39353
+ #
39354
+ # # okay with `puts` listed in `AllowedMethods`
39355
+ # puts 'test'
39356
+ #
39357
+ # # okay with `^assert` listed in `AllowedPatterns`
39358
+ # assert_equal 'test', x
39166
39359
  # @example EnforcedStyle: omit_parentheses
39167
39360
  #
39168
39361
  # # bad
@@ -39261,27 +39454,13 @@ RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
39261
39454
  #
39262
39455
  # # good
39263
39456
  # "#{t 'this.is.better'}"
39264
- # @example EnforcedStyle: require_parentheses (default)
39265
- #
39266
- # # bad
39267
- # array.delete e
39268
- #
39269
- # # good
39270
- # array.delete(e)
39457
+ # @example AllowParenthesesInStringInterpolation: true
39271
39458
  #
39272
39459
  # # good
39273
- # # Operators don't need parens
39274
- # foo == bar
39460
+ # "#{t('this.is.good')}"
39275
39461
  #
39276
39462
  # # good
39277
- # # Setter methods don't need parens
39278
- # foo.bar = baz
39279
- #
39280
- # # okay with `puts` listed in `AllowedMethods`
39281
- # puts 'test'
39282
- #
39283
- # # okay with `^assert` listed in `AllowedPatterns`
39284
- # assert_equal 'test', x
39463
+ # "#{t 'this.is.also.good'}"
39285
39464
  #
39286
39465
  # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#202
39287
39466
  class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base
@@ -39336,12 +39515,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
39336
39515
 
39337
39516
  # @return [Boolean]
39338
39517
  #
39339
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#163
39518
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#165
39340
39519
  def allowed_chained_call_with_parentheses?(node); end
39341
39520
 
39342
39521
  # @return [Boolean]
39343
39522
  #
39344
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#159
39523
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#161
39345
39524
  def allowed_multiline_call_with_parentheses?(node); end
39346
39525
 
39347
39526
  # @return [Boolean]
@@ -39351,17 +39530,17 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
39351
39530
 
39352
39531
  # @return [Boolean]
39353
39532
  #
39354
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#172
39533
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#174
39355
39534
  def ambiguous_literal?(node); end
39356
39535
 
39357
39536
  # @return [Boolean]
39358
39537
  #
39359
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#201
39538
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#203
39360
39539
  def assigned_before?(node, target); end
39361
39540
 
39362
39541
  # @return [Boolean]
39363
39542
  #
39364
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#209
39543
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#211
39365
39544
  def assignment_in_condition?(node); end
39366
39545
 
39367
39546
  # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#31
@@ -39409,17 +39588,17 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
39409
39588
 
39410
39589
  # @return [Boolean]
39411
39590
  #
39412
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#219
39591
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#221
39413
39592
  def forwards_anonymous_rest_arguments?(node); end
39414
39593
 
39415
39594
  # @return [Boolean]
39416
39595
  #
39417
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#188
39596
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#190
39418
39597
  def hash_literal?(node); end
39419
39598
 
39420
39599
  # @return [Boolean]
39421
39600
  #
39422
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#152
39601
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#154
39423
39602
  def hash_literal_in_arguments?(node); end
39424
39603
 
39425
39604
  # @return [Boolean]
@@ -39429,7 +39608,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
39429
39608
 
39430
39609
  # @return [Boolean]
39431
39610
  #
39432
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#205
39611
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#207
39433
39612
  def inside_string_interpolation?(node); end
39434
39613
 
39435
39614
  # Require hash value omission be enclosed in parentheses to prevent the following issue:
@@ -39447,7 +39626,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
39447
39626
 
39448
39627
  # @return [Boolean]
39449
39628
  #
39450
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#184
39629
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#186
39451
39630
  def logical_operator?(node); end
39452
39631
 
39453
39632
  # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#40
@@ -39463,7 +39642,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
39463
39642
 
39464
39643
  # @return [Boolean]
39465
39644
  #
39466
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#192
39645
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#194
39467
39646
  def regexp_slash_literal?(node); end
39468
39647
 
39469
39648
  # @return [Boolean]
@@ -39473,7 +39652,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
39473
39652
 
39474
39653
  # @return [Boolean]
39475
39654
  #
39476
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#176
39655
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#178
39477
39656
  def splat?(node); end
39478
39657
 
39479
39658
  # @return [Boolean]
@@ -39488,12 +39667,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
39488
39667
 
39489
39668
  # @return [Boolean]
39490
39669
  #
39491
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#180
39670
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#182
39492
39671
  def ternary_if?(node); end
39493
39672
 
39494
39673
  # @return [Boolean]
39495
39674
  #
39496
- # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#196
39675
+ # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#198
39497
39676
  def unary_literal?(node); end
39498
39677
  end
39499
39678
 
@@ -40913,7 +41092,7 @@ RuboCop::Cop::Style::MultipleComparison::MSG = T.let(T.unsafe(nil), String)
40913
41092
  # # shareable_constant_value: literal
40914
41093
  # CONST = [1, 2, 3]
40915
41094
  #
40916
- # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#83
41095
+ # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#87
40917
41096
  class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base
40918
41097
  include ::RuboCop::Cop::Style::MutableConstant::ShareableConstantValue
40919
41098
  include ::RuboCop::Cop::FrozenStringLiteral
@@ -41474,16 +41653,13 @@ class RuboCop::Cop::Style::NestedTernaryOperator < ::RuboCop::Cop::Base
41474
41653
 
41475
41654
  private
41476
41655
 
41477
- # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#48
41656
+ # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#40
41478
41657
  def autocorrect(corrector, if_node); end
41479
41658
 
41480
- # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#41
41481
- def if_node(node); end
41482
-
41483
- # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#55
41659
+ # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#47
41484
41660
  def remove_parentheses(source); end
41485
41661
 
41486
- # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#61
41662
+ # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#53
41487
41663
  def replace_loc_and_whitespace(corrector, range, replacement); end
41488
41664
  end
41489
41665
 
@@ -42488,24 +42664,24 @@ RuboCop::Cop::Style::OpenStructUse::MSG = T.let(T.unsafe(nil), String)
42488
42664
  class RuboCop::Cop::Style::OperatorMethodCall < ::RuboCop::Cop::Base
42489
42665
  extend ::RuboCop::Cop::AutoCorrector
42490
42666
 
42491
- # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#26
42667
+ # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#27
42492
42668
  def on_send(node); end
42493
42669
 
42494
42670
  private
42495
42671
 
42496
42672
  # @return [Boolean]
42497
42673
  #
42498
- # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#48
42674
+ # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#53
42499
42675
  def anonymous_forwarding?(argument); end
42500
42676
 
42501
42677
  # Checks for an acceptable case of `foo.+(bar).baz`.
42502
42678
  #
42503
42679
  # @return [Boolean]
42504
42680
  #
42505
- # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#42
42681
+ # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#47
42506
42682
  def method_call_with_parenthesized_arg?(argument); end
42507
42683
 
42508
- # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#55
42684
+ # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#60
42509
42685
  def wrap_in_parentheses_if_chained(corrector, node); end
42510
42686
  end
42511
42687
 
@@ -43815,50 +43991,53 @@ class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base
43815
43991
 
43816
43992
  # @return [Boolean]
43817
43993
  #
43818
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#169
43994
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#177
43819
43995
  def begin_block_has_multiline_statements?(node); end
43820
43996
 
43821
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#161
43997
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#169
43822
43998
  def condition_range(node); end
43823
43999
 
43824
44000
  # @return [Boolean]
43825
44001
  #
43826
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173
44002
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#181
43827
44003
  def contain_rescue_or_ensure?(node); end
43828
44004
 
43829
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#154
44005
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#162
43830
44006
  def correct_modifier_form_after_multiline_begin_block(corrector, node); end
43831
44007
 
43832
44008
  # @return [Boolean]
43833
44009
  #
43834
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#165
44010
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173
43835
44011
  def empty_begin?(node); end
43836
44012
 
43837
44013
  # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#110
43838
44014
  def register_offense(node); end
43839
44015
 
44016
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#139
44017
+ def remove_begin(corrector, offense_range, node); end
44018
+
43840
44019
  # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#127
43841
44020
  def replace_begin_with_statement(corrector, offense_range, node); end
43842
44021
 
43843
44022
  # Restore comments that occur between "begin" and "first_child".
43844
44023
  # These comments will be moved to above the assignment line.
43845
44024
  #
43846
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#141
44025
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#149
43847
44026
  def restore_removed_comments(corrector, offense_range, node, first_child); end
43848
44027
 
43849
44028
  # @return [Boolean]
43850
44029
  #
43851
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#148
44030
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#156
43852
44031
  def use_modifier_form_after_multiline_begin_block?(node); end
43853
44032
 
43854
44033
  # @return [Boolean]
43855
44034
  #
43856
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#186
44035
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#194
43857
44036
  def valid_begin_assignment?(node); end
43858
44037
 
43859
44038
  # @return [Boolean]
43860
44039
  #
43861
- # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#179
44040
+ # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#187
43862
44041
  def valid_context_using_only_begin?(node); end
43863
44042
  end
43864
44043
 
@@ -44091,13 +44270,8 @@ class RuboCop::Cop::Style::RedundantConditional < ::RuboCop::Cop::Base
44091
44270
 
44092
44271
  private
44093
44272
 
44094
- # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#86
44095
- def indented_else_node(expression, node); end
44096
-
44097
- # @return [Boolean]
44098
- #
44099
44273
  # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#78
44100
- def invert_expression?(node); end
44274
+ def indented_else_node(expression, node); end
44101
44275
 
44102
44276
  # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#48
44103
44277
  def message(node); end
@@ -44224,23 +44398,63 @@ RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::MSG = T.let(T.unsafe(nil),
44224
44398
  # # good
44225
44399
  # do_something(foo: bar, baz: qux)
44226
44400
  #
44227
- # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#16
44401
+ # # bad
44402
+ # do_something(**{foo: bar, baz: qux}.merge(options))
44403
+ #
44404
+ # # good
44405
+ # do_something(foo: bar, baz: qux, **options)
44406
+ #
44407
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#22
44228
44408
  class RuboCop::Cop::Style::RedundantDoubleSplatHashBraces < ::RuboCop::Cop::Base
44229
44409
  extend ::RuboCop::Cop::AutoCorrector
44230
44410
 
44231
- # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#21
44411
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#29
44232
44412
  def on_hash(node); end
44233
44413
 
44234
44414
  private
44235
44415
 
44236
- # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#39
44416
+ # @return [Boolean]
44417
+ #
44418
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#44
44419
+ def allowed_double_splat_receiver?(kwsplat); end
44420
+
44421
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#52
44422
+ def autocorrect(corrector, node, kwsplat); end
44423
+
44424
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#86
44425
+ def autocorrect_merge_methods(corrector, merge_methods, kwsplat); end
44426
+
44427
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#82
44237
44428
  def closing_brace(node); end
44238
44429
 
44239
- # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#35
44430
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#108
44431
+ def convert_to_new_arguments(node); end
44432
+
44433
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#104
44434
+ def extract_send_methods(kwsplat); end
44435
+
44436
+ # @return [Boolean]
44437
+ #
44438
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#120
44439
+ def merge_method?(node); end
44440
+
44441
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#78
44240
44442
  def opening_brace(node); end
44443
+
44444
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#97
44445
+ def range_of_merge_methods(merge_methods); end
44446
+
44447
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#63
44448
+ def root_receiver(node); end
44449
+
44450
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#72
44451
+ def select_merge_method_nodes(kwsplat); end
44241
44452
  end
44242
44453
 
44243
- # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#19
44454
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#26
44455
+ RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MERGE_METHODS = T.let(T.unsafe(nil), Array)
44456
+
44457
+ # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#25
44244
44458
  RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MSG = T.let(T.unsafe(nil), String)
44245
44459
 
44246
44460
  # Checks for redundant `each`.
@@ -44303,48 +44517,64 @@ RuboCop::Cop::Style::RedundantEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra
44303
44517
 
44304
44518
  # Checks for RuntimeError as the argument of raise/fail.
44305
44519
  #
44306
- # It checks for code like this:
44307
- #
44308
44520
  # @example
44309
- # # Bad
44521
+ # # bad
44310
44522
  # raise RuntimeError, 'message'
44311
- #
44312
- # # Bad
44313
44523
  # raise RuntimeError.new('message')
44314
44524
  #
44315
- # # Good
44525
+ # # good
44316
44526
  # raise 'message'
44317
44527
  #
44318
- # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#19
44528
+ # # bad - message is not a string
44529
+ # raise RuntimeError, Object.new
44530
+ # raise RuntimeError.new(Object.new)
44531
+ #
44532
+ # # good
44533
+ # raise Object.new.to_s
44534
+ #
44535
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#23
44319
44536
  class RuboCop::Cop::Style::RedundantException < ::RuboCop::Cop::Base
44320
44537
  extend ::RuboCop::Cop::AutoCorrector
44321
44538
 
44322
- # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#59
44539
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#79
44323
44540
  def compact?(param0 = T.unsafe(nil)); end
44324
44541
 
44325
- # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#54
44542
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#74
44326
44543
  def exploded?(param0 = T.unsafe(nil)); end
44327
44544
 
44328
- # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#45
44545
+ # Switch `raise RuntimeError, 'message'` to `raise 'message'`, and
44546
+ # `raise RuntimeError.new('message')` to `raise 'message'`.
44547
+ #
44548
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#33
44549
+ def on_send(node); end
44550
+
44551
+ private
44552
+
44553
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#57
44329
44554
  def fix_compact(node); end
44330
44555
 
44331
- # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#33
44556
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#39
44332
44557
  def fix_exploded(node); end
44333
44558
 
44334
- # Switch `raise RuntimeError, 'message'` to `raise 'message'`, and
44335
- # `raise RuntimeError.new('message')` to `raise 'message'`.
44559
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#65
44560
+ def replaced_compact(message); end
44561
+
44562
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#47
44563
+ def replaced_exploded(node, command, message); end
44564
+
44565
+ # @return [Boolean]
44336
44566
  #
44337
- # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#29
44338
- def on_send(node); end
44567
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#53
44568
+ def string_message?(message); end
44339
44569
  end
44340
44570
 
44341
- # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#22
44571
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#26
44342
44572
  RuboCop::Cop::Style::RedundantException::MSG_1 = T.let(T.unsafe(nil), String)
44343
44573
 
44344
- # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#23
44574
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#27
44345
44575
  RuboCop::Cop::Style::RedundantException::MSG_2 = T.let(T.unsafe(nil), String)
44346
44576
 
44347
- # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#25
44577
+ # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#29
44348
44578
  RuboCop::Cop::Style::RedundantException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
44349
44579
 
44350
44580
  # Identifies places where `fetch(key) { value }` can be replaced by `fetch(key, value)`.
@@ -44497,6 +44727,9 @@ RuboCop::Cop::Style::RedundantFileExtensionInRequire::RESTRICT_ON_SEND = T.let(T
44497
44727
  # @example AllCops:ActiveSupportExtensionsEnabled: false (default)
44498
44728
  # # good
44499
44729
  # arr.select { |x| x > 1 }.many?
44730
+ #
44731
+ # # good
44732
+ # arr.select { |x| x > 1 }.present?
44500
44733
  # @example AllCops:ActiveSupportExtensionsEnabled: true
44501
44734
  # # bad
44502
44735
  # arr.select { |x| x > 1 }.many?
@@ -44504,38 +44737,44 @@ RuboCop::Cop::Style::RedundantFileExtensionInRequire::RESTRICT_ON_SEND = T.let(T
44504
44737
  # # good
44505
44738
  # arr.many? { |x| x > 1 }
44506
44739
  #
44507
- # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#38
44740
+ # # bad
44741
+ # arr.select { |x| x > 1 }.present?
44742
+ #
44743
+ # # good
44744
+ # arr.any? { |x| x > 1 }
44745
+ #
44746
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#53
44508
44747
  class RuboCop::Cop::Style::RedundantFilterChain < ::RuboCop::Cop::Base
44509
44748
  extend ::RuboCop::Cop::AutoCorrector
44510
44749
 
44511
- # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#65
44750
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#81
44512
44751
  def on_send(node); end
44513
44752
 
44514
- # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#47
44753
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#62
44515
44754
  def select_predicate?(param0 = T.unsafe(nil)); end
44516
44755
 
44517
44756
  private
44518
44757
 
44519
- # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#91
44758
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#107
44520
44759
  def offense_range(select_node, predicate_node); end
44521
44760
 
44522
- # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#95
44761
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#111
44523
44762
  def predicate_range(predicate_node); end
44524
44763
 
44525
- # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#77
44764
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#93
44526
44765
  def register_offense(select_node, predicate_node); end
44527
44766
  end
44528
44767
 
44529
- # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#41
44768
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#56
44530
44769
  RuboCop::Cop::Style::RedundantFilterChain::MSG = T.let(T.unsafe(nil), String)
44531
44770
 
44532
- # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#43
44771
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#58
44533
44772
  RuboCop::Cop::Style::RedundantFilterChain::RAILS_METHODS = T.let(T.unsafe(nil), Array)
44534
44773
 
44535
- # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#56
44774
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#71
44536
44775
  RuboCop::Cop::Style::RedundantFilterChain::REPLACEMENT_METHODS = T.let(T.unsafe(nil), Hash)
44537
44776
 
44538
- # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#44
44777
+ # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#59
44539
44778
  RuboCop::Cop::Style::RedundantFilterChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
44540
44779
 
44541
44780
  # Check for uses of `Object#freeze` on immutable objects.
@@ -45002,16 +45241,16 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base
45002
45241
  # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#36
45003
45242
  def arg_in_call_with_block?(param0 = T.unsafe(nil)); end
45004
45243
 
45005
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#220
45244
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#238
45006
45245
  def first_send_argument?(param0 = T.unsafe(nil)); end
45007
45246
 
45008
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#225
45247
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#243
45009
45248
  def first_super_argument?(param0 = T.unsafe(nil)); end
45010
45249
 
45011
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#230
45250
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#248
45012
45251
  def first_yield_argument?(param0 = T.unsafe(nil)); end
45013
45252
 
45014
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#138
45253
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#156
45015
45254
  def interpolation?(param0 = T.unsafe(nil)); end
45016
45255
 
45017
45256
  # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#27
@@ -45058,36 +45297,39 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base
45058
45297
 
45059
45298
  # @return [Boolean]
45060
45299
  #
45061
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#234
45300
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#252
45062
45301
  def call_chain_starts_with_int?(begin_node, send_node); end
45063
45302
 
45064
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#125
45303
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#127
45065
45304
  def check(begin_node); end
45066
45305
 
45067
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#140
45306
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#158
45068
45307
  def check_send(begin_node, node); end
45069
45308
 
45070
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#149
45309
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#167
45071
45310
  def check_unary(begin_node, node); end
45072
45311
 
45073
45312
  # @return [Boolean]
45074
45313
  #
45075
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#173
45314
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#191
45076
45315
  def disallowed_literal?(begin_node, node); end
45077
45316
 
45078
45317
  # @return [Boolean]
45079
45318
  #
45080
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#105
45319
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#107
45081
45320
  def empty_parentheses?(node); end
45082
45321
 
45322
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#138
45323
+ def find_offense_message(begin_node, node); end
45324
+
45083
45325
  # @return [Boolean]
45084
45326
  #
45085
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#110
45327
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#112
45086
45328
  def first_arg_begins_with_hash_literal?(node); end
45087
45329
 
45088
45330
  # @return [Boolean]
45089
45331
  #
45090
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#215
45332
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#233
45091
45333
  def first_argument?(node); end
45092
45334
 
45093
45335
  # @return [Boolean]
@@ -45097,12 +45339,12 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base
45097
45339
 
45098
45340
  # @return [Boolean]
45099
45341
  #
45100
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#169
45342
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#187
45101
45343
  def keyword_ancestor?(node); end
45102
45344
 
45103
45345
  # @return [Boolean]
45104
45346
  #
45105
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#188
45347
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#206
45106
45348
  def keyword_with_redundant_parentheses?(node); end
45107
45349
 
45108
45350
  # @return [Boolean]
@@ -45112,20 +45354,20 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base
45112
45354
 
45113
45355
  # @return [Boolean]
45114
45356
  #
45115
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#201
45357
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#219
45116
45358
  def method_call_with_redundant_parentheses?(node); end
45117
45359
 
45118
45360
  # @return [Boolean]
45119
45361
  #
45120
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#117
45362
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#119
45121
45363
  def method_chain_begins_with_hash_literal?(node); end
45122
45364
 
45123
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#159
45365
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#177
45124
45366
  def offense(node, msg); end
45125
45367
 
45126
45368
  # @return [Boolean]
45127
45369
  #
45128
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#211
45370
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#229
45129
45371
  def only_begin_arg?(args); end
45130
45372
 
45131
45373
  # @return [Boolean]
@@ -45135,12 +45377,12 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base
45135
45377
 
45136
45378
  # @return [Boolean]
45137
45379
  #
45138
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#177
45380
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#195
45139
45381
  def raised_to_power_negative_numeric?(begin_node, node); end
45140
45382
 
45141
45383
  # @return [Boolean]
45142
45384
  #
45143
- # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#165
45385
+ # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#183
45144
45386
  def suspect_unary?(node); end
45145
45387
 
45146
45388
  # @return [Boolean]
@@ -46607,9 +46849,13 @@ RuboCop::Cop::Style::RescueStandardError::MSG_EXPLICIT = T.let(T.unsafe(nil), St
46607
46849
  # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#79
46608
46850
  RuboCop::Cop::Style::RescueStandardError::MSG_IMPLICIT = T.let(T.unsafe(nil), String)
46609
46851
 
46610
- # Enforces consistency between 'return nil' and 'return'.
46852
+ # Enforces consistency between `return nil` and `return`.
46611
46853
  #
46612
- # Supported styles are: return, return_nil.
46854
+ # This cop is disabled by default. Because there seems to be a perceived semantic difference
46855
+ # between `return` and `return nil`. The former can be seen as just halting evaluation,
46856
+ # while the latter might be used when the return value is of specific concern.
46857
+ #
46858
+ # Supported styles are `return` and `return_nil`.
46613
46859
  #
46614
46860
  # @example EnforcedStyle: return (default)
46615
46861
  # # bad
@@ -46632,46 +46878,46 @@ RuboCop::Cop::Style::RescueStandardError::MSG_IMPLICIT = T.let(T.unsafe(nil), St
46632
46878
  # return nil if arg
46633
46879
  # end
46634
46880
  #
46635
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#31
46881
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#35
46636
46882
  class RuboCop::Cop::Style::ReturnNil < ::RuboCop::Cop::Base
46637
46883
  include ::RuboCop::Cop::ConfigurableEnforcedStyle
46638
46884
  extend ::RuboCop::Cop::AutoCorrector
46639
46885
 
46640
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#86
46886
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#90
46641
46887
  def chained_send?(param0 = T.unsafe(nil)); end
46642
46888
 
46643
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#89
46889
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#93
46644
46890
  def define_method?(param0 = T.unsafe(nil)); end
46645
46891
 
46646
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#44
46892
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#48
46647
46893
  def on_return(node); end
46648
46894
 
46649
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#42
46895
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#46
46650
46896
  def return_nil_node?(param0 = T.unsafe(nil)); end
46651
46897
 
46652
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#39
46898
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#43
46653
46899
  def return_node?(param0 = T.unsafe(nil)); end
46654
46900
 
46655
46901
  private
46656
46902
 
46657
46903
  # @return [Boolean]
46658
46904
  #
46659
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#76
46905
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#80
46660
46906
  def correct_style?(node); end
46661
46907
 
46662
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#72
46908
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#76
46663
46909
  def message(_node); end
46664
46910
 
46665
46911
  # @return [Boolean]
46666
46912
  #
46667
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#81
46913
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#85
46668
46914
  def scoped_node?(node); end
46669
46915
  end
46670
46916
 
46671
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#35
46917
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#39
46672
46918
  RuboCop::Cop::Style::ReturnNil::RETURN_MSG = T.let(T.unsafe(nil), String)
46673
46919
 
46674
- # source://rubocop//lib/rubocop/cop/style/return_nil.rb#36
46920
+ # source://rubocop//lib/rubocop/cop/style/return_nil.rb#40
46675
46921
  RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String)
46676
46922
 
46677
46923
  # Checks if `return` or `return nil` is used in predicate method definitions.
@@ -47538,6 +47784,50 @@ end
47538
47784
  # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#34
47539
47785
  RuboCop::Cop::Style::SingleLineBlockParams::MSG = T.let(T.unsafe(nil), String)
47540
47786
 
47787
+ # Checks for single-line `do`...`end` block.
47788
+ #
47789
+ # In practice a single line `do`...`end` is autocorrected when `EnforcedStyle: semantic`
47790
+ # in `Style/BlockDelimiters`. The autocorrection maintains the `do` ... `end` syntax to
47791
+ # preserve semantics and does not change it to `{`...`}` block.
47792
+ #
47793
+ # @example
47794
+ #
47795
+ # # bad
47796
+ # foo do |arg| bar(arg) end
47797
+ #
47798
+ # # good
47799
+ # foo do |arg|
47800
+ # bar(arg)
47801
+ # end
47802
+ #
47803
+ # # bad
47804
+ # ->(arg) do bar(arg) end
47805
+ #
47806
+ # # good
47807
+ # ->(arg) { bar(arg) }
47808
+ #
47809
+ # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#28
47810
+ class RuboCop::Cop::Style::SingleLineDoEndBlock < ::RuboCop::Cop::Base
47811
+ extend ::RuboCop::Cop::AutoCorrector
47812
+
47813
+ # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#33
47814
+ def on_block(node); end
47815
+
47816
+ # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#33
47817
+ def on_numblock(node); end
47818
+
47819
+ private
47820
+
47821
+ # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#53
47822
+ def do_line(node); end
47823
+
47824
+ # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#61
47825
+ def x(corrector, node); end
47826
+ end
47827
+
47828
+ # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#31
47829
+ RuboCop::Cop::Style::SingleLineDoEndBlock::MSG = T.let(T.unsafe(nil), String)
47830
+
47541
47831
  # Checks for single-line method definitions that contain a body.
47542
47832
  # It will accept single-line methods with no body.
47543
47833
  #
@@ -47707,10 +47997,10 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
47707
47997
 
47708
47998
  # @return [Boolean]
47709
47999
  #
47710
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#240
48000
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#242
47711
48001
  def allow_modifier?; end
47712
48002
 
47713
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#225
48003
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#227
47714
48004
  def arguments_range(node); end
47715
48005
 
47716
48006
  # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81
@@ -47740,13 +48030,13 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
47740
48030
  # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#130
47741
48031
  def correct_from_unless_to_if(corrector, node, is_modify_form: T.unsafe(nil)); end
47742
48032
 
47743
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#182
48033
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#184
47744
48034
  def correct_outer_condition(corrector, condition); end
47745
48035
 
47746
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#195
48036
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#197
47747
48037
  def insert_bang(corrector, node, is_modify_form); end
47748
48038
 
47749
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#208
48039
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#210
47750
48040
  def insert_bang_for_and(corrector, node); end
47751
48041
 
47752
48042
  # @return [Boolean]
@@ -47756,15 +48046,15 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
47756
48046
 
47757
48047
  # @return [Boolean]
47758
48048
  #
47759
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#244
48049
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#246
47760
48050
  def outer_condition_modify_form?(node, if_branch); end
47761
48051
 
47762
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#236
48052
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#238
47763
48053
  def replace_condition(condition); end
47764
48054
 
47765
48055
  # @return [Boolean]
47766
48056
  #
47767
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#220
48057
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#222
47768
48058
  def require_parentheses?(condition); end
47769
48059
 
47770
48060
  # @return [Boolean]
@@ -47777,7 +48067,7 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
47777
48067
 
47778
48068
  # @return [Boolean]
47779
48069
  #
47780
- # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#231
48070
+ # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233
47781
48071
  def wrap_condition?(node); end
47782
48072
 
47783
48073
  class << self
@@ -48657,43 +48947,43 @@ class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base
48657
48947
  extend ::RuboCop::Cop::AutoCorrector
48658
48948
  extend ::RuboCop::Cop::TargetRubyVersion
48659
48949
 
48660
- # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#58
48950
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#66
48661
48951
  def on_array(node); end
48662
48952
 
48663
48953
  private
48664
48954
 
48665
- # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#86
48955
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#96
48666
48956
  def build_bracketed_array(node); end
48667
48957
 
48668
48958
  # @return [Boolean]
48669
48959
  #
48670
- # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#70
48960
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#78
48671
48961
  def complex_content?(node); end
48672
48962
 
48673
48963
  # @return [Boolean]
48674
48964
  #
48675
- # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#82
48965
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#92
48676
48966
  def invalid_percent_array_contents?(node); end
48677
48967
 
48678
48968
  # @return [Boolean]
48679
48969
  #
48680
- # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#109
48970
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#119
48681
48971
  def symbol_without_quote?(string); end
48682
48972
 
48683
- # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#101
48973
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#111
48684
48974
  def to_symbol_literal(string); end
48685
48975
 
48686
48976
  class << self
48687
48977
  # Returns the value of attribute largest_brackets.
48688
48978
  #
48689
- # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#55
48979
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63
48690
48980
  def largest_brackets; end
48691
48981
 
48692
48982
  # Sets the attribute largest_brackets
48693
48983
  #
48694
48984
  # @param value the value to set the attribute largest_brackets to.
48695
48985
  #
48696
- # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#55
48986
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63
48697
48987
  def largest_brackets=(_arg0); end
48698
48988
  end
48699
48989
  end
@@ -48707,6 +48997,12 @@ RuboCop::Cop::Style::SymbolArray::DELIMITERS = T.let(T.unsafe(nil), Array)
48707
48997
  # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#50
48708
48998
  RuboCop::Cop::Style::SymbolArray::PERCENT_MSG = T.let(T.unsafe(nil), String)
48709
48999
 
49000
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#57
49001
+ RuboCop::Cop::Style::SymbolArray::REDEFINABLE_OPERATORS = T.let(T.unsafe(nil), Array)
49002
+
49003
+ # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#53
49004
+ RuboCop::Cop::Style::SymbolArray::SPECIAL_GVARS = T.let(T.unsafe(nil), Array)
49005
+
48710
49006
  # Checks symbol literal syntax.
48711
49007
  #
48712
49008
  # @example
@@ -48735,9 +49031,13 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String)
48735
49031
  # `define_method?` methods are allowed by default.
48736
49032
  # These are customizable with `AllowedMethods` option.
48737
49033
  #
48738
- # @example AllowedPatterns: ['map'] (default)
48739
- # # good
49034
+ # @example
49035
+ # # bad
48740
49036
  # something.map { |s| s.upcase }
49037
+ # something.map { _1.upcase }
49038
+ #
49039
+ # # good
49040
+ # something.map(&:upcase)
48741
49041
  # @example AllowMethodsWithArguments: false (default)
48742
49042
  # # bad
48743
49043
  # something.do_something(foo) { |o| o.bar }
@@ -48767,13 +49067,9 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String)
48767
49067
  # @example AllowedPatterns: [] (default)
48768
49068
  # # bad
48769
49069
  # something.map { |s| s.upcase }
48770
- # @example
48771
- # # bad
48772
- # something.map { |s| s.upcase }
48773
- # something.map { _1.upcase }
48774
- #
49070
+ # @example AllowedPatterns: ['map'] (default)
48775
49071
  # # good
48776
- # something.map(&:upcase)
49072
+ # something.map { |s| s.upcase }
48777
49073
  #
48778
49074
  # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#87
48779
49075
  class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base
@@ -49323,7 +49619,7 @@ class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base
49323
49619
  def on_send(node); end
49324
49620
 
49325
49621
  class << self
49326
- # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#91
49622
+ # source://rubocop-rspec/2.24.1/lib/rubocop-rspec.rb#60
49327
49623
  def autocorrect_incompatible_with; end
49328
49624
  end
49329
49625
  end
@@ -49717,11 +50013,27 @@ RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil
49717
50013
  # `to_open`, `to_path`, `to_proc`, `to_r`, `to_regexp`, `to_str`, `to_s`, and `to_sym` methods
49718
50014
  # are allowed by default. These are customizable with `AllowedMethods` option.
49719
50015
  #
49720
- # @example AllowedMethods: ['allowed_method']
49721
- # # good
49722
- # def allowed_method
50016
+ # @example
50017
+ # # bad
50018
+ # def foo
49723
50019
  # @foo
49724
50020
  # end
50021
+ #
50022
+ # def bar=(val)
50023
+ # @bar = val
50024
+ # end
50025
+ #
50026
+ # def self.baz
50027
+ # @baz
50028
+ # end
50029
+ #
50030
+ # # good
50031
+ # attr_reader :foo
50032
+ # attr_writer :bar
50033
+ #
50034
+ # class << self
50035
+ # attr_reader :baz
50036
+ # end
49725
50037
  # @example ExactNameMatch: true (default)
49726
50038
  # # good
49727
50039
  # def name
@@ -49773,26 +50085,10 @@ RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil
49773
50085
  # def self.foo
49774
50086
  # @foo
49775
50087
  # end
49776
- # @example
49777
- # # bad
49778
- # def foo
49779
- # @foo
49780
- # end
49781
- #
49782
- # def bar=(val)
49783
- # @bar = val
49784
- # end
49785
- #
49786
- # def self.baz
49787
- # @baz
49788
- # end
49789
- #
50088
+ # @example AllowedMethods: ['allowed_method']
49790
50089
  # # good
49791
- # attr_reader :foo
49792
- # attr_writer :bar
49793
- #
49794
- # class << self
49795
- # attr_reader :baz
50090
+ # def allowed_method
50091
+ # @foo
49796
50092
  # end
49797
50093
  #
49798
50094
  # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#98
@@ -50532,61 +50828,62 @@ RuboCop::Cop::Style::YodaCondition::REVERSE_COMPARISON = T.let(T.unsafe(nil), Ha
50532
50828
  # config.server_port = 9000 + ENV["TEST_ENV_NUMBER"].to_i
50533
50829
  # ----
50534
50830
  #
50535
- # @example SupportedOperators: ['*', '+', '&'']
50831
+ # @example SupportedOperators: ['*', '+', '&', '|', '^'] (default)
50536
50832
  # # bad
50537
- # 1 + x
50538
50833
  # 10 * y
50834
+ # 1 + x
50539
50835
  # 1 & z
50836
+ # 1 | x
50837
+ # 1 ^ x
50540
50838
  # 1 + CONST
50541
50839
  #
50542
50840
  # # good
50543
- # 60 * 24
50544
- # x + 1
50545
50841
  # y * 10
50842
+ # x + 1
50546
50843
  # z & 1
50844
+ # x | 1
50845
+ # x ^ 1
50547
50846
  # CONST + 1
50847
+ # 60 * 24
50548
50848
  #
50549
- # # good
50550
- # 1 | x
50551
- #
50552
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#39
50849
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#40
50553
50850
  class RuboCop::Cop::Style::YodaExpression < ::RuboCop::Cop::Base
50554
50851
  extend ::RuboCop::Cop::AutoCorrector
50555
50852
 
50556
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#46
50853
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#47
50557
50854
  def on_new_investigation; end
50558
50855
 
50559
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#50
50856
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#51
50560
50857
  def on_send(node); end
50561
50858
 
50562
50859
  private
50563
50860
 
50564
50861
  # @return [Boolean]
50565
50862
  #
50566
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#72
50863
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#73
50567
50864
  def constant_portion?(node); end
50568
50865
 
50569
50866
  # @return [Boolean]
50570
50867
  #
50571
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#80
50868
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#81
50572
50869
  def offended_ancestor?(node); end
50573
50870
 
50574
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#84
50871
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#85
50575
50872
  def offended_nodes; end
50576
50873
 
50577
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#76
50874
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#77
50578
50875
  def supported_operators; end
50579
50876
 
50580
50877
  # @return [Boolean]
50581
50878
  #
50582
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#68
50879
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#69
50583
50880
  def yoda_expression_constant?(lhs, rhs); end
50584
50881
  end
50585
50882
 
50586
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#42
50883
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#43
50587
50884
  RuboCop::Cop::Style::YodaExpression::MSG = T.let(T.unsafe(nil), String)
50588
50885
 
50589
- # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#44
50886
+ # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#45
50590
50887
  RuboCop::Cop::Style::YodaExpression::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
50591
50888
 
50592
50889
  # Checks for numeric comparisons that can be replaced
@@ -51485,12 +51782,10 @@ class RuboCop::Cop::Utils::RegexpRanges
51485
51782
  # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#11
51486
51783
  def initialize(root); end
51487
51784
 
51488
- # Returns the value of attribute compound_token.
51489
- #
51490
- # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#9
51785
+ # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#18
51491
51786
  def compound_token; end
51492
51787
 
51493
- # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#16
51788
+ # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#24
51494
51789
  def pairs; end
51495
51790
 
51496
51791
  # Returns the value of attribute root.
@@ -51500,26 +51795,29 @@ class RuboCop::Cop::Utils::RegexpRanges
51500
51795
 
51501
51796
  private
51502
51797
 
51503
- # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#65
51798
+ # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#78
51504
51799
  def compose_range(expressions, current); end
51505
51800
 
51506
51801
  # @return [Boolean]
51507
51802
  #
51508
- # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#77
51803
+ # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#90
51509
51804
  def escaped_octal?(expr); end
51510
51805
 
51511
51806
  # @return [Boolean]
51512
51807
  #
51513
- # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#81
51808
+ # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#94
51514
51809
  def octal_digit?(char); end
51515
51810
 
51516
- # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#85
51811
+ # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#98
51517
51812
  def pop_octal_digits(expressions); end
51518
51813
 
51519
- # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#31
51814
+ # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#44
51520
51815
  def populate(expr); end
51521
51816
 
51522
- # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#50
51817
+ # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#32
51818
+ def populate_all; end
51819
+
51820
+ # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#63
51523
51821
  def process_set(expressions, current); end
51524
51822
  end
51525
51823
 
@@ -53203,32 +53501,31 @@ end
53203
53501
  module RuboCop::FileFinder
53204
53502
  # @api private
53205
53503
  #
53206
- # source://rubocop//lib/rubocop/file_finder.rb#17
53504
+ # source://rubocop//lib/rubocop/file_finder.rb#13
53207
53505
  def find_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end
53208
53506
 
53209
53507
  # @api private
53210
53508
  #
53211
- # source://rubocop//lib/rubocop/file_finder.rb#24
53509
+ # source://rubocop//lib/rubocop/file_finder.rb#20
53212
53510
  def find_last_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end
53213
53511
 
53214
53512
  private
53215
53513
 
53216
53514
  # @api private
53217
53515
  #
53218
- # source://rubocop//lib/rubocop/file_finder.rb#32
53516
+ # source://rubocop//lib/rubocop/file_finder.rb#28
53219
53517
  def traverse_files_upwards(filename, start_dir, stop_dir); end
53220
53518
 
53221
53519
  class << self
53222
53520
  # @api private
53223
53521
  #
53224
- # source://rubocop//lib/rubocop/file_finder.rb#9
53225
- def root_level=(level); end
53522
+ # source://rubocop//lib/rubocop/file_finder.rb#10
53523
+ def root_level; end
53226
53524
 
53227
53525
  # @api private
53228
- # @return [Boolean]
53229
53526
  #
53230
- # source://rubocop//lib/rubocop/file_finder.rb#13
53231
- def root_level?(path, stop_dir); end
53527
+ # source://rubocop//lib/rubocop/file_finder.rb#10
53528
+ def root_level=(_arg0); end
53232
53529
  end
53233
53530
  end
53234
53531
 
@@ -54466,52 +54763,52 @@ class RuboCop::Lsp::Routes
54466
54763
  # source://rubocop//lib/rubocop/lsp/routes.rb#38
54467
54764
  def handle_initialize(request); end
54468
54765
 
54469
- # source://rubocop//lib/rubocop/lsp/routes.rb#58
54766
+ # source://rubocop//lib/rubocop/lsp/routes.rb#61
54470
54767
  def handle_initialized(_request); end
54471
54768
 
54472
54769
  # @api private
54473
54770
  #
54474
- # source://rubocop//lib/rubocop/lsp/routes.rb#167
54771
+ # source://rubocop//lib/rubocop/lsp/routes.rb#170
54475
54772
  def handle_method_missing(request); end
54476
54773
 
54477
- # source://rubocop//lib/rubocop/lsp/routes.rb#64
54774
+ # source://rubocop//lib/rubocop/lsp/routes.rb#67
54478
54775
  def handle_shutdown(request); end
54479
54776
 
54480
54777
  # @api private
54481
54778
  #
54482
- # source://rubocop//lib/rubocop/lsp/routes.rb#156
54779
+ # source://rubocop//lib/rubocop/lsp/routes.rb#159
54483
54780
  def handle_unsupported_method(request, method = T.unsafe(nil)); end
54484
54781
 
54485
54782
  private
54486
54783
 
54487
54784
  # @api private
54488
54785
  #
54489
- # source://rubocop//lib/rubocop/lsp/routes.rb#205
54786
+ # source://rubocop//lib/rubocop/lsp/routes.rb#208
54490
54787
  def diagnostic(file_uri, text); end
54491
54788
 
54492
54789
  # @api private
54493
54790
  #
54494
- # source://rubocop//lib/rubocop/lsp/routes.rb#175
54791
+ # source://rubocop//lib/rubocop/lsp/routes.rb#178
54495
54792
  def extract_initialization_options_from(request); end
54496
54793
 
54497
54794
  # @api private
54498
54795
  #
54499
- # source://rubocop//lib/rubocop/lsp/routes.rb#185
54796
+ # source://rubocop//lib/rubocop/lsp/routes.rb#188
54500
54797
  def format_file(file_uri, command: T.unsafe(nil)); end
54501
54798
 
54502
54799
  # @api private
54503
54800
  #
54504
- # source://rubocop//lib/rubocop/lsp/routes.rb#219
54801
+ # source://rubocop//lib/rubocop/lsp/routes.rb#222
54505
54802
  def remove_file_protocol_from(uri); end
54506
54803
 
54507
54804
  # @api private
54508
54805
  #
54509
- # source://rubocop//lib/rubocop/lsp/routes.rb#223
54806
+ # source://rubocop//lib/rubocop/lsp/routes.rb#226
54510
54807
  def to_diagnostic(offense); end
54511
54808
 
54512
54809
  # @api private
54513
54810
  #
54514
- # source://rubocop//lib/rubocop/lsp/routes.rb#235
54811
+ # source://rubocop//lib/rubocop/lsp/routes.rb#238
54515
54812
  def to_range(location); end
54516
54813
 
54517
54814
  class << self
@@ -54859,12 +55156,12 @@ RuboCop::MagicComment::KEYWORDS = T.let(T.unsafe(nil), Hash)
54859
55156
  class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment
54860
55157
  # Match `encoding` or `coding`
54861
55158
  #
54862
- # source://rubocop//lib/rubocop/magic_comment.rb#263
55159
+ # source://rubocop//lib/rubocop/magic_comment.rb#265
54863
55160
  def encoding; end
54864
55161
 
54865
55162
  # Rewrite the comment without a given token type
54866
55163
  #
54867
- # source://rubocop//lib/rubocop/magic_comment.rb#268
55164
+ # source://rubocop//lib/rubocop/magic_comment.rb#270
54868
55165
  def without(type); end
54869
55166
 
54870
55167
  private
@@ -54878,22 +55175,25 @@ class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment
54878
55175
  #
54879
55176
  # @see https://github.com/ruby/ruby/blob/78b95b4/parse.y#L7134-L7138
54880
55177
  #
54881
- # source://rubocop//lib/rubocop/magic_comment.rb#285
55178
+ # source://rubocop//lib/rubocop/magic_comment.rb#287
54882
55179
  def extract_frozen_string_literal; end
54883
55180
 
54884
- # source://rubocop//lib/rubocop/magic_comment.rb#289
55181
+ # source://rubocop//lib/rubocop/magic_comment.rb#291
54885
55182
  def extract_shareable_constant_value; end
54886
55183
 
54887
- # source://rubocop//lib/rubocop/magic_comment.rb#293
55184
+ # source://rubocop//lib/rubocop/magic_comment.rb#295
54888
55185
  def extract_typed; end
54889
55186
  end
54890
55187
 
55188
+ # source://rubocop//lib/rubocop/magic_comment.rb#262
55189
+ RuboCop::MagicComment::SimpleComment::FSTRING_LITERAL_COMMENT = T.let(T.unsafe(nil), String)
55190
+
54891
55191
  # IRB's pattern for matching magic comment tokens.
54892
55192
  #
54893
55193
  # @see https://github.com/ruby/ruby/blob/b4a55c1/lib/irb/magic-file.rb#L5
54894
55194
  #
54895
55195
  # source://rubocop//lib/rubocop/magic_comment.rb#10
54896
- RuboCop::MagicComment::TOKEN = T.let(T.unsafe(nil), Regexp)
55196
+ RuboCop::MagicComment::TOKEN = T.let(T.unsafe(nil), String)
54897
55197
 
54898
55198
  # Wrapper for Vim style magic comments.
54899
55199
  #
@@ -56091,34 +56391,34 @@ class RuboCop::TargetRuby
56091
56391
  # @api private
56092
56392
  # @return [TargetRuby] a new instance of TargetRuby
56093
56393
  #
56094
- # source://rubocop//lib/rubocop/target_ruby.rb#248
56394
+ # source://rubocop//lib/rubocop/target_ruby.rb#252
56095
56395
  def initialize(config); end
56096
56396
 
56097
56397
  # @api private
56098
56398
  #
56099
- # source://rubocop//lib/rubocop/target_ruby.rb#264
56399
+ # source://rubocop//lib/rubocop/target_ruby.rb#268
56100
56400
  def rubocop_version_with_support; end
56101
56401
 
56102
56402
  # @api private
56103
56403
  #
56104
- # source://rubocop//lib/rubocop/target_ruby.rb#252
56404
+ # source://rubocop//lib/rubocop/target_ruby.rb#256
56105
56405
  def source; end
56106
56406
 
56107
56407
  # @api private
56108
56408
  # @return [Boolean]
56109
56409
  #
56110
- # source://rubocop//lib/rubocop/target_ruby.rb#260
56410
+ # source://rubocop//lib/rubocop/target_ruby.rb#264
56111
56411
  def supported?; end
56112
56412
 
56113
56413
  # @api private
56114
56414
  #
56115
- # source://rubocop//lib/rubocop/target_ruby.rb#256
56415
+ # source://rubocop//lib/rubocop/target_ruby.rb#260
56116
56416
  def version; end
56117
56417
 
56118
56418
  class << self
56119
56419
  # @api private
56120
56420
  #
56121
- # source://rubocop//lib/rubocop/target_ruby.rb#234
56421
+ # source://rubocop//lib/rubocop/target_ruby.rb#238
56122
56422
  def supported_versions; end
56123
56423
  end
56124
56424
  end
@@ -56156,18 +56456,18 @@ RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float)
56156
56456
  #
56157
56457
  # @api private
56158
56458
  #
56159
- # source://rubocop//lib/rubocop/target_ruby.rb#222
56459
+ # source://rubocop//lib/rubocop/target_ruby.rb#226
56160
56460
  class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source
56161
56461
  # @api private
56162
56462
  #
56163
- # source://rubocop//lib/rubocop/target_ruby.rb#223
56463
+ # source://rubocop//lib/rubocop/target_ruby.rb#227
56164
56464
  def name; end
56165
56465
 
56166
56466
  private
56167
56467
 
56168
56468
  # @api private
56169
56469
  #
56170
- # source://rubocop//lib/rubocop/target_ruby.rb#229
56470
+ # source://rubocop//lib/rubocop/target_ruby.rb#233
56171
56471
  def find_version; end
56172
56472
  end
56173
56473
 
@@ -56180,11 +56480,11 @@ class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source
56180
56480
  extend ::RuboCop::AST::NodePattern::Macros
56181
56481
 
56182
56482
  # source://rubocop//lib/rubocop/target_ruby.rb#159
56183
- def gem_requirement?(param0 = T.unsafe(nil)); end
56483
+ def gem_requirement_versions(param0 = T.unsafe(nil)); end
56184
56484
 
56185
56485
  # @api private
56186
56486
  #
56187
- # source://rubocop//lib/rubocop/target_ruby.rb#163
56487
+ # source://rubocop//lib/rubocop/target_ruby.rb#165
56188
56488
  def name; end
56189
56489
 
56190
56490
  # source://rubocop//lib/rubocop/target_ruby.rb#154
@@ -56194,37 +56494,37 @@ class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source
56194
56494
 
56195
56495
  # @api private
56196
56496
  #
56197
- # source://rubocop//lib/rubocop/target_ruby.rb#210
56497
+ # source://rubocop//lib/rubocop/target_ruby.rb#214
56198
56498
  def find_default_minimal_known_ruby(right_hand_side); end
56199
56499
 
56200
56500
  # @api private
56201
56501
  #
56202
- # source://rubocop//lib/rubocop/target_ruby.rb#169
56502
+ # source://rubocop//lib/rubocop/target_ruby.rb#171
56203
56503
  def find_version; end
56204
56504
 
56205
56505
  # @api private
56206
56506
  #
56207
- # source://rubocop//lib/rubocop/target_ruby.rb#179
56507
+ # source://rubocop//lib/rubocop/target_ruby.rb#181
56208
56508
  def gemspec_filename; end
56209
56509
 
56210
56510
  # @api private
56211
56511
  #
56212
- # source://rubocop//lib/rubocop/target_ruby.rb#186
56512
+ # source://rubocop//lib/rubocop/target_ruby.rb#188
56213
56513
  def gemspec_filepath; end
56214
56514
 
56215
56515
  # @api private
56216
56516
  #
56217
- # source://rubocop//lib/rubocop/target_ruby.rb#206
56517
+ # source://rubocop//lib/rubocop/target_ruby.rb#210
56218
56518
  def version_from_array(array); end
56219
56519
 
56220
56520
  # @api private
56221
56521
  #
56222
- # source://rubocop//lib/rubocop/target_ruby.rb#191
56522
+ # source://rubocop//lib/rubocop/target_ruby.rb#193
56223
56523
  def version_from_gemspec_file(file); end
56224
56524
 
56225
56525
  # @api private
56226
56526
  #
56227
- # source://rubocop//lib/rubocop/target_ruby.rb#196
56527
+ # source://rubocop//lib/rubocop/target_ruby.rb#198
56228
56528
  def version_from_right_hand_side(right_hand_side); end
56229
56529
  end
56230
56530
 
@@ -56308,7 +56608,7 @@ RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_PATTERN = T.let(T.unsafe(nil)
56308
56608
 
56309
56609
  # @api private
56310
56610
  #
56311
- # source://rubocop//lib/rubocop/target_ruby.rb#238
56611
+ # source://rubocop//lib/rubocop/target_ruby.rb#242
56312
56612
  RuboCop::TargetRuby::SOURCES = T.let(T.unsafe(nil), Array)
56313
56613
 
56314
56614
  # A place where information about a target ruby version is found.