sorbet-result 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -0
- data/CHANGELOG.md +24 -0
- data/Gemfile.lock +19 -19
- data/README.md +59 -20
- data/Rakefile +6 -1
- data/lib/typed/failure.rb +28 -9
- data/lib/typed/no_error_on_success_error.rb +14 -0
- data/lib/typed/no_payload_on_failure_error.rb +1 -1
- data/lib/typed/result.rb +11 -6
- data/lib/typed/success.rb +28 -14
- data/sorbet/config +1 -0
- data/sorbet/rbi/gems/{parser@3.2.2.0.rbi → parser@3.2.2.1.rbi} +162 -162
- data/sorbet/rbi/gems/{rubocop-ast@1.28.0.rbi → rubocop-ast@1.29.0.rbi} +47 -28
- data/sorbet/rbi/gems/{rubocop-minitest@0.30.0.rbi → rubocop-minitest@0.31.0.rbi} +48 -5
- data/sorbet/rbi/gems/{rubocop@1.50.2.rbi → rubocop@1.52.0.rbi} +852 -497
- data/sorbet/rbi/gems/{tapioca@0.11.5.rbi → tapioca@0.11.6.rbi} +43 -10
- data/sorbet/rbi/gems/{thor@1.2.1.rbi → thor@1.2.2.rbi} +69 -60
- data/sorbet/rbi/gems/{zeitwerk@2.6.7.rbi → zeitwerk@2.6.8.rbi} +67 -47
- metadata +17 -17
- data/lib/typed/nil_payload_error.rb +0 -14
- /data/sorbet/rbi/gems/{irb@1.6.4.rbi → irb@1.7.0.rbi} +0 -0
- /data/sorbet/rbi/gems/{reline@0.3.3.rbi → reline@0.3.5.rbi} +0 -0
@@ -1040,6 +1040,9 @@ class RuboCop::Config
|
|
1040
1040
|
# source://rubocop//lib/rubocop/config.rb#155
|
1041
1041
|
def for_department(department_name); end
|
1042
1042
|
|
1043
|
+
# source://rubocop//lib/rubocop/config.rb#287
|
1044
|
+
def inspect; end
|
1045
|
+
|
1043
1046
|
# True if this is a config file that is shipped with RuboCop
|
1044
1047
|
#
|
1045
1048
|
# @return [Boolean]
|
@@ -1125,18 +1128,18 @@ class RuboCop::Config
|
|
1125
1128
|
|
1126
1129
|
private
|
1127
1130
|
|
1128
|
-
# source://rubocop//lib/rubocop/config.rb#
|
1131
|
+
# source://rubocop//lib/rubocop/config.rb#322
|
1129
1132
|
def department_of(qualified_cop_name); end
|
1130
1133
|
|
1131
1134
|
# @return [Boolean]
|
1132
1135
|
#
|
1133
|
-
# source://rubocop//lib/rubocop/config.rb#
|
1136
|
+
# source://rubocop//lib/rubocop/config.rb#310
|
1134
1137
|
def enable_cop?(qualified_cop_name, cop_options); end
|
1135
1138
|
|
1136
|
-
# source://rubocop//lib/rubocop/config.rb#
|
1139
|
+
# source://rubocop//lib/rubocop/config.rb#297
|
1137
1140
|
def read_rails_version_from_bundler_lock_file; end
|
1138
1141
|
|
1139
|
-
# source://rubocop//lib/rubocop/config.rb#
|
1142
|
+
# source://rubocop//lib/rubocop/config.rb#293
|
1140
1143
|
def target_rails_version_from_bundler_lock_file; end
|
1141
1144
|
|
1142
1145
|
class << self
|
@@ -2508,6 +2511,22 @@ module RuboCop::Cop::AllowedPattern
|
|
2508
2511
|
def matches_ignored_pattern?(line); end
|
2509
2512
|
end
|
2510
2513
|
|
2514
|
+
# This module encapsulates the ability to allow certain receivers in a cop.
|
2515
|
+
#
|
2516
|
+
# source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#6
|
2517
|
+
module RuboCop::Cop::AllowedReceivers
|
2518
|
+
# @return [Boolean]
|
2519
|
+
#
|
2520
|
+
# source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#7
|
2521
|
+
def allowed_receiver?(receiver); end
|
2522
|
+
|
2523
|
+
# source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#29
|
2524
|
+
def allowed_receivers; end
|
2525
|
+
|
2526
|
+
# source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#13
|
2527
|
+
def receiver_name(receiver); end
|
2528
|
+
end
|
2529
|
+
|
2511
2530
|
# Error raised when an unqualified cop name is used that could
|
2512
2531
|
# refer to two or more cops under different departments
|
2513
2532
|
#
|
@@ -2914,6 +2933,9 @@ class RuboCop::Cop::Base
|
|
2914
2933
|
# source://rubocop//lib/rubocop/cop/base.rb#205
|
2915
2934
|
def external_dependency_checksum; end
|
2916
2935
|
|
2936
|
+
# source://rubocop//lib/rubocop/cop/base.rb#308
|
2937
|
+
def inspect; end
|
2938
|
+
|
2917
2939
|
# Gets called if no message is specified when calling `add_offense` or
|
2918
2940
|
# `add_global_offense`
|
2919
2941
|
# Cops are discouraged to override this; instead pass your message directly
|
@@ -2977,83 +2999,83 @@ class RuboCop::Cop::Base
|
|
2977
2999
|
|
2978
3000
|
private
|
2979
3001
|
|
2980
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3002
|
+
# source://rubocop//lib/rubocop/cop/base.rb#436
|
2981
3003
|
def annotate(message); end
|
2982
3004
|
|
2983
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3005
|
+
# source://rubocop//lib/rubocop/cop/base.rb#320
|
2984
3006
|
def apply_correction(corrector); end
|
2985
3007
|
|
2986
3008
|
# @return [Symbol] offense status
|
2987
3009
|
#
|
2988
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3010
|
+
# source://rubocop//lib/rubocop/cop/base.rb#400
|
2989
3011
|
def attempt_correction(range, corrector); end
|
2990
3012
|
|
2991
3013
|
# Reserved for Cop::Cop
|
2992
3014
|
#
|
2993
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3015
|
+
# source://rubocop//lib/rubocop/cop/base.rb#316
|
2994
3016
|
def callback_argument(range); end
|
2995
3017
|
|
2996
3018
|
# Called to complete an investigation
|
2997
3019
|
#
|
2998
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3020
|
+
# source://rubocop//lib/rubocop/cop/base.rb#349
|
2999
3021
|
def complete_investigation; end
|
3000
3022
|
|
3001
3023
|
# @return [Symbol, Corrector] offense status
|
3002
3024
|
#
|
3003
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3025
|
+
# source://rubocop//lib/rubocop/cop/base.rb#374
|
3004
3026
|
def correct(range); end
|
3005
3027
|
|
3006
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3028
|
+
# source://rubocop//lib/rubocop/cop/base.rb#334
|
3007
3029
|
def current_corrector; end
|
3008
3030
|
|
3009
3031
|
# Reserved for Commissioner:
|
3010
3032
|
#
|
3011
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3033
|
+
# source://rubocop//lib/rubocop/cop/base.rb#326
|
3012
3034
|
def current_offense_locations; end
|
3013
3035
|
|
3014
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3036
|
+
# source://rubocop//lib/rubocop/cop/base.rb#338
|
3015
3037
|
def current_offenses; end
|
3016
3038
|
|
3017
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3039
|
+
# source://rubocop//lib/rubocop/cop/base.rb#330
|
3018
3040
|
def currently_disabled_lines; end
|
3019
3041
|
|
3020
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3042
|
+
# source://rubocop//lib/rubocop/cop/base.rb#464
|
3021
3043
|
def custom_severity; end
|
3022
3044
|
|
3023
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3045
|
+
# source://rubocop//lib/rubocop/cop/base.rb#460
|
3024
3046
|
def default_severity; end
|
3025
3047
|
|
3026
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3048
|
+
# source://rubocop//lib/rubocop/cop/base.rb#414
|
3027
3049
|
def disable_uncorrectable(range); end
|
3028
3050
|
|
3029
3051
|
# @return [Boolean]
|
3030
3052
|
#
|
3031
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3053
|
+
# source://rubocop//lib/rubocop/cop/base.rb#450
|
3032
3054
|
def enabled_line?(line_number); end
|
3033
3055
|
|
3034
3056
|
# @return [Boolean]
|
3035
3057
|
#
|
3036
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3058
|
+
# source://rubocop//lib/rubocop/cop/base.rb#442
|
3037
3059
|
def file_name_matches_any?(file, parameter, default_result); end
|
3038
3060
|
|
3039
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3061
|
+
# source://rubocop//lib/rubocop/cop/base.rb#432
|
3040
3062
|
def find_message(range, message); end
|
3041
3063
|
|
3042
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3064
|
+
# source://rubocop//lib/rubocop/cop/base.rb#456
|
3043
3065
|
def find_severity(_range, severity); end
|
3044
3066
|
|
3045
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3067
|
+
# source://rubocop//lib/rubocop/cop/base.rb#477
|
3046
3068
|
def range_for_original(range); end
|
3047
3069
|
|
3048
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3070
|
+
# source://rubocop//lib/rubocop/cop/base.rb#421
|
3049
3071
|
def range_from_node_or_range(node_or_range); end
|
3050
3072
|
|
3051
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3073
|
+
# source://rubocop//lib/rubocop/cop/base.rb#369
|
3052
3074
|
def reset_investigation; end
|
3053
3075
|
|
3054
3076
|
# @return [Symbol] offense status
|
3055
3077
|
#
|
3056
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3078
|
+
# source://rubocop//lib/rubocop/cop/base.rb#389
|
3057
3079
|
def use_corrector(range, corrector); end
|
3058
3080
|
|
3059
3081
|
class << self
|
@@ -3143,15 +3165,15 @@ class RuboCop::Cop::Base
|
|
3143
3165
|
|
3144
3166
|
# @return [Boolean]
|
3145
3167
|
#
|
3146
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3168
|
+
# source://rubocop//lib/rubocop/cop/base.rb#360
|
3147
3169
|
def builtin?; end
|
3148
3170
|
|
3149
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3171
|
+
# source://rubocop//lib/rubocop/cop/base.rb#342
|
3150
3172
|
def restrict_on_send; end
|
3151
3173
|
end
|
3152
3174
|
end
|
3153
3175
|
|
3154
|
-
# source://rubocop//lib/rubocop/cop/base.rb#
|
3176
|
+
# source://rubocop//lib/rubocop/cop/base.rb#346
|
3155
3177
|
RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array)
|
3156
3178
|
|
3157
3179
|
# Reports of an investigation.
|
@@ -4856,7 +4878,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter
|
|
4856
4878
|
|
4857
4879
|
# Legacy
|
4858
4880
|
#
|
4859
|
-
# source://parser/3.2.2.
|
4881
|
+
# source://parser/3.2.2.1/lib/parser/source/tree_rewriter.rb#252
|
4860
4882
|
def rewrite; end
|
4861
4883
|
|
4862
4884
|
# Swaps sources at the given ranges.
|
@@ -15444,7 +15466,7 @@ class RuboCop::Cop::Layout::SpaceInsideBlockBraces < ::RuboCop::Cop::Base
|
|
15444
15466
|
# source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#205
|
15445
15467
|
def space_inside_right_brace(inner, right_brace, column); end
|
15446
15468
|
|
15447
|
-
# source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#
|
15469
|
+
# source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#253
|
15448
15470
|
def style_for_empty_braces; end
|
15449
15471
|
end
|
15450
15472
|
|
@@ -16294,30 +16316,34 @@ RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsaf
|
|
16294
16316
|
class RuboCop::Cop::Lint::AmbiguousBlockAssociation < ::RuboCop::Cop::Base
|
16295
16317
|
include ::RuboCop::Cop::AllowedMethods
|
16296
16318
|
include ::RuboCop::Cop::AllowedPattern
|
16319
|
+
extend ::RuboCop::Cop::AutoCorrector
|
16297
16320
|
|
16298
|
-
# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#
|
16321
|
+
# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#64
|
16299
16322
|
def on_csend(node); end
|
16300
16323
|
|
16301
|
-
# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#
|
16324
|
+
# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#64
|
16302
16325
|
def on_send(node); end
|
16303
16326
|
|
16304
16327
|
private
|
16305
16328
|
|
16306
16329
|
# @return [Boolean]
|
16307
16330
|
#
|
16308
|
-
# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#
|
16331
|
+
# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#85
|
16309
16332
|
def allowed_method_pattern?(node); end
|
16310
16333
|
|
16311
16334
|
# @return [Boolean]
|
16312
16335
|
#
|
16313
|
-
# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#
|
16336
|
+
# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#81
|
16314
16337
|
def ambiguous_block_association?(send_node); end
|
16315
16338
|
|
16316
|
-
# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#
|
16339
|
+
# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#91
|
16317
16340
|
def message(send_node); end
|
16341
|
+
|
16342
|
+
# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#97
|
16343
|
+
def wrap_in_parentheses(corrector, node); end
|
16318
16344
|
end
|
16319
16345
|
|
16320
|
-
# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#
|
16346
|
+
# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#60
|
16321
16347
|
RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String)
|
16322
16348
|
|
16323
16349
|
# Checks for ambiguous operators in the first argument of a
|
@@ -18667,9 +18693,9 @@ RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String)
|
|
18667
18693
|
#
|
18668
18694
|
# [source,console]
|
18669
18695
|
# ----
|
18670
|
-
#
|
18696
|
+
# $ cat example.rb
|
18671
18697
|
# ERB.new('hi', nil, '-', '@output_buffer')
|
18672
|
-
#
|
18698
|
+
# $ ruby -rerb example.rb
|
18673
18699
|
# example.rb:1: warning: Passing safe_level with the 2nd argument of ERB.new is
|
18674
18700
|
# deprecated. Do not use it, and specify other arguments as keyword arguments.
|
18675
18701
|
# example.rb:1: warning: Passing trim_mode with the 3rd argument of ERB.new is
|
@@ -19244,6 +19270,9 @@ RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), Stri
|
|
19244
19270
|
|
19245
19271
|
# This cop checks for `IO.select` that is incompatible with Fiber Scheduler since Ruby 3.0.
|
19246
19272
|
#
|
19273
|
+
# When an array of IO objects waiting for an exception (the third argument of `IO.select`)
|
19274
|
+
# is used as an argument, there is no alternative API, so offenses are not registered.
|
19275
|
+
#
|
19247
19276
|
# NOTE: When the method is successful the return value of `IO.select` is `[[IO]]`,
|
19248
19277
|
# and the return value of `io.wait_readable` and `io.wait_writable` are `self`.
|
19249
19278
|
# They are not autocorrected when assigning a return value because these types are different.
|
@@ -19263,31 +19292,31 @@ RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), Stri
|
|
19263
19292
|
# # good
|
19264
19293
|
# io.wait_writable(timeout)
|
19265
19294
|
#
|
19266
|
-
# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#
|
19295
|
+
# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#35
|
19267
19296
|
class RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler < ::RuboCop::Cop::Base
|
19268
19297
|
extend ::RuboCop::Cop::AutoCorrector
|
19269
19298
|
|
19270
|
-
# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#
|
19299
|
+
# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#42
|
19271
19300
|
def io_select(param0 = T.unsafe(nil)); end
|
19272
19301
|
|
19273
|
-
# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#
|
19302
|
+
# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#47
|
19274
19303
|
def on_send(node); end
|
19275
19304
|
|
19276
19305
|
private
|
19277
19306
|
|
19278
|
-
# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#
|
19307
|
+
# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#70
|
19279
19308
|
def preferred_method(read, write, timeout); end
|
19280
19309
|
|
19281
19310
|
# @return [Boolean]
|
19282
19311
|
#
|
19283
|
-
# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#
|
19312
|
+
# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#64
|
19284
19313
|
def scheduler_compatible?(io1, io2); end
|
19285
19314
|
end
|
19286
19315
|
|
19287
|
-
# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#
|
19316
|
+
# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#38
|
19288
19317
|
RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::MSG = T.let(T.unsafe(nil), String)
|
19289
19318
|
|
19290
|
-
# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#
|
19319
|
+
# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#39
|
19291
19320
|
RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
19292
19321
|
|
19293
19322
|
# Checks for `private` or `protected` access modifiers which are
|
@@ -19416,20 +19445,25 @@ class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base
|
|
19416
19445
|
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#59
|
19417
19446
|
def on_class(node); end
|
19418
19447
|
|
19419
|
-
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#
|
19448
|
+
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#70
|
19420
19449
|
def on_send(node); end
|
19421
19450
|
|
19422
19451
|
private
|
19423
19452
|
|
19424
19453
|
# @return [Boolean]
|
19425
19454
|
#
|
19426
|
-
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#
|
19455
|
+
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#87
|
19427
19456
|
def exception_class?(class_node); end
|
19428
19457
|
|
19429
|
-
#
|
19458
|
+
# @return [Boolean]
|
19459
|
+
#
|
19460
|
+
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#91
|
19461
|
+
def inherit_exception_class_with_omitted_namespace?(class_node); end
|
19462
|
+
|
19463
|
+
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#83
|
19430
19464
|
def message(node); end
|
19431
19465
|
|
19432
|
-
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#
|
19466
|
+
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#97
|
19433
19467
|
def preferred_base_class; end
|
19434
19468
|
end
|
19435
19469
|
|
@@ -19479,7 +19513,7 @@ RuboCop::Cop::Lint::InterpolationCheck::MSG = T.let(T.unsafe(nil), String)
|
|
19479
19513
|
# Checks uses of lambda without a literal block.
|
19480
19514
|
# It emulates the following warning in Ruby 3.0:
|
19481
19515
|
#
|
19482
|
-
#
|
19516
|
+
# $ ruby -vwe 'lambda(&proc {})'
|
19483
19517
|
# ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19]
|
19484
19518
|
# -e:1: warning: lambda without a literal block is deprecated; use the proc without
|
19485
19519
|
# lambda instead
|
@@ -19835,6 +19869,9 @@ RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil),
|
|
19835
19869
|
# missing method. In other cases, the theoretical ideal handling could be
|
19836
19870
|
# challenging or verbose for no actual gain.
|
19837
19871
|
#
|
19872
|
+
# Autocorrection is not supported because the position of `super` cannot be
|
19873
|
+
# determined automatically.
|
19874
|
+
#
|
19838
19875
|
# @example
|
19839
19876
|
# # bad
|
19840
19877
|
# class Employee < Person
|
@@ -19881,61 +19918,61 @@ RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil),
|
|
19881
19918
|
# end
|
19882
19919
|
# end
|
19883
19920
|
#
|
19884
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19921
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#63
|
19885
19922
|
class RuboCop::Cop::Lint::MissingSuper < ::RuboCop::Cop::Base
|
19886
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19923
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#77
|
19887
19924
|
def class_new_block(param0 = T.unsafe(nil)); end
|
19888
19925
|
|
19889
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19926
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#83
|
19890
19927
|
def on_def(node); end
|
19891
19928
|
|
19892
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19929
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#93
|
19893
19930
|
def on_defs(node); end
|
19894
19931
|
|
19895
19932
|
private
|
19896
19933
|
|
19897
19934
|
# @return [Boolean]
|
19898
19935
|
#
|
19899
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19936
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#105
|
19900
19937
|
def callback_method_def?(node); end
|
19901
19938
|
|
19902
19939
|
# @return [Boolean]
|
19903
19940
|
#
|
19904
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19941
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#111
|
19905
19942
|
def contains_super?(node); end
|
19906
19943
|
|
19907
19944
|
# @return [Boolean]
|
19908
19945
|
#
|
19909
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19946
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#115
|
19910
19947
|
def inside_class_with_stateful_parent?(node); end
|
19911
19948
|
|
19912
19949
|
# @return [Boolean]
|
19913
19950
|
#
|
19914
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19951
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#101
|
19915
19952
|
def offender?(node); end
|
19916
19953
|
|
19917
19954
|
# @return [Boolean]
|
19918
19955
|
#
|
19919
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19956
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#127
|
19920
19957
|
def stateless_class?(node); end
|
19921
19958
|
end
|
19922
19959
|
|
19923
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19960
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#74
|
19924
19961
|
RuboCop::Cop::Lint::MissingSuper::CALLBACKS = T.let(T.unsafe(nil), Set)
|
19925
19962
|
|
19926
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19963
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#65
|
19927
19964
|
RuboCop::Cop::Lint::MissingSuper::CALLBACK_MSG = T.let(T.unsafe(nil), String)
|
19928
19965
|
|
19929
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19966
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#69
|
19930
19967
|
RuboCop::Cop::Lint::MissingSuper::CLASS_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array)
|
19931
19968
|
|
19932
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19969
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#64
|
19933
19970
|
RuboCop::Cop::Lint::MissingSuper::CONSTRUCTOR_MSG = T.let(T.unsafe(nil), String)
|
19934
19971
|
|
19935
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19972
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#70
|
19936
19973
|
RuboCop::Cop::Lint::MissingSuper::METHOD_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array)
|
19937
19974
|
|
19938
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19975
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#67
|
19939
19976
|
RuboCop::Cop::Lint::MissingSuper::STATELESS_CLASSES = T.let(T.unsafe(nil), Array)
|
19940
19977
|
|
19941
19978
|
# Do not mix named captures and numbered captures in a Regexp literal
|
@@ -20701,13 +20738,13 @@ RuboCop::Cop::Lint::NumberConversion::MSG = T.let(T.unsafe(nil), String)
|
|
20701
20738
|
# Checks for uses of numbered parameter assignment.
|
20702
20739
|
# It emulates the following warning in Ruby 2.7:
|
20703
20740
|
#
|
20704
|
-
#
|
20741
|
+
# $ ruby -ve '_1 = :value'
|
20705
20742
|
# ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin19]
|
20706
20743
|
# -e:1: warning: `_1' is reserved for numbered parameter; consider another name
|
20707
20744
|
#
|
20708
20745
|
# Assigning to a numbered parameter (from `_1` to `_9`) causes an error in Ruby 3.0.
|
20709
20746
|
#
|
20710
|
-
#
|
20747
|
+
# $ ruby -ve '_1 = :value'
|
20711
20748
|
# ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19]
|
20712
20749
|
# -e:1: _1 is reserved for numbered parameter
|
20713
20750
|
#
|
@@ -21535,6 +21572,7 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T
|
|
21535
21572
|
# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#51
|
21536
21573
|
class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base
|
21537
21574
|
include ::RuboCop::Cop::AllowedMethods
|
21575
|
+
include ::RuboCop::Cop::NilMethods
|
21538
21576
|
include ::RuboCop::Cop::RangeHelp
|
21539
21577
|
extend ::RuboCop::Cop::AutoCorrector
|
21540
21578
|
|
@@ -23181,27 +23219,39 @@ RuboCop::Cop::Lint::ToJSON::MSG = T.let(T.unsafe(nil), String)
|
|
23181
23219
|
# always ignored. This is detected automatically since Ruby 2.7.
|
23182
23220
|
#
|
23183
23221
|
# @example
|
23222
|
+
# # bad
|
23223
|
+
# return 1
|
23184
23224
|
#
|
23185
|
-
# #
|
23186
|
-
# return
|
23225
|
+
# # good
|
23226
|
+
# return
|
23187
23227
|
#
|
23188
|
-
# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#
|
23228
|
+
# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#16
|
23189
23229
|
class RuboCop::Cop::Lint::TopLevelReturnWithArgument < ::RuboCop::Cop::Base
|
23230
|
+
extend ::RuboCop::Cop::AutoCorrector
|
23231
|
+
|
23190
23232
|
# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#21
|
23191
23233
|
def on_return(return_node); end
|
23192
23234
|
|
23193
23235
|
private
|
23194
23236
|
|
23237
|
+
# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#35
|
23238
|
+
def remove_arguments(corrector, return_node); end
|
23239
|
+
|
23240
|
+
# This cop works by validating the ancestors of the return node. A
|
23241
|
+
# top-level return node's ancestors should not be of block, def, or
|
23242
|
+
# defs type.
|
23243
|
+
#
|
23244
|
+
# @return [Boolean]
|
23245
|
+
#
|
23246
|
+
# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#42
|
23247
|
+
def top_level_return?(return_node); end
|
23248
|
+
|
23195
23249
|
# @return [Boolean]
|
23196
23250
|
#
|
23197
|
-
# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#
|
23198
|
-
def
|
23251
|
+
# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#31
|
23252
|
+
def top_level_return_with_any_argument?(return_node); end
|
23199
23253
|
end
|
23200
23254
|
|
23201
|
-
# This cop works by validating the ancestors of the return node. A
|
23202
|
-
# top-level return node's ancestors should not be of block, def, or
|
23203
|
-
# defs type.
|
23204
|
-
#
|
23205
23255
|
# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#19
|
23206
23256
|
RuboCop::Cop::Lint::TopLevelReturnWithArgument::MSG = T.let(T.unsafe(nil), String)
|
23207
23257
|
|
@@ -24327,49 +24377,70 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String)
|
|
24327
24377
|
# do_something(some_var)
|
24328
24378
|
# end
|
24329
24379
|
#
|
24330
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24380
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#39
|
24331
24381
|
class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base
|
24332
|
-
|
24382
|
+
include ::RuboCop::Cop::RangeHelp
|
24383
|
+
extend ::RuboCop::Cop::AutoCorrector
|
24384
|
+
|
24385
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50
|
24333
24386
|
def after_leaving_scope(scope, _variable_table); end
|
24334
24387
|
|
24335
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24388
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#136
|
24389
|
+
def autocorrect(corrector, assignment); end
|
24390
|
+
|
24391
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#54
|
24336
24392
|
def check_for_unused_assignments(variable); end
|
24337
24393
|
|
24338
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24394
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#120
|
24339
24395
|
def collect_variable_like_names(scope); end
|
24340
24396
|
|
24341
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24397
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#74
|
24342
24398
|
def message_for_useless_assignment(assignment); end
|
24343
24399
|
|
24344
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24400
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#80
|
24345
24401
|
def message_specification(assignment, variable); end
|
24346
24402
|
|
24347
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24403
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#90
|
24348
24404
|
def multiple_assignment_message(variable_name); end
|
24349
24405
|
|
24350
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24406
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#95
|
24351
24407
|
def operator_assignment_message(scope, assignment); end
|
24352
24408
|
|
24409
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#152
|
24410
|
+
def remove_exception_assignment_part(corrector, node); end
|
24411
|
+
|
24412
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#176
|
24413
|
+
def remove_local_variable_assignment_part(corrector, node); end
|
24414
|
+
|
24415
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#165
|
24416
|
+
def remove_trailing_character_from_operator(corrector, node); end
|
24417
|
+
|
24418
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#161
|
24419
|
+
def rename_variable_with_underscore(corrector, node); end
|
24420
|
+
|
24421
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#169
|
24422
|
+
def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end
|
24423
|
+
|
24353
24424
|
# TODO: More precise handling (rescue, ensure, nested begin, etc.)
|
24354
24425
|
#
|
24355
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24426
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#110
|
24356
24427
|
def return_value_node_of_scope(scope); end
|
24357
24428
|
|
24358
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24429
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103
|
24359
24430
|
def similar_name_message(variable); end
|
24360
24431
|
|
24361
24432
|
# @return [Boolean]
|
24362
24433
|
#
|
24363
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24434
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#129
|
24364
24435
|
def variable_like_method_invocation?(node); end
|
24365
24436
|
|
24366
24437
|
class << self
|
24367
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24438
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#46
|
24368
24439
|
def joining_forces; end
|
24369
24440
|
end
|
24370
24441
|
end
|
24371
24442
|
|
24372
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24443
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#44
|
24373
24444
|
RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String)
|
24374
24445
|
|
24375
24446
|
# Checks for useless `else` in `begin..end` without `rescue`.
|
@@ -24816,87 +24887,108 @@ RuboCop::Cop::Lint::UselessTimes::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
|
24816
24887
|
#
|
24817
24888
|
# source://rubocop//lib/rubocop/cop/lint/void.rb#43
|
24818
24889
|
class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base
|
24819
|
-
|
24890
|
+
include ::RuboCop::Cop::RangeHelp
|
24891
|
+
extend ::RuboCop::Cop::AutoCorrector
|
24892
|
+
|
24893
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#80
|
24820
24894
|
def on_begin(node); end
|
24821
24895
|
|
24822
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24896
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#71
|
24823
24897
|
def on_block(node); end
|
24824
24898
|
|
24825
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24899
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#80
|
24826
24900
|
def on_kwbegin(node); end
|
24827
24901
|
|
24828
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24902
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#71
|
24829
24903
|
def on_numblock(node); end
|
24830
24904
|
|
24831
24905
|
private
|
24832
24906
|
|
24833
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24907
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#200
|
24908
|
+
def autocorrect_nonmutating_send(corrector, node, suggestion); end
|
24909
|
+
|
24910
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#196
|
24911
|
+
def autocorrect_void_expression(corrector, node); end
|
24912
|
+
|
24913
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#188
|
24914
|
+
def autocorrect_void_literal(corrector, node); end
|
24915
|
+
|
24916
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#172
|
24917
|
+
def autocorrect_void_op(corrector, node); end
|
24918
|
+
|
24919
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#192
|
24920
|
+
def autocorrect_void_self(corrector, node); end
|
24921
|
+
|
24922
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#184
|
24923
|
+
def autocorrect_void_var(corrector, node); end
|
24924
|
+
|
24925
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#87
|
24834
24926
|
def check_begin(node); end
|
24835
24927
|
|
24836
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24928
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#93
|
24837
24929
|
def check_expression(expr); end
|
24838
24930
|
|
24839
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24931
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#122
|
24840
24932
|
def check_literal(node); end
|
24841
24933
|
|
24842
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24934
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#146
|
24843
24935
|
def check_nonmutating(node); end
|
24844
24936
|
|
24845
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24937
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#130
|
24846
24938
|
def check_self(node); end
|
24847
24939
|
|
24848
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24940
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#113
|
24849
24941
|
def check_var(node); end
|
24850
24942
|
|
24851
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24943
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#138
|
24852
24944
|
def check_void_expression(node); end
|
24853
24945
|
|
24854
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24946
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#104
|
24855
24947
|
def check_void_op(node); end
|
24856
24948
|
|
24857
24949
|
# @return [Boolean]
|
24858
24950
|
#
|
24859
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24951
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#164
|
24860
24952
|
def in_void_context?(node); end
|
24861
24953
|
end
|
24862
24954
|
|
24863
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24955
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#55
|
24864
24956
|
RuboCop::Cop::Lint::Void::BINARY_OPERATORS = T.let(T.unsafe(nil), Array)
|
24865
24957
|
|
24866
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24958
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#52
|
24867
24959
|
RuboCop::Cop::Lint::Void::EXPRESSION_MSG = T.let(T.unsafe(nil), String)
|
24868
24960
|
|
24869
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24961
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#50
|
24870
24962
|
RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String)
|
24871
24963
|
|
24872
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24964
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#66
|
24873
24965
|
RuboCop::Cop::Lint::Void::METHODS_REPLACEABLE_BY_EACH = T.let(T.unsafe(nil), Array)
|
24874
24966
|
|
24875
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24967
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#68
|
24876
24968
|
RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array)
|
24877
24969
|
|
24878
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24970
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#59
|
24879
24971
|
RuboCop::Cop::Lint::Void::NONMUTATING_METHODS_WITH_BANG_VERSION = T.let(T.unsafe(nil), Array)
|
24880
24972
|
|
24881
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24973
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#53
|
24882
24974
|
RuboCop::Cop::Lint::Void::NONMUTATING_MSG = T.let(T.unsafe(nil), String)
|
24883
24975
|
|
24884
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24976
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#57
|
24885
24977
|
RuboCop::Cop::Lint::Void::OPERATORS = T.let(T.unsafe(nil), Array)
|
24886
24978
|
|
24887
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24979
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#48
|
24888
24980
|
RuboCop::Cop::Lint::Void::OP_MSG = T.let(T.unsafe(nil), String)
|
24889
24981
|
|
24890
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24982
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#51
|
24891
24983
|
RuboCop::Cop::Lint::Void::SELF_MSG = T.let(T.unsafe(nil), String)
|
24892
24984
|
|
24893
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24985
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#56
|
24894
24986
|
RuboCop::Cop::Lint::Void::UNARY_OPERATORS = T.let(T.unsafe(nil), Array)
|
24895
24987
|
|
24896
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24988
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#49
|
24897
24989
|
RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String)
|
24898
24990
|
|
24899
|
-
# source://rubocop//lib/rubocop/cop/lint/void.rb#
|
24991
|
+
# source://rubocop//lib/rubocop/cop/lint/void.rb#58
|
24900
24992
|
RuboCop::Cop::Lint::Void::VOID_CONTEXT_TYPES = T.let(T.unsafe(nil), Array)
|
24901
24993
|
|
24902
24994
|
# Common functionality for obtaining source ranges from regexp matches
|
@@ -27432,54 +27524,55 @@ end
|
|
27432
27524
|
# @_foo ||= calculate_expensive_thing
|
27433
27525
|
# end
|
27434
27526
|
#
|
27435
|
-
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#
|
27527
|
+
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#148
|
27436
27528
|
class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base
|
27437
27529
|
include ::RuboCop::Cop::ConfigurableEnforcedStyle
|
27530
|
+
extend ::RuboCop::Cop::AutoCorrector
|
27438
27531
|
|
27439
|
-
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#
|
27532
|
+
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#197
|
27440
27533
|
def defined_memoized?(param0 = T.unsafe(nil), param1); end
|
27441
27534
|
|
27442
|
-
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#
|
27535
|
+
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#160
|
27443
27536
|
def method_definition?(param0 = T.unsafe(nil)); end
|
27444
27537
|
|
27445
27538
|
# @return [Boolean]
|
27446
27539
|
#
|
27447
|
-
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#
|
27540
|
+
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#205
|
27448
27541
|
def on_defined?(node); end
|
27449
27542
|
|
27450
|
-
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#
|
27543
|
+
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#170
|
27451
27544
|
def on_or_asgn(node); end
|
27452
27545
|
|
27453
27546
|
private
|
27454
27547
|
|
27455
|
-
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#
|
27548
|
+
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#242
|
27456
27549
|
def find_definition(node); end
|
27457
27550
|
|
27458
27551
|
# @return [Boolean]
|
27459
27552
|
#
|
27460
|
-
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#
|
27553
|
+
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#253
|
27461
27554
|
def matches?(method_name, ivar_assign); end
|
27462
27555
|
|
27463
|
-
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#
|
27556
|
+
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#263
|
27464
27557
|
def message(variable); end
|
27465
27558
|
|
27466
|
-
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#
|
27559
|
+
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#238
|
27467
27560
|
def style_parameter_name; end
|
27468
27561
|
|
27469
|
-
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#
|
27562
|
+
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#271
|
27470
27563
|
def suggested_var(method_name); end
|
27471
27564
|
|
27472
|
-
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#
|
27565
|
+
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#277
|
27473
27566
|
def variable_name_candidates(method_name); end
|
27474
27567
|
end
|
27475
27568
|
|
27476
|
-
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#
|
27569
|
+
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#157
|
27477
27570
|
RuboCop::Cop::Naming::MemoizedInstanceVariableName::DYNAMIC_DEFINE_METHODS = T.let(T.unsafe(nil), Set)
|
27478
27571
|
|
27479
|
-
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#
|
27572
|
+
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#153
|
27480
27573
|
RuboCop::Cop::Naming::MemoizedInstanceVariableName::MSG = T.let(T.unsafe(nil), String)
|
27481
27574
|
|
27482
|
-
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#
|
27575
|
+
# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#155
|
27483
27576
|
RuboCop::Cop::Naming::MemoizedInstanceVariableName::UNDERSCORE_REQUIRED = T.let(T.unsafe(nil), String)
|
27484
27577
|
|
27485
27578
|
# Makes sure that all methods use the configured style,
|
@@ -27751,36 +27844,39 @@ class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base
|
|
27751
27844
|
|
27752
27845
|
private
|
27753
27846
|
|
27754
|
-
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#
|
27847
|
+
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#96
|
27848
|
+
def autocorrect(corrector, node, range, offending_name, preferred_name); end
|
27849
|
+
|
27850
|
+
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#116
|
27755
27851
|
def correct_node(corrector, node, offending_name, preferred_name); end
|
27756
27852
|
|
27757
27853
|
# If the exception variable is reassigned, that assignment needs to be corrected.
|
27758
27854
|
# Further `lvar` nodes will not be corrected though since they now refer to a
|
27759
27855
|
# different variable.
|
27760
27856
|
#
|
27761
|
-
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#
|
27857
|
+
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#134
|
27762
27858
|
def correct_reassignment(corrector, node, offending_name, preferred_name); end
|
27763
27859
|
|
27764
|
-
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#
|
27860
|
+
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#159
|
27765
27861
|
def message(node); end
|
27766
27862
|
|
27767
|
-
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#
|
27863
|
+
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#91
|
27768
27864
|
def offense_range(resbody); end
|
27769
27865
|
|
27770
|
-
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#
|
27866
|
+
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#143
|
27771
27867
|
def preferred_name(variable_name); end
|
27772
27868
|
|
27773
27869
|
# @return [Boolean]
|
27774
27870
|
#
|
27775
|
-
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#
|
27871
|
+
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#165
|
27776
27872
|
def shadowed_variable_name?(node); end
|
27777
27873
|
|
27778
|
-
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#
|
27874
|
+
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#152
|
27779
27875
|
def variable_name(node); end
|
27780
27876
|
|
27781
27877
|
# @return [Boolean]
|
27782
27878
|
#
|
27783
|
-
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#
|
27879
|
+
# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#106
|
27784
27880
|
def variable_name_matches?(node, name); end
|
27785
27881
|
end
|
27786
27882
|
|
@@ -27802,11 +27898,14 @@ RuboCop::Cop::Naming::RescuedExceptionsVariableName::MSG = T.let(T.unsafe(nil),
|
|
27802
27898
|
#
|
27803
27899
|
# # good
|
27804
27900
|
# fooBar = 1
|
27901
|
+
# @example AllowedIdentifiers: ['fooBar']
|
27902
|
+
# # good (with EnforcedStyle: snake_case)
|
27903
|
+
# fooBar = 1
|
27805
27904
|
# @example AllowedPatterns: ['_v\d+\z']
|
27806
|
-
# # good
|
27905
|
+
# # good (with EnforcedStyle: camelCase)
|
27807
27906
|
# :release_v1
|
27808
27907
|
#
|
27809
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27908
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#31
|
27810
27909
|
class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base
|
27811
27910
|
include ::RuboCop::Cop::AllowedIdentifiers
|
27812
27911
|
include ::RuboCop::Cop::ConfigurableEnforcedStyle
|
@@ -27814,51 +27913,51 @@ class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base
|
|
27814
27913
|
include ::RuboCop::Cop::ConfigurableNaming
|
27815
27914
|
include ::RuboCop::Cop::AllowedPattern
|
27816
27915
|
|
27817
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27916
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27818
27917
|
def on_arg(node); end
|
27819
27918
|
|
27820
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27919
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27821
27920
|
def on_blockarg(node); end
|
27822
27921
|
|
27823
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27922
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27824
27923
|
def on_cvasgn(node); end
|
27825
27924
|
|
27826
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27925
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27827
27926
|
def on_ivasgn(node); end
|
27828
27927
|
|
27829
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27928
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27830
27929
|
def on_kwarg(node); end
|
27831
27930
|
|
27832
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27931
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27833
27932
|
def on_kwoptarg(node); end
|
27834
27933
|
|
27835
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27934
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27836
27935
|
def on_kwrestarg(node); end
|
27837
27936
|
|
27838
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27937
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27839
27938
|
def on_lvar(node); end
|
27840
27939
|
|
27841
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27940
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27842
27941
|
def on_lvasgn(node); end
|
27843
27942
|
|
27844
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27943
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27845
27944
|
def on_optarg(node); end
|
27846
27945
|
|
27847
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27946
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27848
27947
|
def on_restarg(node); end
|
27849
27948
|
|
27850
27949
|
# @return [Boolean]
|
27851
27950
|
#
|
27852
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27951
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#38
|
27853
27952
|
def valid_name?(node, name, given_style = T.unsafe(nil)); end
|
27854
27953
|
|
27855
27954
|
private
|
27856
27955
|
|
27857
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27956
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#62
|
27858
27957
|
def message(style); end
|
27859
27958
|
end
|
27860
27959
|
|
27861
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27960
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#36
|
27862
27961
|
RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String)
|
27863
27962
|
|
27864
27963
|
# Makes sure that all numbered variables use the
|
@@ -29919,29 +30018,29 @@ class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base
|
|
29919
30018
|
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#71
|
29920
30019
|
def check(send_node); end
|
29921
30020
|
|
29922
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30021
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#114
|
29923
30022
|
def class_send_elements(class_node); end
|
29924
30023
|
|
29925
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30024
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#157
|
29926
30025
|
def group_accessors(node, accessors); end
|
29927
30026
|
|
29928
30027
|
# @return [Boolean]
|
29929
30028
|
#
|
29930
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30029
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#96
|
29931
30030
|
def groupable_accessor?(node); end
|
29932
30031
|
|
29933
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30032
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#134
|
29934
30033
|
def groupable_sibling_accessors(send_node); end
|
29935
30034
|
|
29936
30035
|
# @return [Boolean]
|
29937
30036
|
#
|
29938
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30037
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#126
|
29939
30038
|
def grouped_style?; end
|
29940
30039
|
|
29941
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30040
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#143
|
29942
30041
|
def message(send_node); end
|
29943
30042
|
|
29944
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30043
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#148
|
29945
30044
|
def preferred_accessors(node); end
|
29946
30045
|
|
29947
30046
|
# @return [Boolean]
|
@@ -29949,12 +30048,12 @@ class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base
|
|
29949
30048
|
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#91
|
29950
30049
|
def previous_line_comment?(node); end
|
29951
30050
|
|
29952
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30051
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#163
|
29953
30052
|
def separate_accessors(node); end
|
29954
30053
|
|
29955
30054
|
# @return [Boolean]
|
29956
30055
|
#
|
29957
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30056
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#130
|
29958
30057
|
def separated_style?; end
|
29959
30058
|
end
|
29960
30059
|
|
@@ -30438,7 +30537,7 @@ class RuboCop::Cop::Style::Attr < ::RuboCop::Cop::Base
|
|
30438
30537
|
include ::RuboCop::Cop::RangeHelp
|
30439
30538
|
extend ::RuboCop::Cop::AutoCorrector
|
30440
30539
|
|
30441
|
-
# source://rubocop//lib/rubocop/cop/style/attr.rb#
|
30540
|
+
# source://rubocop//lib/rubocop/cop/style/attr.rb#74
|
30442
30541
|
def class_eval?(param0 = T.unsafe(nil)); end
|
30443
30542
|
|
30444
30543
|
# source://rubocop//lib/rubocop/cop/style/attr.rb#24
|
@@ -30446,13 +30545,23 @@ class RuboCop::Cop::Style::Attr < ::RuboCop::Cop::Base
|
|
30446
30545
|
|
30447
30546
|
private
|
30448
30547
|
|
30548
|
+
# @return [Boolean]
|
30549
|
+
#
|
30449
30550
|
# source://rubocop//lib/rubocop/cop/style/attr.rb#37
|
30551
|
+
def allowed_context?(node); end
|
30552
|
+
|
30553
|
+
# source://rubocop//lib/rubocop/cop/style/attr.rb#47
|
30450
30554
|
def autocorrect(corrector, node); end
|
30451
30555
|
|
30452
|
-
#
|
30556
|
+
# @return [Boolean]
|
30557
|
+
#
|
30558
|
+
# source://rubocop//lib/rubocop/cop/style/attr.rb#43
|
30559
|
+
def define_attr_method?(node); end
|
30560
|
+
|
30561
|
+
# source://rubocop//lib/rubocop/cop/style/attr.rb#59
|
30453
30562
|
def message(node); end
|
30454
30563
|
|
30455
|
-
# source://rubocop//lib/rubocop/cop/style/attr.rb#
|
30564
|
+
# source://rubocop//lib/rubocop/cop/style/attr.rb#63
|
30456
30565
|
def replacement_method(node); end
|
30457
30566
|
end
|
30458
30567
|
|
@@ -31800,7 +31909,9 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
|
31800
31909
|
# @example
|
31801
31910
|
# # bad
|
31802
31911
|
# array.reject(&:nil?)
|
31912
|
+
# array.delete_if(&:nil?)
|
31803
31913
|
# array.reject { |e| e.nil? }
|
31914
|
+
# array.delete_if { |e| e.nil? }
|
31804
31915
|
# array.select { |e| !e.nil? }
|
31805
31916
|
#
|
31806
31917
|
# # good
|
@@ -31813,49 +31924,53 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
|
31813
31924
|
#
|
31814
31925
|
# # good
|
31815
31926
|
# hash.compact!
|
31927
|
+
# @example AllowedReceivers: ['params']
|
31928
|
+
# # good
|
31929
|
+
# params.reject(&:nil?)
|
31816
31930
|
#
|
31817
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31931
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#42
|
31818
31932
|
class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base
|
31933
|
+
include ::RuboCop::Cop::AllowedReceivers
|
31819
31934
|
include ::RuboCop::Cop::RangeHelp
|
31820
31935
|
extend ::RuboCop::Cop::AutoCorrector
|
31821
31936
|
extend ::RuboCop::Cop::TargetRubyVersion
|
31822
31937
|
|
31823
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31938
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#82
|
31824
31939
|
def on_send(node); end
|
31825
31940
|
|
31826
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31941
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#62
|
31827
31942
|
def reject_method?(param0 = T.unsafe(nil)); end
|
31828
31943
|
|
31829
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31944
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#55
|
31830
31945
|
def reject_method_with_block_pass?(param0 = T.unsafe(nil)); end
|
31831
31946
|
|
31832
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31947
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#72
|
31833
31948
|
def select_method?(param0 = T.unsafe(nil)); end
|
31834
31949
|
|
31835
31950
|
private
|
31836
31951
|
|
31837
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31952
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#119
|
31838
31953
|
def good_method_name(node); end
|
31839
31954
|
|
31840
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31955
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#97
|
31841
31956
|
def offense_range(node); end
|
31842
31957
|
|
31843
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31958
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#127
|
31844
31959
|
def range(begin_pos_node, end_pos_node); end
|
31845
31960
|
|
31846
31961
|
# @return [Boolean]
|
31847
31962
|
#
|
31848
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31963
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#113
|
31849
31964
|
def to_enum_method?(node); end
|
31850
31965
|
end
|
31851
31966
|
|
31852
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31967
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#48
|
31853
31968
|
RuboCop::Cop::Style::CollectionCompact::MSG = T.let(T.unsafe(nil), String)
|
31854
31969
|
|
31855
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31970
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#49
|
31856
31971
|
RuboCop::Cop::Style::CollectionCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
31857
31972
|
|
31858
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31973
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#50
|
31859
31974
|
RuboCop::Cop::Style::CollectionCompact::TO_ENUM_METHODS = T.let(T.unsafe(nil), Array)
|
31860
31975
|
|
31861
31976
|
# Enforces the use of consistent method names
|
@@ -31925,8 +32040,8 @@ end
|
|
31925
32040
|
# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#45
|
31926
32041
|
RuboCop::Cop::Style::CollectionMethods::MSG = T.let(T.unsafe(nil), String)
|
31927
32042
|
|
31928
|
-
# Checks for methods invoked via the
|
31929
|
-
# of the
|
32043
|
+
# Checks for methods invoked via the `::` operator instead
|
32044
|
+
# of the `.` operator (like `FileUtils::rmdir` instead of `FileUtils.rmdir`).
|
31930
32045
|
#
|
31931
32046
|
# @example
|
31932
32047
|
# # bad
|
@@ -32036,29 +32151,40 @@ RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String)
|
|
32036
32151
|
#
|
32037
32152
|
# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#59
|
32038
32153
|
class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base
|
32039
|
-
|
32154
|
+
include ::RuboCop::Cop::RangeHelp
|
32155
|
+
extend ::RuboCop::Cop::AutoCorrector
|
32156
|
+
|
32157
|
+
# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#66
|
32040
32158
|
def on_block(node); end
|
32041
32159
|
|
32042
|
-
# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#
|
32160
|
+
# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#78
|
32043
32161
|
def on_for(node); end
|
32044
32162
|
|
32045
|
-
# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#
|
32163
|
+
# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#66
|
32046
32164
|
def on_numblock(node); end
|
32047
32165
|
|
32048
32166
|
private
|
32049
32167
|
|
32050
32168
|
# @return [Boolean]
|
32051
32169
|
#
|
32052
|
-
# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#
|
32170
|
+
# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#89
|
32053
32171
|
def collection_looping_method?(node); end
|
32054
32172
|
|
32173
|
+
# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#105
|
32174
|
+
def combine_with_left_sibling(corrector, node); end
|
32175
|
+
|
32176
|
+
# @return [Boolean]
|
32177
|
+
#
|
32178
|
+
# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#94
|
32179
|
+
def same_collection_looping_block?(node, sibling); end
|
32180
|
+
|
32055
32181
|
# @return [Boolean]
|
32056
32182
|
#
|
32057
|
-
# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#
|
32058
|
-
def
|
32183
|
+
# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#101
|
32184
|
+
def same_collection_looping_for?(node, sibling); end
|
32059
32185
|
end
|
32060
32186
|
|
32061
|
-
# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#
|
32187
|
+
# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64
|
32062
32188
|
RuboCop::Cop::Style::CombinableLoops::MSG = T.let(T.unsafe(nil), String)
|
32063
32189
|
|
32064
32190
|
# Enforces using `` or %x around command literals.
|
@@ -32928,53 +33054,53 @@ end
|
|
32928
33054
|
# source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#48
|
32929
33055
|
RuboCop::Cop::Style::ConstantVisibility::MSG = T.let(T.unsafe(nil), String)
|
32930
33056
|
|
32931
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
33057
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#21
|
32932
33058
|
class RuboCop::Cop::Style::Copyright < ::RuboCop::Cop::Base
|
32933
33059
|
include ::RuboCop::Cop::RangeHelp
|
32934
33060
|
extend ::RuboCop::Cop::AutoCorrector
|
32935
33061
|
|
32936
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
33062
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#28
|
32937
33063
|
def on_new_investigation; end
|
32938
33064
|
|
32939
33065
|
private
|
32940
33066
|
|
32941
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
33067
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#47
|
32942
33068
|
def autocorrect_notice; end
|
32943
33069
|
|
32944
33070
|
# @return [Boolean]
|
32945
33071
|
#
|
32946
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
33072
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#78
|
32947
33073
|
def encoding_token?(processed_source, token_index); end
|
32948
33074
|
|
32949
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
33075
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#64
|
32950
33076
|
def insert_notice_before(processed_source); end
|
32951
33077
|
|
32952
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
33078
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#43
|
32953
33079
|
def notice; end
|
32954
33080
|
|
32955
33081
|
# @return [Boolean]
|
32956
33082
|
#
|
32957
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
33083
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#85
|
32958
33084
|
def notice_found?(processed_source); end
|
32959
33085
|
|
32960
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
33086
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#51
|
32961
33087
|
def offense_range; end
|
32962
33088
|
|
32963
33089
|
# @return [Boolean]
|
32964
33090
|
#
|
32965
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
33091
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#71
|
32966
33092
|
def shebang_token?(processed_source, token_index); end
|
32967
33093
|
|
32968
33094
|
# @raise [Warning]
|
32969
33095
|
#
|
32970
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
33096
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#55
|
32971
33097
|
def verify_autocorrect_notice!; end
|
32972
33098
|
end
|
32973
33099
|
|
32974
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
33100
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#26
|
32975
33101
|
RuboCop::Cop::Style::Copyright::AUTOCORRECT_EMPTY_WARNING = T.let(T.unsafe(nil), String)
|
32976
33102
|
|
32977
|
-
# source://rubocop//lib/rubocop/cop/style/copyright.rb#
|
33103
|
+
# source://rubocop//lib/rubocop/cop/style/copyright.rb#25
|
32978
33104
|
RuboCop::Cop::Style::Copyright::MSG = T.let(T.unsafe(nil), String)
|
32979
33105
|
|
32980
33106
|
# Checks for inheritance from `Data.define` to avoid creating the anonymous parent class.
|
@@ -34799,6 +34925,52 @@ RuboCop::Cop::Style::EvenOdd::MSG = T.let(T.unsafe(nil), String)
|
|
34799
34925
|
# source://rubocop//lib/rubocop/cop/style/even_odd.rb#22
|
34800
34926
|
RuboCop::Cop::Style::EvenOdd::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
34801
34927
|
|
34928
|
+
# Checks for exact regexp match inside Regexp literals.
|
34929
|
+
#
|
34930
|
+
# @example
|
34931
|
+
#
|
34932
|
+
# # bad
|
34933
|
+
# string =~ /\Astring\z/
|
34934
|
+
# string === /\Astring\z/
|
34935
|
+
# string.match(/\Astring\z/)
|
34936
|
+
# string.match?(/\Astring\z/)
|
34937
|
+
#
|
34938
|
+
# # good
|
34939
|
+
# string == 'string'
|
34940
|
+
#
|
34941
|
+
# # bad
|
34942
|
+
# string !~ /\Astring\z/
|
34943
|
+
#
|
34944
|
+
# # good
|
34945
|
+
# string != 'string'
|
34946
|
+
#
|
34947
|
+
# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#25
|
34948
|
+
class RuboCop::Cop::Style::ExactRegexpMatch < ::RuboCop::Cop::Base
|
34949
|
+
extend ::RuboCop::Cop::AutoCorrector
|
34950
|
+
|
34951
|
+
# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#32
|
34952
|
+
def exact_regexp_match(param0 = T.unsafe(nil)); end
|
34953
|
+
|
34954
|
+
# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#40
|
34955
|
+
def on_send(node); end
|
34956
|
+
|
34957
|
+
private
|
34958
|
+
|
34959
|
+
# @return [Boolean]
|
34960
|
+
#
|
34961
|
+
# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#55
|
34962
|
+
def exact_match_pattern?(parsed_regexp); end
|
34963
|
+
|
34964
|
+
# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#62
|
34965
|
+
def new_method(node); end
|
34966
|
+
end
|
34967
|
+
|
34968
|
+
# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#28
|
34969
|
+
RuboCop::Cop::Style::ExactRegexpMatch::MSG = T.let(T.unsafe(nil), String)
|
34970
|
+
|
34971
|
+
# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#29
|
34972
|
+
RuboCop::Cop::Style::ExactRegexpMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
34973
|
+
|
34802
34974
|
# Checks for use of the `File.expand_path` arguments.
|
34803
34975
|
# Likewise, it also checks for the `Pathname.new` argument.
|
34804
34976
|
#
|
@@ -36088,28 +36260,28 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base
|
|
36088
36260
|
|
36089
36261
|
# @return [Boolean]
|
36090
36262
|
#
|
36091
|
-
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#
|
36263
|
+
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#249
|
36092
36264
|
def accepted_form?(node, ending: T.unsafe(nil)); end
|
36093
36265
|
|
36094
36266
|
# @return [Boolean]
|
36095
36267
|
#
|
36096
|
-
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#
|
36268
|
+
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#257
|
36097
36269
|
def accepted_if?(node, ending); end
|
36098
36270
|
|
36099
36271
|
# @return [Boolean]
|
36100
36272
|
#
|
36101
|
-
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#
|
36273
|
+
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#271
|
36102
36274
|
def allowed_consecutive_conditionals?; end
|
36103
36275
|
|
36104
36276
|
# @return [Boolean]
|
36105
36277
|
#
|
36106
|
-
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#
|
36278
|
+
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#239
|
36107
36279
|
def and_or_guard_clause?(guard_clause); end
|
36108
36280
|
|
36109
36281
|
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#184
|
36110
36282
|
def autocorrect(corrector, node, condition, replacement, guard); end
|
36111
36283
|
|
36112
|
-
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#
|
36284
|
+
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#210
|
36113
36285
|
def autocorrect_heredoc_argument(corrector, node, heredoc_branch, leave_branch, guard); end
|
36114
36286
|
|
36115
36287
|
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#133
|
@@ -36123,31 +36295,31 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base
|
|
36123
36295
|
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#154
|
36124
36296
|
def consecutive_conditionals?(parent, node); end
|
36125
36297
|
|
36126
|
-
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#
|
36298
|
+
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#231
|
36127
36299
|
def guard_clause_source(guard_clause); end
|
36128
36300
|
|
36129
36301
|
# @return [Boolean]
|
36130
36302
|
#
|
36131
|
-
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#
|
36303
|
+
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#206
|
36132
36304
|
def heredoc?(argument); end
|
36133
36305
|
|
36134
|
-
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#
|
36306
|
+
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#222
|
36135
36307
|
def range_of_branch_to_remove(node, guard); end
|
36136
36308
|
|
36137
36309
|
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#162
|
36138
36310
|
def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end
|
36139
36311
|
|
36140
|
-
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#
|
36312
|
+
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#267
|
36141
36313
|
def remove_whole_lines(corrector, range); end
|
36142
36314
|
|
36143
36315
|
# @return [Boolean]
|
36144
36316
|
#
|
36145
|
-
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#
|
36317
|
+
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#244
|
36146
36318
|
def too_long_for_single_line?(node, example); end
|
36147
36319
|
|
36148
36320
|
# @return [Boolean]
|
36149
36321
|
#
|
36150
|
-
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#
|
36322
|
+
# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#253
|
36151
36323
|
def trivial?(node); end
|
36152
36324
|
end
|
36153
36325
|
|
@@ -36323,68 +36495,58 @@ RuboCop::Cop::Style::HashConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr
|
|
36323
36495
|
#
|
36324
36496
|
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#30
|
36325
36497
|
class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base
|
36498
|
+
include ::RuboCop::Cop::AllowedReceivers
|
36326
36499
|
include ::RuboCop::Cop::Lint::UnusedArgument
|
36327
36500
|
extend ::RuboCop::Cop::AutoCorrector
|
36328
36501
|
|
36329
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36502
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#38
|
36330
36503
|
def kv_each(param0 = T.unsafe(nil)); end
|
36331
36504
|
|
36332
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36505
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#43
|
36333
36506
|
def kv_each_with_block_pass(param0 = T.unsafe(nil)); end
|
36334
36507
|
|
36335
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36508
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#47
|
36336
36509
|
def on_block(node); end
|
36337
36510
|
|
36338
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36511
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#55
|
36339
36512
|
def on_block_pass(node); end
|
36340
36513
|
|
36341
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36514
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#47
|
36342
36515
|
def on_numblock(node); end
|
36343
36516
|
|
36344
36517
|
private
|
36345
36518
|
|
36346
|
-
#
|
36347
|
-
#
|
36348
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#120
|
36349
|
-
def allowed_receiver?(receiver); end
|
36350
|
-
|
36351
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#138
|
36352
|
-
def allowed_receivers; end
|
36353
|
-
|
36354
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#85
|
36519
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#86
|
36355
36520
|
def check_argument(variable); end
|
36356
36521
|
|
36357
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36522
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#110
|
36358
36523
|
def correct_args(node, corrector); end
|
36359
36524
|
|
36360
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36525
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#96
|
36361
36526
|
def correct_implicit(node, corrector, method_name); end
|
36362
36527
|
|
36363
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36528
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#101
|
36364
36529
|
def correct_key_value_each(node, corrector); end
|
36365
36530
|
|
36366
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36531
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#82
|
36367
36532
|
def format_message(method_name); end
|
36368
36533
|
|
36369
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36534
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#117
|
36370
36535
|
def kv_range(outer_node); end
|
36371
36536
|
|
36372
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36373
|
-
def receiver_name(receiver); end
|
36374
|
-
|
36375
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#62
|
36537
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#63
|
36376
36538
|
def register_kv_offense(target, method); end
|
36377
36539
|
|
36378
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36540
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#72
|
36379
36541
|
def register_kv_with_block_pass_offense(node, target, method); end
|
36380
36542
|
|
36381
36543
|
# @return [Boolean]
|
36382
36544
|
#
|
36383
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36545
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#92
|
36384
36546
|
def used?(arg); end
|
36385
36547
|
end
|
36386
36548
|
|
36387
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36549
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#35
|
36388
36550
|
RuboCop::Cop::Style::HashEachMethods::MSG = T.let(T.unsafe(nil), String)
|
36389
36551
|
|
36390
36552
|
# Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods
|
@@ -36429,42 +36591,42 @@ class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base
|
|
36429
36591
|
|
36430
36592
|
# @return [Boolean]
|
36431
36593
|
#
|
36432
|
-
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#
|
36594
|
+
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#93
|
36433
36595
|
def bad_method?(block); end
|
36434
36596
|
|
36435
|
-
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#
|
36597
|
+
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#165
|
36436
36598
|
def decorate_source(value); end
|
36437
36599
|
|
36438
|
-
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#
|
36600
|
+
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#173
|
36439
36601
|
def except_key(node); end
|
36440
36602
|
|
36441
|
-
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#
|
36603
|
+
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#152
|
36442
36604
|
def except_key_source(key); end
|
36443
36605
|
|
36444
|
-
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#
|
36606
|
+
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#146
|
36445
36607
|
def extract_body_if_negated(body); end
|
36446
36608
|
|
36447
36609
|
# @return [Boolean]
|
36448
36610
|
#
|
36449
|
-
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#
|
36611
|
+
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#127
|
36450
36612
|
def included?(negated, body); end
|
36451
36613
|
|
36452
36614
|
# @return [Boolean]
|
36453
36615
|
#
|
36454
|
-
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#
|
36616
|
+
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#131
|
36455
36617
|
def not_included?(negated, body); end
|
36456
36618
|
|
36457
|
-
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#
|
36619
|
+
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#182
|
36458
36620
|
def offense_range(node); end
|
36459
36621
|
|
36460
36622
|
# @return [Boolean]
|
36461
36623
|
#
|
36462
|
-
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#
|
36624
|
+
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#135
|
36463
36625
|
def safe_to_register_offense?(block, except_key); end
|
36464
36626
|
|
36465
36627
|
# @return [Boolean]
|
36466
36628
|
#
|
36467
|
-
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#
|
36629
|
+
# source://rubocop//lib/rubocop/cop/style/hash_except.rb#111
|
36468
36630
|
def semantically_except_method?(send, block); end
|
36469
36631
|
end
|
36470
36632
|
|
@@ -37020,43 +37182,43 @@ class RuboCop::Cop::Style::IfInsideElse < ::RuboCop::Cop::Base
|
|
37020
37182
|
include ::RuboCop::Cop::RangeHelp
|
37021
37183
|
extend ::RuboCop::Cop::AutoCorrector
|
37022
37184
|
|
37023
|
-
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#
|
37185
|
+
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#69
|
37024
37186
|
def on_if(node); end
|
37025
37187
|
|
37026
37188
|
private
|
37027
37189
|
|
37028
37190
|
# @return [Boolean]
|
37029
37191
|
#
|
37030
|
-
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#
|
37192
|
+
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#150
|
37031
37193
|
def allow_if_modifier?; end
|
37032
37194
|
|
37033
37195
|
# @return [Boolean]
|
37034
37196
|
#
|
37035
|
-
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#
|
37197
|
+
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#146
|
37036
37198
|
def allow_if_modifier_in_else_branch?(else_branch); end
|
37037
37199
|
|
37038
|
-
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#
|
37200
|
+
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#88
|
37039
37201
|
def autocorrect(corrector, node); end
|
37040
37202
|
|
37041
|
-
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#
|
37203
|
+
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#117
|
37042
37204
|
def correct_to_elsif_from_if_inside_else_form(corrector, node, condition); end
|
37043
37205
|
|
37044
|
-
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#
|
37206
|
+
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#109
|
37045
37207
|
def correct_to_elsif_from_modifier_form(corrector, node); end
|
37046
37208
|
|
37047
|
-
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#
|
37209
|
+
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#135
|
37048
37210
|
def find_end_range(node); end
|
37049
37211
|
|
37050
|
-
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#
|
37212
|
+
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#142
|
37051
37213
|
def if_condition_range(node, condition); end
|
37052
37214
|
|
37053
37215
|
# @return [Boolean]
|
37054
37216
|
#
|
37055
|
-
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#
|
37217
|
+
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#131
|
37056
37218
|
def then?(node); end
|
37057
37219
|
end
|
37058
37220
|
|
37059
|
-
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#
|
37221
|
+
# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#66
|
37060
37222
|
RuboCop::Cop::Style::IfInsideElse::MSG = T.let(T.unsafe(nil), String)
|
37061
37223
|
|
37062
37224
|
# Checks for `if` and `unless` statements that would fit on one line if
|
@@ -37132,103 +37294,103 @@ class RuboCop::Cop::Style::IfUnlessModifier < ::RuboCop::Cop::Base
|
|
37132
37294
|
|
37133
37295
|
private
|
37134
37296
|
|
37135
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37297
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#171
|
37136
37298
|
def allowed_patterns; end
|
37137
37299
|
|
37138
37300
|
# @return [Boolean]
|
37139
37301
|
#
|
37140
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37302
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#231
|
37141
37303
|
def another_statement_on_same_line?(node); end
|
37142
37304
|
|
37143
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37305
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#132
|
37144
37306
|
def autocorrect(corrector, node); end
|
37145
37307
|
|
37146
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37308
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#285
|
37147
37309
|
def comment_on_node_line(node); end
|
37148
37310
|
|
37149
37311
|
# @return [Boolean]
|
37150
37312
|
#
|
37151
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37313
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#104
|
37152
37314
|
def defined_argument_is_undefined?(if_node, defined_node); end
|
37153
37315
|
|
37154
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37316
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#96
|
37155
37317
|
def defined_nodes(condition); end
|
37156
37318
|
|
37157
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37319
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#272
|
37158
37320
|
def extract_heredoc_from(last_argument); end
|
37159
37321
|
|
37160
37322
|
# @return [Boolean]
|
37161
37323
|
#
|
37162
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37324
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#215
|
37163
37325
|
def line_length_enabled_at_line?(line); end
|
37164
37326
|
|
37165
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37327
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#124
|
37166
37328
|
def message(node); end
|
37167
37329
|
|
37168
37330
|
# @return [Boolean]
|
37169
37331
|
#
|
37170
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37332
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#219
|
37171
37333
|
def named_capture_in_condition?(node); end
|
37172
37334
|
|
37173
37335
|
# @return [Boolean]
|
37174
37336
|
#
|
37175
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37337
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#223
|
37176
37338
|
def non_eligible_node?(node); end
|
37177
37339
|
|
37178
37340
|
# @return [Boolean]
|
37179
37341
|
#
|
37180
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37342
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#227
|
37181
37343
|
def non_simple_if_unless?(node); end
|
37182
37344
|
|
37183
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37345
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#114
|
37184
37346
|
def pattern_matching_nodes(condition); end
|
37185
37347
|
|
37186
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37348
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#289
|
37187
37349
|
def remove_comment(corrector, _node, comment); end
|
37188
37350
|
|
37189
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37351
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#279
|
37190
37352
|
def remove_heredoc(corrector, heredoc); end
|
37191
37353
|
|
37192
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37354
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#141
|
37193
37355
|
def replacement_for_modifier_form(corrector, node); end
|
37194
37356
|
|
37195
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37357
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#265
|
37196
37358
|
def to_modifier_form_with_move_comment(node, indentation, comment); end
|
37197
37359
|
|
37198
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37360
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#245
|
37199
37361
|
def to_normal_form(node, indentation); end
|
37200
37362
|
|
37201
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37363
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#253
|
37202
37364
|
def to_normal_form_with_heredoc(node, indentation, heredoc); end
|
37203
37365
|
|
37204
37366
|
# @return [Boolean]
|
37205
37367
|
#
|
37206
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37368
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#165
|
37207
37369
|
def too_long_due_to_comment_after_modifier?(node, comment); end
|
37208
37370
|
|
37209
37371
|
# @return [Boolean]
|
37210
37372
|
#
|
37211
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37373
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#160
|
37212
37374
|
def too_long_due_to_modifier?(node); end
|
37213
37375
|
|
37214
37376
|
# @return [Boolean]
|
37215
37377
|
#
|
37216
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37378
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#206
|
37217
37379
|
def too_long_line_based_on_allow_uri?(line); end
|
37218
37380
|
|
37219
37381
|
# @return [Boolean]
|
37220
37382
|
#
|
37221
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37383
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#189
|
37222
37384
|
def too_long_line_based_on_config?(range, line); end
|
37223
37385
|
|
37224
37386
|
# @return [Boolean]
|
37225
37387
|
#
|
37226
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37388
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#198
|
37227
37389
|
def too_long_line_based_on_ignore_cop_directives?(range, line); end
|
37228
37390
|
|
37229
37391
|
# @return [Boolean]
|
37230
37392
|
#
|
37231
|
-
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#
|
37393
|
+
# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#176
|
37232
37394
|
def too_long_single_line?(node); end
|
37233
37395
|
|
37234
37396
|
class << self
|
@@ -37718,12 +37880,16 @@ RuboCop::Cop::Style::InverseMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr
|
|
37718
37880
|
# Methods that can be inverted should be defined in `InverseMethods`. Note that
|
37719
37881
|
# the relationship of inverse methods needs to be defined in both directions.
|
37720
37882
|
# For example,
|
37721
|
-
# InverseMethods:
|
37722
|
-
# :!=: :==
|
37723
|
-
# :even?: :odd?
|
37724
|
-
# :odd?: :even?
|
37725
37883
|
#
|
37726
|
-
#
|
37884
|
+
# [source,yaml]
|
37885
|
+
# ----
|
37886
|
+
# InverseMethods:
|
37887
|
+
# :!=: :==
|
37888
|
+
# :even?: :odd?
|
37889
|
+
# :odd?: :even?
|
37890
|
+
# ----
|
37891
|
+
#
|
37892
|
+
# will suggest both `even?` and `odd?` to be inverted, but only `!=` (and not `==`).
|
37727
37893
|
#
|
37728
37894
|
# @example
|
37729
37895
|
# # bad (simple condition)
|
@@ -37747,36 +37913,36 @@ RuboCop::Cop::Style::InverseMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr
|
|
37747
37913
|
# # good (if)
|
37748
37914
|
# foo if !condition
|
37749
37915
|
#
|
37750
|
-
# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#
|
37916
|
+
# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#51
|
37751
37917
|
class RuboCop::Cop::Style::InvertibleUnlessCondition < ::RuboCop::Cop::Base
|
37752
37918
|
extend ::RuboCop::Cop::AutoCorrector
|
37753
37919
|
|
37754
|
-
# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#
|
37920
|
+
# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#56
|
37755
37921
|
def on_if(node); end
|
37756
37922
|
|
37757
37923
|
private
|
37758
37924
|
|
37759
|
-
# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#
|
37925
|
+
# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#91
|
37760
37926
|
def autocorrect(corrector, node); end
|
37761
37927
|
|
37762
|
-
# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#
|
37928
|
+
# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#104
|
37763
37929
|
def autocorrect_send_node(corrector, node); end
|
37764
37930
|
|
37765
37931
|
# @return [Boolean]
|
37766
37932
|
#
|
37767
|
-
# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#
|
37933
|
+
# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#85
|
37768
37934
|
def inheritance_check?(node); end
|
37769
37935
|
|
37770
|
-
# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#
|
37936
|
+
# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#112
|
37771
37937
|
def inverse_methods; end
|
37772
37938
|
|
37773
37939
|
# @return [Boolean]
|
37774
37940
|
#
|
37775
|
-
# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#
|
37941
|
+
# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#70
|
37776
37942
|
def invertible?(node); end
|
37777
37943
|
end
|
37778
37944
|
|
37779
|
-
# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#
|
37945
|
+
# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#54
|
37780
37946
|
RuboCop::Cop::Style::InvertibleUnlessCondition::MSG = T.let(T.unsafe(nil), String)
|
37781
37947
|
|
37782
37948
|
# Checks for hardcoded IP addresses, which can make code
|
@@ -38726,12 +38892,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38726
38892
|
|
38727
38893
|
# @return [Boolean]
|
38728
38894
|
#
|
38729
|
-
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#
|
38895
|
+
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#158
|
38730
38896
|
def allowed_chained_call_with_parentheses?(node); end
|
38731
38897
|
|
38732
38898
|
# @return [Boolean]
|
38733
38899
|
#
|
38734
|
-
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#
|
38900
|
+
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#154
|
38735
38901
|
def allowed_multiline_call_with_parentheses?(node); end
|
38736
38902
|
|
38737
38903
|
# @return [Boolean]
|
@@ -38741,17 +38907,17 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38741
38907
|
|
38742
38908
|
# @return [Boolean]
|
38743
38909
|
#
|
38744
|
-
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#
|
38910
|
+
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#167
|
38745
38911
|
def ambiguous_literal?(node); end
|
38746
38912
|
|
38747
38913
|
# @return [Boolean]
|
38748
38914
|
#
|
38749
|
-
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#
|
38915
|
+
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#196
|
38750
38916
|
def assigned_before?(node, target); end
|
38751
38917
|
|
38752
38918
|
# @return [Boolean]
|
38753
38919
|
#
|
38754
|
-
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#
|
38920
|
+
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#204
|
38755
38921
|
def assignment_in_condition?(node); end
|
38756
38922
|
|
38757
38923
|
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#31
|
@@ -38759,7 +38925,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38759
38925
|
|
38760
38926
|
# @return [Boolean]
|
38761
38927
|
#
|
38762
|
-
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#
|
38928
|
+
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#141
|
38763
38929
|
def call_as_argument_or_chain?(node); end
|
38764
38930
|
|
38765
38931
|
# @return [Boolean]
|
@@ -38794,17 +38960,17 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38794
38960
|
|
38795
38961
|
# @return [Boolean]
|
38796
38962
|
#
|
38797
|
-
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#
|
38963
|
+
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#214
|
38798
38964
|
def forwards_anonymous_rest_arguments?(node); end
|
38799
38965
|
|
38800
38966
|
# @return [Boolean]
|
38801
38967
|
#
|
38802
|
-
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#
|
38968
|
+
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#183
|
38803
38969
|
def hash_literal?(node); end
|
38804
38970
|
|
38805
38971
|
# @return [Boolean]
|
38806
38972
|
#
|
38807
|
-
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#
|
38973
|
+
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#147
|
38808
38974
|
def hash_literal_in_arguments?(node); end
|
38809
38975
|
|
38810
38976
|
# @return [Boolean]
|
@@ -38814,7 +38980,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38814
38980
|
|
38815
38981
|
# @return [Boolean]
|
38816
38982
|
#
|
38817
|
-
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#
|
38983
|
+
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#200
|
38818
38984
|
def inside_string_interpolation?(node); end
|
38819
38985
|
|
38820
38986
|
# Require hash value omission be enclosed in parentheses to prevent the following issue:
|
@@ -38832,7 +38998,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38832
38998
|
|
38833
38999
|
# @return [Boolean]
|
38834
39000
|
#
|
38835
|
-
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#
|
39001
|
+
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#179
|
38836
39002
|
def logical_operator?(node); end
|
38837
39003
|
|
38838
39004
|
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#40
|
@@ -38848,7 +39014,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38848
39014
|
|
38849
39015
|
# @return [Boolean]
|
38850
39016
|
#
|
38851
|
-
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#
|
39017
|
+
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#187
|
38852
39018
|
def regexp_slash_literal?(node); end
|
38853
39019
|
|
38854
39020
|
# @return [Boolean]
|
@@ -38858,7 +39024,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38858
39024
|
|
38859
39025
|
# @return [Boolean]
|
38860
39026
|
#
|
38861
|
-
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#
|
39027
|
+
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#171
|
38862
39028
|
def splat?(node); end
|
38863
39029
|
|
38864
39030
|
# @return [Boolean]
|
@@ -38873,12 +39039,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38873
39039
|
|
38874
39040
|
# @return [Boolean]
|
38875
39041
|
#
|
38876
|
-
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#
|
39042
|
+
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#175
|
38877
39043
|
def ternary_if?(node); end
|
38878
39044
|
|
38879
39045
|
# @return [Boolean]
|
38880
39046
|
#
|
38881
|
-
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#
|
39047
|
+
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#191
|
38882
39048
|
def unary_literal?(node); end
|
38883
39049
|
end
|
38884
39050
|
|
@@ -40154,70 +40320,79 @@ RuboCop::Cop::Style::MultilineWhenThen::MSG = T.let(T.unsafe(nil), String)
|
|
40154
40320
|
#
|
40155
40321
|
# # good
|
40156
40322
|
# foo if [b.lightweight, b.heavyweight].include?(a)
|
40323
|
+
# @example ComparisonsThreshold: 2 (default)
|
40324
|
+
# # bad
|
40325
|
+
# foo if a == 'a' || a == 'b'
|
40326
|
+
# @example ComparisonsThreshold: 3
|
40327
|
+
# # good
|
40328
|
+
# foo if a == 'a' || a == 'b'
|
40157
40329
|
#
|
40158
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40330
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#52
|
40159
40331
|
class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base
|
40160
40332
|
extend ::RuboCop::Cop::AutoCorrector
|
40161
40333
|
|
40162
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40334
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#58
|
40163
40335
|
def on_new_investigation; end
|
40164
40336
|
|
40165
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40337
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#62
|
40166
40338
|
def on_or(node); end
|
40167
40339
|
|
40168
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40340
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#88
|
40169
40341
|
def simple_comparison_lhs?(param0 = T.unsafe(nil)); end
|
40170
40342
|
|
40171
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40343
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#93
|
40172
40344
|
def simple_comparison_rhs?(param0 = T.unsafe(nil)); end
|
40173
40345
|
|
40174
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40346
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#85
|
40175
40347
|
def simple_double_comparison?(param0 = T.unsafe(nil)); end
|
40176
40348
|
|
40177
40349
|
private
|
40178
40350
|
|
40179
40351
|
# @return [Boolean]
|
40180
40352
|
#
|
40181
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40353
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#161
|
40182
40354
|
def allow_method_comparison?; end
|
40183
40355
|
|
40184
40356
|
# @return [Boolean]
|
40185
40357
|
#
|
40186
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40358
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#136
|
40187
40359
|
def comparison?(node); end
|
40188
40360
|
|
40361
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#165
|
40362
|
+
def comparisons_threshold; end
|
40363
|
+
|
40189
40364
|
# @return [Boolean]
|
40190
40365
|
#
|
40191
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40366
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#128
|
40192
40367
|
def nested_comparison?(node); end
|
40193
40368
|
|
40194
40369
|
# @return [Boolean]
|
40195
40370
|
#
|
40196
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40371
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#97
|
40197
40372
|
def nested_variable_comparison?(node); end
|
40198
40373
|
|
40199
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40374
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#156
|
40200
40375
|
def reset_comparison; end
|
40201
40376
|
|
40202
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40377
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#140
|
40203
40378
|
def root_of_or_node(or_node); end
|
40204
40379
|
|
40205
40380
|
# @return [Boolean]
|
40206
40381
|
#
|
40207
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40382
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#150
|
40208
40383
|
def switch_comparison?(node); end
|
40209
40384
|
|
40210
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40385
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#124
|
40211
40386
|
def variable_name(node); end
|
40212
40387
|
|
40213
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40388
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#103
|
40214
40389
|
def variables_in_node(node); end
|
40215
40390
|
|
40216
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40391
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#111
|
40217
40392
|
def variables_in_simple_node(node); end
|
40218
40393
|
end
|
40219
40394
|
|
40220
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40395
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#55
|
40221
40396
|
RuboCop::Cop::Style::MultipleComparison::MSG = T.let(T.unsafe(nil), String)
|
40222
40397
|
|
40223
40398
|
# Checks whether some constant value isn't a
|
@@ -42983,6 +43158,47 @@ end
|
|
42983
43158
|
# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#57
|
42984
43159
|
RuboCop::Cop::Style::RedundantArgument::MSG = T.let(T.unsafe(nil), String)
|
42985
43160
|
|
43161
|
+
# Checks for the instantiation of array using redundant `Array` constructor.
|
43162
|
+
# Autocorrect replaces to array literal which is the simplest and fastest.
|
43163
|
+
#
|
43164
|
+
# @example
|
43165
|
+
#
|
43166
|
+
# # bad
|
43167
|
+
# Array.new([])
|
43168
|
+
# Array[]
|
43169
|
+
# Array([])
|
43170
|
+
# Array.new(['foo', 'foo', 'foo'])
|
43171
|
+
# Array['foo', 'foo', 'foo']
|
43172
|
+
# Array(['foo', 'foo', 'foo'])
|
43173
|
+
#
|
43174
|
+
# # good
|
43175
|
+
# []
|
43176
|
+
# ['foo', 'foo', 'foo']
|
43177
|
+
# Array.new(3, 'foo')
|
43178
|
+
# Array.new(3) { 'foo' }
|
43179
|
+
#
|
43180
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#25
|
43181
|
+
class RuboCop::Cop::Style::RedundantArrayConstructor < ::RuboCop::Cop::Base
|
43182
|
+
extend ::RuboCop::Cop::AutoCorrector
|
43183
|
+
|
43184
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#47
|
43185
|
+
def on_send(node); end
|
43186
|
+
|
43187
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#33
|
43188
|
+
def redundant_array_constructor(param0 = T.unsafe(nil)); end
|
43189
|
+
|
43190
|
+
private
|
43191
|
+
|
43192
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#69
|
43193
|
+
def register_offense(range, node, replacement); end
|
43194
|
+
end
|
43195
|
+
|
43196
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#28
|
43197
|
+
RuboCop::Cop::Style::RedundantArrayConstructor::MSG = T.let(T.unsafe(nil), String)
|
43198
|
+
|
43199
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#30
|
43200
|
+
RuboCop::Cop::Style::RedundantArrayConstructor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
43201
|
+
|
42986
43202
|
# Checks for redundant assignment before returning.
|
42987
43203
|
#
|
42988
43204
|
# @example
|
@@ -43780,6 +43996,70 @@ RuboCop::Cop::Style::RedundantFileExtensionInRequire::MSG = T.let(T.unsafe(nil),
|
|
43780
43996
|
# source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#32
|
43781
43997
|
RuboCop::Cop::Style::RedundantFileExtensionInRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
43782
43998
|
|
43999
|
+
# Identifies usages of `any?`, `empty?` or `none?` predicate methods
|
44000
|
+
# chained to `select`/`filter`/`find_all` and change them to use predicate method instead.
|
44001
|
+
#
|
44002
|
+
# @example
|
44003
|
+
# # bad
|
44004
|
+
# arr.select { |x| x > 1 }.any?
|
44005
|
+
#
|
44006
|
+
# # good
|
44007
|
+
# arr.any? { |x| x > 1 }
|
44008
|
+
#
|
44009
|
+
# # bad
|
44010
|
+
# arr.select { |x| x > 1 }.empty?
|
44011
|
+
# arr.select { |x| x > 1 }.none?
|
44012
|
+
#
|
44013
|
+
# # good
|
44014
|
+
# arr.none? { |x| x > 1 }
|
44015
|
+
#
|
44016
|
+
# # good
|
44017
|
+
# relation.select(:name).any?
|
44018
|
+
# arr.select { |x| x > 1 }.any?(&:odd?)
|
44019
|
+
# @example AllCops:ActiveSupportExtensionsEnabled: false (default)
|
44020
|
+
# # good
|
44021
|
+
# arr.select { |x| x > 1 }.many?
|
44022
|
+
# @example AllCops:ActiveSupportExtensionsEnabled: true
|
44023
|
+
# # bad
|
44024
|
+
# arr.select { |x| x > 1 }.many?
|
44025
|
+
#
|
44026
|
+
# # good
|
44027
|
+
# arr.many? { |x| x > 1 }
|
44028
|
+
#
|
44029
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#38
|
44030
|
+
class RuboCop::Cop::Style::RedundantFilterChain < ::RuboCop::Cop::Base
|
44031
|
+
extend ::RuboCop::Cop::AutoCorrector
|
44032
|
+
|
44033
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#65
|
44034
|
+
def on_send(node); end
|
44035
|
+
|
44036
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#47
|
44037
|
+
def select_predicate?(param0 = T.unsafe(nil)); end
|
44038
|
+
|
44039
|
+
private
|
44040
|
+
|
44041
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#91
|
44042
|
+
def offense_range(select_node, predicate_node); end
|
44043
|
+
|
44044
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#95
|
44045
|
+
def predicate_range(predicate_node); end
|
44046
|
+
|
44047
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#77
|
44048
|
+
def register_offense(select_node, predicate_node); end
|
44049
|
+
end
|
44050
|
+
|
44051
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#41
|
44052
|
+
RuboCop::Cop::Style::RedundantFilterChain::MSG = T.let(T.unsafe(nil), String)
|
44053
|
+
|
44054
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#43
|
44055
|
+
RuboCop::Cop::Style::RedundantFilterChain::RAILS_METHODS = T.let(T.unsafe(nil), Array)
|
44056
|
+
|
44057
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#56
|
44058
|
+
RuboCop::Cop::Style::RedundantFilterChain::REPLACEMENT_METHODS = T.let(T.unsafe(nil), Hash)
|
44059
|
+
|
44060
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#44
|
44061
|
+
RuboCop::Cop::Style::RedundantFilterChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
44062
|
+
|
43783
44063
|
# Check for uses of `Object#freeze` on immutable objects.
|
43784
44064
|
#
|
43785
44065
|
# NOTE: Regexp and Range literals are frozen objects since Ruby 3.0.
|
@@ -44140,42 +44420,42 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base
|
|
44140
44420
|
include ::RuboCop::Cop::MatchRange
|
44141
44421
|
extend ::RuboCop::Cop::AutoCorrector
|
44142
44422
|
|
44143
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
44423
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#78
|
44144
44424
|
def on_new_investigation; end
|
44145
44425
|
|
44146
44426
|
private
|
44147
44427
|
|
44148
44428
|
# @return [Boolean]
|
44149
44429
|
#
|
44150
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
44430
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#166
|
44151
44431
|
def argument_is_method?(node); end
|
44152
44432
|
|
44153
44433
|
# @return [Boolean]
|
44154
44434
|
#
|
44155
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
44435
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#134
|
44156
44436
|
def argument_newline?(node); end
|
44157
44437
|
|
44158
44438
|
# @return [Boolean]
|
44159
44439
|
#
|
44160
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
44440
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#100
|
44161
44441
|
def ends_with_backslash_without_comment?(source_line); end
|
44162
44442
|
|
44163
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
44443
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#146
|
44164
44444
|
def find_node_for_line(line); end
|
44165
44445
|
|
44166
44446
|
# @return [Boolean]
|
44167
44447
|
#
|
44168
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
44448
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#122
|
44169
44449
|
def inside_string_literal?(range, token); end
|
44170
44450
|
|
44171
44451
|
# @return [Boolean]
|
44172
44452
|
#
|
44173
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
44453
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#108
|
44174
44454
|
def inside_string_literal_or_method_with_argument?(range); end
|
44175
44455
|
|
44176
44456
|
# @return [Boolean]
|
44177
44457
|
#
|
44178
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
44458
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#173
|
44179
44459
|
def method_call_with_arguments?(node); end
|
44180
44460
|
|
44181
44461
|
# A method call without parentheses such as the following cannot remove `\`:
|
@@ -44185,38 +44465,41 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base
|
|
44185
44465
|
#
|
44186
44466
|
# @return [Boolean]
|
44187
44467
|
#
|
44188
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
44468
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#130
|
44189
44469
|
def method_with_argument?(current_token, next_token); end
|
44190
44470
|
|
44191
44471
|
# @return [Boolean]
|
44192
44472
|
#
|
44193
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
44473
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#114
|
44194
44474
|
def redundant_line_continuation?(range); end
|
44195
44475
|
|
44196
44476
|
# @return [Boolean]
|
44197
44477
|
#
|
44198
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
44478
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#93
|
44199
44479
|
def require_line_continuation?(range); end
|
44200
44480
|
|
44201
44481
|
# @return [Boolean]
|
44202
44482
|
#
|
44203
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
44483
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#152
|
44204
44484
|
def same_line?(node, line); end
|
44205
44485
|
|
44206
44486
|
# @return [Boolean]
|
44207
44487
|
#
|
44208
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
44488
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#177
|
44209
44489
|
def start_with_arithmetic_operator?(source_line); end
|
44210
44490
|
|
44211
44491
|
# @return [Boolean]
|
44212
44492
|
#
|
44213
|
-
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#
|
44493
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#104
|
44214
44494
|
def string_concatenation?(source_line); end
|
44215
44495
|
end
|
44216
44496
|
|
44217
44497
|
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#72
|
44218
44498
|
RuboCop::Cop::Style::RedundantLineContinuation::ALLOWED_STRING_TOKENS = T.let(T.unsafe(nil), Array)
|
44219
44499
|
|
44500
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#73
|
44501
|
+
RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TYPES = T.let(T.unsafe(nil), Array)
|
44502
|
+
|
44220
44503
|
# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#71
|
44221
44504
|
RuboCop::Cop::Style::RedundantLineContinuation::MSG = T.let(T.unsafe(nil), String)
|
44222
44505
|
|
@@ -44558,6 +44841,37 @@ RuboCop::Cop::Style::RedundantRegexpCharacterClass::MSG_REDUNDANT_CHARACTER_CLAS
|
|
44558
44841
|
# source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#33
|
44559
44842
|
RuboCop::Cop::Style::RedundantRegexpCharacterClass::REQUIRES_ESCAPE_OUTSIDE_CHAR_CLASS_CHARS = T.let(T.unsafe(nil), Array)
|
44560
44843
|
|
44844
|
+
# Checks for the instantiation of regexp using redundant `Regexp.new` or `Regexp.compile`.
|
44845
|
+
# Autocorrect replaces to regexp literal which is the simplest and fastest.
|
44846
|
+
#
|
44847
|
+
# @example
|
44848
|
+
#
|
44849
|
+
# # bad
|
44850
|
+
# Regexp.new(/regexp/)
|
44851
|
+
# Regexp.compile(/regexp/)
|
44852
|
+
#
|
44853
|
+
# # good
|
44854
|
+
# /regexp/
|
44855
|
+
# Regexp.new('regexp')
|
44856
|
+
# Regexp.compile('regexp')
|
44857
|
+
#
|
44858
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#20
|
44859
|
+
class RuboCop::Cop::Style::RedundantRegexpConstructor < ::RuboCop::Cop::Base
|
44860
|
+
extend ::RuboCop::Cop::AutoCorrector
|
44861
|
+
|
44862
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#33
|
44863
|
+
def on_send(node); end
|
44864
|
+
|
44865
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#27
|
44866
|
+
def redundant_regexp_constructor(param0 = T.unsafe(nil)); end
|
44867
|
+
end
|
44868
|
+
|
44869
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#23
|
44870
|
+
RuboCop::Cop::Style::RedundantRegexpConstructor::MSG = T.let(T.unsafe(nil), String)
|
44871
|
+
|
44872
|
+
# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#24
|
44873
|
+
RuboCop::Cop::Style::RedundantRegexpConstructor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
44874
|
+
|
44561
44875
|
# Checks for redundant escapes inside Regexp literals.
|
44562
44876
|
#
|
44563
44877
|
# @example
|
@@ -45306,7 +45620,16 @@ end
|
|
45306
45620
|
# source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#41
|
45307
45621
|
RuboCop::Cop::Style::RedundantStringEscape::MSG = T.let(T.unsafe(nil), String)
|
45308
45622
|
|
45309
|
-
# Enforces using
|
45623
|
+
# Enforces using `//` or `%r` around regular expressions.
|
45624
|
+
#
|
45625
|
+
# NOTE: The following `%r` cases using a regexp starts with a blank or `=`
|
45626
|
+
# as a method argument allowed to prevent syntax errors.
|
45627
|
+
#
|
45628
|
+
# [source,ruby]
|
45629
|
+
# ----
|
45630
|
+
# do_something %r{ regexp} # `do_something / regexp/` is an invalid syntax.
|
45631
|
+
# do_something %r{=regexp} # `do_something /=regexp/` is an invalid syntax.
|
45632
|
+
# ----
|
45310
45633
|
#
|
45311
45634
|
# @example EnforcedStyle: slashes (default)
|
45312
45635
|
# # bad
|
@@ -45381,94 +45704,94 @@ RuboCop::Cop::Style::RedundantStringEscape::MSG = T.let(T.unsafe(nil), String)
|
|
45381
45704
|
# # good
|
45382
45705
|
# x =~ /home\//
|
45383
45706
|
#
|
45384
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45707
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#93
|
45385
45708
|
class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base
|
45386
45709
|
include ::RuboCop::Cop::ConfigurableEnforcedStyle
|
45387
45710
|
include ::RuboCop::Cop::RangeHelp
|
45388
45711
|
extend ::RuboCop::Cop::AutoCorrector
|
45389
45712
|
|
45390
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45713
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#101
|
45391
45714
|
def on_regexp(node); end
|
45392
45715
|
|
45393
45716
|
private
|
45394
45717
|
|
45395
45718
|
# @return [Boolean]
|
45396
45719
|
#
|
45397
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45720
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#144
|
45398
45721
|
def allow_inner_slashes?; end
|
45399
45722
|
|
45400
45723
|
# @return [Boolean]
|
45401
45724
|
#
|
45402
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45725
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#132
|
45403
45726
|
def allowed_mixed_percent_r?(node); end
|
45404
45727
|
|
45405
45728
|
# @return [Boolean]
|
45406
45729
|
#
|
45407
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45730
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#122
|
45408
45731
|
def allowed_mixed_slash?(node); end
|
45409
45732
|
|
45410
45733
|
# @return [Boolean]
|
45411
45734
|
#
|
45412
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45735
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#161
|
45413
45736
|
def allowed_omit_parentheses_with_percent_r_literal?(node); end
|
45414
45737
|
|
45415
45738
|
# @return [Boolean]
|
45416
45739
|
#
|
45417
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45740
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#126
|
45418
45741
|
def allowed_percent_r_literal?(node); end
|
45419
45742
|
|
45420
45743
|
# @return [Boolean]
|
45421
45744
|
#
|
45422
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45745
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#118
|
45423
45746
|
def allowed_slash_literal?(node); end
|
45424
45747
|
|
45425
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45748
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#221
|
45426
45749
|
def calculate_replacement(node); end
|
45427
45750
|
|
45428
45751
|
# @return [Boolean]
|
45429
45752
|
#
|
45430
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45753
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#136
|
45431
45754
|
def contains_disallowed_slash?(node); end
|
45432
45755
|
|
45433
45756
|
# @return [Boolean]
|
45434
45757
|
#
|
45435
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45758
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#140
|
45436
45759
|
def contains_slash?(node); end
|
45437
45760
|
|
45438
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45761
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#170
|
45439
45762
|
def correct_delimiters(node, corrector); end
|
45440
45763
|
|
45441
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45764
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#176
|
45442
45765
|
def correct_inner_slashes(node, corrector); end
|
45443
45766
|
|
45444
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45767
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#209
|
45445
45768
|
def inner_slash_after_correction(node); end
|
45446
45769
|
|
45447
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45770
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#205
|
45448
45771
|
def inner_slash_before_correction(node); end
|
45449
45772
|
|
45450
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45773
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#213
|
45451
45774
|
def inner_slash_for(opening_delimiter); end
|
45452
45775
|
|
45453
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45776
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#192
|
45454
45777
|
def inner_slash_indices(node); end
|
45455
45778
|
|
45456
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45779
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#148
|
45457
45780
|
def node_body(node, include_begin_nodes: T.unsafe(nil)); end
|
45458
45781
|
|
45459
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45782
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#157
|
45460
45783
|
def preferred_delimiters; end
|
45461
45784
|
|
45462
45785
|
# @return [Boolean]
|
45463
45786
|
#
|
45464
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45787
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#153
|
45465
45788
|
def slash_literal?(node); end
|
45466
45789
|
end
|
45467
45790
|
|
45468
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45791
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#99
|
45469
45792
|
RuboCop::Cop::Style::RegexpLiteral::MSG_USE_PERCENT_R = T.let(T.unsafe(nil), String)
|
45470
45793
|
|
45471
|
-
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#
|
45794
|
+
# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#98
|
45472
45795
|
RuboCop::Cop::Style::RegexpLiteral::MSG_USE_SLASHES = T.let(T.unsafe(nil), String)
|
45473
45796
|
|
45474
45797
|
# Sort `require` and `require_relative` in alphabetical order.
|
@@ -45541,23 +45864,26 @@ class RuboCop::Cop::Style::RequireOrder < ::RuboCop::Cop::Base
|
|
45541
45864
|
|
45542
45865
|
private
|
45543
45866
|
|
45544
|
-
# source://rubocop//lib/rubocop/cop/style/require_order.rb#
|
45867
|
+
# source://rubocop//lib/rubocop/cop/style/require_order.rb#115
|
45868
|
+
def autocorrect(corrector, node, previous_older_sibling); end
|
45869
|
+
|
45870
|
+
# source://rubocop//lib/rubocop/cop/style/require_order.rb#101
|
45545
45871
|
def find_previous_older_sibling(node); end
|
45546
45872
|
|
45547
45873
|
# @return [Boolean]
|
45548
45874
|
#
|
45549
|
-
# source://rubocop//lib/rubocop/cop/style/require_order.rb#
|
45875
|
+
# source://rubocop//lib/rubocop/cop/style/require_order.rb#133
|
45550
45876
|
def in_same_section?(node1, node2); end
|
45551
45877
|
|
45552
45878
|
# @return [Boolean]
|
45553
45879
|
#
|
45554
|
-
# source://rubocop//lib/rubocop/cop/style/require_order.rb#
|
45880
|
+
# source://rubocop//lib/rubocop/cop/style/require_order.rb#97
|
45555
45881
|
def not_modifier_form?(node); end
|
45556
45882
|
|
45557
|
-
# source://rubocop//lib/rubocop/cop/style/require_order.rb#
|
45883
|
+
# source://rubocop//lib/rubocop/cop/style/require_order.rb#123
|
45558
45884
|
def search_node(node); end
|
45559
45885
|
|
45560
|
-
# source://rubocop//lib/rubocop/cop/style/require_order.rb#
|
45886
|
+
# source://rubocop//lib/rubocop/cop/style/require_order.rb#127
|
45561
45887
|
def sibling_node(node); end
|
45562
45888
|
end
|
45563
45889
|
|
@@ -45567,9 +45893,7 @@ RuboCop::Cop::Style::RequireOrder::MSG = T.let(T.unsafe(nil), String)
|
|
45567
45893
|
# source://rubocop//lib/rubocop/cop/style/require_order.rb#71
|
45568
45894
|
RuboCop::Cop::Style::RequireOrder::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
45569
45895
|
|
45570
|
-
# Checks for uses of rescue in its modifier form
|
45571
|
-
#
|
45572
|
-
# The cop to check `rescue` in its modifier form is added for following
|
45896
|
+
# Checks for uses of `rescue` in its modifier form is added for following
|
45573
45897
|
# reasons:
|
45574
45898
|
#
|
45575
45899
|
# * The syntax of modifier form `rescue` can be misleading because it
|
@@ -45604,36 +45928,36 @@ RuboCop::Cop::Style::RequireOrder::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array
|
|
45604
45928
|
# handle_error
|
45605
45929
|
# end
|
45606
45930
|
#
|
45607
|
-
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#
|
45931
|
+
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#40
|
45608
45932
|
class RuboCop::Cop::Style::RescueModifier < ::RuboCop::Cop::Base
|
45609
45933
|
include ::RuboCop::Cop::Alignment
|
45610
45934
|
include ::RuboCop::Cop::RangeHelp
|
45611
45935
|
include ::RuboCop::Cop::RescueNode
|
45612
45936
|
extend ::RuboCop::Cop::AutoCorrector
|
45613
45937
|
|
45614
|
-
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#
|
45938
|
+
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#52
|
45615
45939
|
def on_resbody(node); end
|
45616
45940
|
|
45617
45941
|
private
|
45618
45942
|
|
45619
|
-
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#
|
45943
|
+
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#70
|
45620
45944
|
def correct_rescue_block(corrector, node, parenthesized); end
|
45621
45945
|
|
45622
|
-
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#
|
45946
|
+
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#86
|
45623
45947
|
def indentation_and_offset(node, parenthesized); end
|
45624
45948
|
|
45625
45949
|
# @return [Boolean]
|
45626
45950
|
#
|
45627
|
-
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#
|
45951
|
+
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#66
|
45628
45952
|
def parenthesized?(node); end
|
45629
45953
|
|
45630
45954
|
class << self
|
45631
|
-
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#
|
45955
|
+
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#48
|
45632
45956
|
def autocorrect_incompatible_with; end
|
45633
45957
|
end
|
45634
45958
|
end
|
45635
45959
|
|
45636
|
-
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#
|
45960
|
+
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#46
|
45637
45961
|
RuboCop::Cop::Style::RescueModifier::MSG = T.let(T.unsafe(nil), String)
|
45638
45962
|
|
45639
45963
|
# Checks for rescuing `StandardError`. There are two supported
|
@@ -46108,7 +46432,7 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base
|
|
46108
46432
|
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#74
|
46109
46433
|
def env_const?(param0 = T.unsafe(nil)); end
|
46110
46434
|
|
46111
|
-
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#
|
46435
|
+
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#88
|
46112
46436
|
def on_send(node); end
|
46113
46437
|
|
46114
46438
|
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#56
|
@@ -46116,29 +46440,32 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base
|
|
46116
46440
|
|
46117
46441
|
private
|
46118
46442
|
|
46119
|
-
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#
|
46443
|
+
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#132
|
46120
46444
|
def extract_send_node(block_node); end
|
46121
46445
|
|
46122
|
-
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#
|
46446
|
+
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#145
|
46123
46447
|
def find_regexp(node, block); end
|
46124
46448
|
|
46125
46449
|
# @return [Boolean]
|
46126
46450
|
#
|
46127
|
-
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#
|
46451
|
+
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#156
|
46128
46452
|
def match_predicate_without_receiver?(node); end
|
46129
46453
|
|
46130
46454
|
# @return [Boolean]
|
46131
46455
|
#
|
46132
|
-
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#
|
46456
|
+
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#141
|
46133
46457
|
def opposite?(regexp_method_send_node); end
|
46134
46458
|
|
46135
46459
|
# @return [Boolean]
|
46136
46460
|
#
|
46137
|
-
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#
|
46461
|
+
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#106
|
46138
46462
|
def receiver_allowed?(node); end
|
46139
46463
|
|
46140
|
-
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#
|
46141
|
-
def register_offense(node, block_node, regexp,
|
46464
|
+
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#120
|
46465
|
+
def register_offense(node, block_node, regexp, replacement); end
|
46466
|
+
|
46467
|
+
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#112
|
46468
|
+
def replacement(regexp_method_send_node, node); end
|
46142
46469
|
end
|
46143
46470
|
|
46144
46471
|
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#49
|
@@ -46257,27 +46584,37 @@ class RuboCop::Cop::Style::Semicolon < ::RuboCop::Cop::Base
|
|
46257
46584
|
|
46258
46585
|
# @return [Boolean]
|
46259
46586
|
#
|
46260
|
-
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#
|
46587
|
+
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#105
|
46261
46588
|
def exist_semicolon_after_left_curly_brace?(tokens); end
|
46262
46589
|
|
46263
46590
|
# @return [Boolean]
|
46264
46591
|
#
|
46265
|
-
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#
|
46592
|
+
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#113
|
46593
|
+
def exist_semicolon_after_left_string_interpolation_brace?(tokens); end
|
46594
|
+
|
46595
|
+
# @return [Boolean]
|
46596
|
+
#
|
46597
|
+
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#101
|
46266
46598
|
def exist_semicolon_before_right_curly_brace?(tokens); end
|
46267
46599
|
|
46268
|
-
#
|
46600
|
+
# @return [Boolean]
|
46601
|
+
#
|
46602
|
+
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#109
|
46603
|
+
def exist_semicolon_before_right_string_interpolation_brace?(tokens); end
|
46604
|
+
|
46605
|
+
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#137
|
46269
46606
|
def expressions_per_line(exprs); end
|
46270
46607
|
|
46271
|
-
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#
|
46608
|
+
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#151
|
46272
46609
|
def find_range_node(token_before_semicolon); end
|
46273
46610
|
|
46274
|
-
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#
|
46611
|
+
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#143
|
46275
46612
|
def find_semicolon_positions(line); end
|
46276
46613
|
|
46277
|
-
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#
|
46614
|
+
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#157
|
46278
46615
|
def range_nodes; end
|
46279
46616
|
|
46280
|
-
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#
|
46617
|
+
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#117
|
46281
46618
|
def register_semicolon(line, column, after_expression, token_before_semicolon = T.unsafe(nil)); end
|
46282
46619
|
|
46283
46620
|
# source://rubocop//lib/rubocop/cop/style/semicolon.rb#86
|
@@ -50466,59 +50803,59 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force
|
|
50466
50803
|
#
|
50467
50804
|
# @api private
|
50468
50805
|
#
|
50469
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50806
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#76
|
50470
50807
|
def investigate(processed_source); end
|
50471
50808
|
|
50472
50809
|
# @api private
|
50473
50810
|
#
|
50474
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50811
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#85
|
50475
50812
|
def process_node(node); end
|
50476
50813
|
|
50477
50814
|
# @api private
|
50478
50815
|
#
|
50479
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50816
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#71
|
50480
50817
|
def variable_table; end
|
50481
50818
|
|
50482
50819
|
private
|
50483
50820
|
|
50484
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50821
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#368
|
50485
50822
|
def after_declaring_variable(arg); end
|
50486
50823
|
|
50487
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50824
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#368
|
50488
50825
|
def after_entering_scope(arg); end
|
50489
50826
|
|
50490
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50827
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#368
|
50491
50828
|
def after_leaving_scope(arg); end
|
50492
50829
|
|
50493
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50830
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#368
|
50494
50831
|
def before_declaring_variable(arg); end
|
50495
50832
|
|
50496
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50833
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#368
|
50497
50834
|
def before_entering_scope(arg); end
|
50498
50835
|
|
50499
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50836
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#368
|
50500
50837
|
def before_leaving_scope(arg); end
|
50501
50838
|
|
50502
50839
|
# @api private
|
50503
50840
|
#
|
50504
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50841
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#339
|
50505
50842
|
def descendant_reference(node); end
|
50506
50843
|
|
50507
50844
|
# @api private
|
50508
50845
|
#
|
50509
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50846
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#329
|
50510
50847
|
def each_descendant_reference(loop_node); end
|
50511
50848
|
|
50512
50849
|
# @api private
|
50513
50850
|
#
|
50514
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50851
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#314
|
50515
50852
|
def find_variables_in_loop(loop_node); end
|
50516
50853
|
|
50517
50854
|
# This is called for each scope recursively.
|
50518
50855
|
#
|
50519
50856
|
# @api private
|
50520
50857
|
#
|
50521
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50858
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#94
|
50522
50859
|
def inspect_variables_in_scope(scope_node); end
|
50523
50860
|
|
50524
50861
|
# Mark all assignments which are referenced in the same loop
|
@@ -50527,98 +50864,98 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force
|
|
50527
50864
|
#
|
50528
50865
|
# @api private
|
50529
50866
|
#
|
50530
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50867
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#295
|
50531
50868
|
def mark_assignments_as_referenced_in_loop(node); end
|
50532
50869
|
|
50533
50870
|
# @api private
|
50534
50871
|
#
|
50535
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50872
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#126
|
50536
50873
|
def node_handler_method_name(node); end
|
50537
50874
|
|
50538
50875
|
# @api private
|
50539
50876
|
#
|
50540
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50877
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#100
|
50541
50878
|
def process_children(origin_node); end
|
50542
50879
|
|
50543
50880
|
# @api private
|
50544
50881
|
#
|
50545
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50882
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#231
|
50546
50883
|
def process_loop(node); end
|
50547
50884
|
|
50548
50885
|
# @api private
|
50549
50886
|
#
|
50550
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50887
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#160
|
50551
50888
|
def process_regexp_named_captures(node); end
|
50552
50889
|
|
50553
50890
|
# @api private
|
50554
50891
|
#
|
50555
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50892
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#246
|
50556
50893
|
def process_rescue(node); end
|
50557
50894
|
|
50558
50895
|
# @api private
|
50559
50896
|
#
|
50560
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50897
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#265
|
50561
50898
|
def process_scope(node); end
|
50562
50899
|
|
50563
50900
|
# @api private
|
50564
50901
|
#
|
50565
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50902
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#284
|
50566
50903
|
def process_send(node); end
|
50567
50904
|
|
50568
50905
|
# @api private
|
50569
50906
|
#
|
50570
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50907
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#142
|
50571
50908
|
def process_variable_assignment(node); end
|
50572
50909
|
|
50573
50910
|
# @api private
|
50574
50911
|
#
|
50575
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50912
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#130
|
50576
50913
|
def process_variable_declaration(node); end
|
50577
50914
|
|
50578
50915
|
# @api private
|
50579
50916
|
#
|
50580
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50917
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#219
|
50581
50918
|
def process_variable_multiple_assignment(node); end
|
50582
50919
|
|
50583
50920
|
# @api private
|
50584
50921
|
#
|
50585
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50922
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#184
|
50586
50923
|
def process_variable_operator_assignment(node); end
|
50587
50924
|
|
50588
50925
|
# @api private
|
50589
50926
|
#
|
50590
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50927
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#226
|
50591
50928
|
def process_variable_referencing(node); end
|
50592
50929
|
|
50593
50930
|
# @api private
|
50594
50931
|
#
|
50595
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50932
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#257
|
50596
50933
|
def process_zero_arity_super(node); end
|
50597
50934
|
|
50598
50935
|
# @api private
|
50599
50936
|
#
|
50600
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50937
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#178
|
50601
50938
|
def regexp_captured_names(node); end
|
50602
50939
|
|
50603
50940
|
# @api private
|
50604
50941
|
# @return [Boolean]
|
50605
50942
|
#
|
50606
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50943
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#351
|
50607
50944
|
def scanned_node?(node); end
|
50608
50945
|
|
50609
50946
|
# @api private
|
50610
50947
|
#
|
50611
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50948
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#355
|
50612
50949
|
def scanned_nodes; end
|
50613
50950
|
|
50614
50951
|
# @api private
|
50615
50952
|
#
|
50616
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50953
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#108
|
50617
50954
|
def skip_children!; end
|
50618
50955
|
|
50619
50956
|
# @api private
|
50620
50957
|
#
|
50621
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50958
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#278
|
50622
50959
|
def twisted_nodes(node); end
|
50623
50960
|
end
|
50624
50961
|
|
@@ -50638,12 +50975,17 @@ class RuboCop::Cop::VariableForce::Assignment
|
|
50638
50975
|
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#16
|
50639
50976
|
def initialize(node, variable); end
|
50640
50977
|
|
50641
|
-
#
|
50978
|
+
# @return [Boolean]
|
50979
|
+
#
|
50980
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#50
|
50981
|
+
def exception_assignment?; end
|
50982
|
+
|
50983
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#77
|
50642
50984
|
def meta_assignment_node; end
|
50643
50985
|
|
50644
50986
|
# @return [Boolean]
|
50645
50987
|
#
|
50646
|
-
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#
|
50988
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#60
|
50647
50989
|
def multiple_assignment?; end
|
50648
50990
|
|
50649
50991
|
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#29
|
@@ -50654,12 +50996,12 @@ class RuboCop::Cop::VariableForce::Assignment
|
|
50654
50996
|
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12
|
50655
50997
|
def node; end
|
50656
50998
|
|
50657
|
-
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#
|
50999
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#72
|
50658
51000
|
def operator; end
|
50659
51001
|
|
50660
51002
|
# @return [Boolean]
|
50661
51003
|
#
|
50662
|
-
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#
|
51004
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#54
|
50663
51005
|
def operator_assignment?; end
|
50664
51006
|
|
50665
51007
|
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#37
|
@@ -50685,6 +51027,11 @@ class RuboCop::Cop::VariableForce::Assignment
|
|
50685
51027
|
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#46
|
50686
51028
|
def regexp_named_capture?; end
|
50687
51029
|
|
51030
|
+
# @return [Boolean]
|
51031
|
+
#
|
51032
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#66
|
51033
|
+
def rest_assignment?; end
|
51034
|
+
|
50688
51035
|
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#33
|
50689
51036
|
def scope; end
|
50690
51037
|
|
@@ -50700,11 +51047,14 @@ class RuboCop::Cop::VariableForce::Assignment
|
|
50700
51047
|
|
50701
51048
|
private
|
50702
51049
|
|
50703
|
-
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#
|
51050
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#97
|
50704
51051
|
def multiple_assignment_node; end
|
50705
51052
|
|
50706
|
-
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#
|
51053
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#89
|
50707
51054
|
def operator_assignment_node; end
|
51055
|
+
|
51056
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#106
|
51057
|
+
def rest_assignment_node; end
|
50708
51058
|
end
|
50709
51059
|
|
50710
51060
|
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#10
|
@@ -50712,12 +51062,12 @@ RuboCop::Cop::VariableForce::Assignment::MULTIPLE_LEFT_HAND_SIDE_TYPE = T.let(T.
|
|
50712
51062
|
|
50713
51063
|
# @api private
|
50714
51064
|
#
|
50715
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51065
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#65
|
50716
51066
|
class RuboCop::Cop::VariableForce::AssignmentReference < ::Struct
|
50717
51067
|
# @api private
|
50718
51068
|
# @return [Boolean]
|
50719
51069
|
#
|
50720
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51070
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#66
|
50721
51071
|
def assignment?; end
|
50722
51072
|
|
50723
51073
|
# Returns the value of attribute node
|
@@ -51162,7 +51512,7 @@ RuboCop::Cop::VariableForce::LOGICAL_OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(
|
|
51162
51512
|
|
51163
51513
|
# @api private
|
51164
51514
|
#
|
51165
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51515
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#48
|
51166
51516
|
RuboCop::Cop::VariableForce::LOOP_TYPES = T.let(T.unsafe(nil), Array)
|
51167
51517
|
|
51168
51518
|
# @api private
|
@@ -51172,7 +51522,7 @@ RuboCop::Cop::VariableForce::MULTIPLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Sym
|
|
51172
51522
|
|
51173
51523
|
# @api private
|
51174
51524
|
#
|
51175
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51525
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#112
|
51176
51526
|
RuboCop::Cop::VariableForce::NODE_HANDLER_METHOD_NAMES = T.let(T.unsafe(nil), Hash)
|
51177
51527
|
|
51178
51528
|
# @api private
|
@@ -51182,7 +51532,7 @@ RuboCop::Cop::VariableForce::OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Ar
|
|
51182
51532
|
|
51183
51533
|
# @api private
|
51184
51534
|
#
|
51185
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51535
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#47
|
51186
51536
|
RuboCop::Cop::VariableForce::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array)
|
51187
51537
|
|
51188
51538
|
# @api private
|
@@ -51192,9 +51542,14 @@ RuboCop::Cop::VariableForce::REGEXP_NAMED_CAPTURE_TYPE = T.let(T.unsafe(nil), Sy
|
|
51192
51542
|
|
51193
51543
|
# @api private
|
51194
51544
|
#
|
51195
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51545
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#50
|
51196
51546
|
RuboCop::Cop::VariableForce::RESCUE_TYPE = T.let(T.unsafe(nil), Symbol)
|
51197
51547
|
|
51548
|
+
# @api private
|
51549
|
+
#
|
51550
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#43
|
51551
|
+
RuboCop::Cop::VariableForce::REST_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol)
|
51552
|
+
|
51198
51553
|
# This class represents each reference of a variable.
|
51199
51554
|
#
|
51200
51555
|
# source://rubocop//lib/rubocop/cop/variable_force/reference.rb#7
|
@@ -51242,12 +51597,12 @@ RuboCop::Cop::VariableForce::Reference::VARIABLE_REFERENCE_TYPES = T.let(T.unsaf
|
|
51242
51597
|
|
51243
51598
|
# @api private
|
51244
51599
|
#
|
51245
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51600
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#55
|
51246
51601
|
RuboCop::Cop::VariableForce::SCOPE_TYPES = T.let(T.unsafe(nil), Array)
|
51247
51602
|
|
51248
51603
|
# @api private
|
51249
51604
|
#
|
51250
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51605
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#57
|
51251
51606
|
RuboCop::Cop::VariableForce::SEND_TYPE = T.let(T.unsafe(nil), Symbol)
|
51252
51607
|
|
51253
51608
|
# A Scope represents a context of local variable visibility.
|
@@ -51326,7 +51681,7 @@ RuboCop::Cop::VariableForce::Scope::OUTER_SCOPE_CHILD_INDICES = T.let(T.unsafe(n
|
|
51326
51681
|
|
51327
51682
|
# @api private
|
51328
51683
|
#
|
51329
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51684
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#54
|
51330
51685
|
RuboCop::Cop::VariableForce::TWISTED_SCOPE_TYPES = T.let(T.unsafe(nil), Array)
|
51331
51686
|
|
51332
51687
|
# @api private
|
@@ -51341,7 +51696,7 @@ RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Ar
|
|
51341
51696
|
|
51342
51697
|
# @api private
|
51343
51698
|
#
|
51344
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51699
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#45
|
51345
51700
|
RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symbol)
|
51346
51701
|
|
51347
51702
|
# A Variable represents existence of a local variable.
|
@@ -51458,12 +51813,12 @@ RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsa
|
|
51458
51813
|
|
51459
51814
|
# @api private
|
51460
51815
|
#
|
51461
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51816
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#59
|
51462
51817
|
class RuboCop::Cop::VariableForce::VariableReference < ::Struct
|
51463
51818
|
# @api private
|
51464
51819
|
# @return [Boolean]
|
51465
51820
|
#
|
51466
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51821
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#60
|
51467
51822
|
def assignment?; end
|
51468
51823
|
|
51469
51824
|
# Returns the value of attribute name
|
@@ -51545,7 +51900,7 @@ end
|
|
51545
51900
|
|
51546
51901
|
# @api private
|
51547
51902
|
#
|
51548
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51903
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#52
|
51549
51904
|
RuboCop::Cop::VariableForce::ZERO_ARITY_SUPER_TYPE = T.let(T.unsafe(nil), Symbol)
|
51550
51905
|
|
51551
51906
|
# Help methods for determining node visibility.
|
@@ -54747,34 +55102,34 @@ class RuboCop::TargetRuby
|
|
54747
55102
|
# @api private
|
54748
55103
|
# @return [TargetRuby] a new instance of TargetRuby
|
54749
55104
|
#
|
54750
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55105
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#248
|
54751
55106
|
def initialize(config); end
|
54752
55107
|
|
54753
55108
|
# @api private
|
54754
55109
|
#
|
54755
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55110
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#264
|
54756
55111
|
def rubocop_version_with_support; end
|
54757
55112
|
|
54758
55113
|
# @api private
|
54759
55114
|
#
|
54760
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55115
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#252
|
54761
55116
|
def source; end
|
54762
55117
|
|
54763
55118
|
# @api private
|
54764
55119
|
# @return [Boolean]
|
54765
55120
|
#
|
54766
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55121
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#260
|
54767
55122
|
def supported?; end
|
54768
55123
|
|
54769
55124
|
# @api private
|
54770
55125
|
#
|
54771
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55126
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#256
|
54772
55127
|
def version; end
|
54773
55128
|
|
54774
55129
|
class << self
|
54775
55130
|
# @api private
|
54776
55131
|
#
|
54777
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55132
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#234
|
54778
55133
|
def supported_versions; end
|
54779
55134
|
end
|
54780
55135
|
end
|
@@ -54783,23 +55138,23 @@ end
|
|
54783
55138
|
#
|
54784
55139
|
# @api private
|
54785
55140
|
#
|
54786
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55141
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#107
|
54787
55142
|
class RuboCop::TargetRuby::BundlerLockFile < ::RuboCop::TargetRuby::Source
|
54788
55143
|
# @api private
|
54789
55144
|
#
|
54790
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55145
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#108
|
54791
55146
|
def name; end
|
54792
55147
|
|
54793
55148
|
private
|
54794
55149
|
|
54795
55150
|
# @api private
|
54796
55151
|
#
|
54797
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55152
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#141
|
54798
55153
|
def bundler_lock_file_path; end
|
54799
55154
|
|
54800
55155
|
# @api private
|
54801
55156
|
#
|
54802
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55157
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#114
|
54803
55158
|
def find_version; end
|
54804
55159
|
end
|
54805
55160
|
|
@@ -54812,18 +55167,18 @@ RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float)
|
|
54812
55167
|
#
|
54813
55168
|
# @api private
|
54814
55169
|
#
|
54815
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55170
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#222
|
54816
55171
|
class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source
|
54817
55172
|
# @api private
|
54818
55173
|
#
|
54819
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55174
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#223
|
54820
55175
|
def name; end
|
54821
55176
|
|
54822
55177
|
private
|
54823
55178
|
|
54824
55179
|
# @api private
|
54825
55180
|
#
|
54826
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55181
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#229
|
54827
55182
|
def find_version; end
|
54828
55183
|
end
|
54829
55184
|
|
@@ -54831,62 +55186,62 @@ end
|
|
54831
55186
|
#
|
54832
55187
|
# @api private
|
54833
55188
|
#
|
54834
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55189
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#148
|
54835
55190
|
class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source
|
54836
55191
|
extend ::RuboCop::AST::NodePattern::Macros
|
54837
55192
|
|
54838
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55193
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#159
|
54839
55194
|
def gem_requirement?(param0 = T.unsafe(nil)); end
|
54840
55195
|
|
54841
55196
|
# @api private
|
54842
55197
|
#
|
54843
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55198
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#163
|
54844
55199
|
def name; end
|
54845
55200
|
|
54846
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55201
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#154
|
54847
55202
|
def required_ruby_version(param0); end
|
54848
55203
|
|
54849
55204
|
private
|
54850
55205
|
|
54851
55206
|
# @api private
|
54852
55207
|
#
|
54853
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55208
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#210
|
54854
55209
|
def find_default_minimal_known_ruby(right_hand_side); end
|
54855
55210
|
|
54856
55211
|
# @api private
|
54857
55212
|
#
|
54858
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55213
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#169
|
54859
55214
|
def find_version; end
|
54860
55215
|
|
54861
55216
|
# @api private
|
54862
55217
|
#
|
54863
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55218
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#179
|
54864
55219
|
def gemspec_filename; end
|
54865
55220
|
|
54866
55221
|
# @api private
|
54867
55222
|
#
|
54868
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55223
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#186
|
54869
55224
|
def gemspec_filepath; end
|
54870
55225
|
|
54871
55226
|
# @api private
|
54872
55227
|
#
|
54873
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55228
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#206
|
54874
55229
|
def version_from_array(array); end
|
54875
55230
|
|
54876
55231
|
# @api private
|
54877
55232
|
#
|
54878
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55233
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#191
|
54879
55234
|
def version_from_gemspec_file(file); end
|
54880
55235
|
|
54881
55236
|
# @api private
|
54882
55237
|
#
|
54883
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55238
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#196
|
54884
55239
|
def version_from_right_hand_side(right_hand_side); end
|
54885
55240
|
end
|
54886
55241
|
|
54887
55242
|
# @api private
|
54888
55243
|
#
|
54889
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55244
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#151
|
54890
55245
|
RuboCop::TargetRuby::GemspecFile::GEMSPEC_EXTENSION = T.let(T.unsafe(nil), String)
|
54891
55246
|
|
54892
55247
|
# @api private
|
@@ -54903,18 +55258,18 @@ RuboCop::TargetRuby::OBSOLETE_RUBIES = T.let(T.unsafe(nil), Hash)
|
|
54903
55258
|
#
|
54904
55259
|
# @api private
|
54905
55260
|
#
|
54906
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55261
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#39
|
54907
55262
|
class RuboCop::TargetRuby::RuboCopConfig < ::RuboCop::TargetRuby::Source
|
54908
55263
|
# @api private
|
54909
55264
|
#
|
54910
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55265
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#40
|
54911
55266
|
def name; end
|
54912
55267
|
|
54913
55268
|
private
|
54914
55269
|
|
54915
55270
|
# @api private
|
54916
55271
|
#
|
54917
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55272
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#46
|
54918
55273
|
def find_version; end
|
54919
55274
|
end
|
54920
55275
|
|
@@ -54922,76 +55277,76 @@ end
|
|
54922
55277
|
#
|
54923
55278
|
# @api private
|
54924
55279
|
#
|
54925
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55280
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#53
|
54926
55281
|
class RuboCop::TargetRuby::RubyVersionFile < ::RuboCop::TargetRuby::Source
|
54927
55282
|
# @api private
|
54928
55283
|
#
|
54929
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55284
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#57
|
54930
55285
|
def name; end
|
54931
55286
|
|
54932
55287
|
private
|
54933
55288
|
|
54934
55289
|
# @api private
|
54935
55290
|
#
|
54936
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55291
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#63
|
54937
55292
|
def filename; end
|
54938
55293
|
|
54939
55294
|
# @api private
|
54940
55295
|
#
|
54941
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55296
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#71
|
54942
55297
|
def find_version; end
|
54943
55298
|
|
54944
55299
|
# @api private
|
54945
55300
|
#
|
54946
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55301
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#67
|
54947
55302
|
def pattern; end
|
54948
55303
|
|
54949
55304
|
# @api private
|
54950
55305
|
#
|
54951
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55306
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#78
|
54952
55307
|
def version_file; end
|
54953
55308
|
end
|
54954
55309
|
|
54955
55310
|
# @api private
|
54956
55311
|
#
|
54957
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55312
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#54
|
54958
55313
|
RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_FILENAME = T.let(T.unsafe(nil), String)
|
54959
55314
|
|
54960
55315
|
# @api private
|
54961
55316
|
#
|
54962
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55317
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#55
|
54963
55318
|
RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp)
|
54964
55319
|
|
54965
55320
|
# @api private
|
54966
55321
|
#
|
54967
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55322
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#238
|
54968
55323
|
RuboCop::TargetRuby::SOURCES = T.let(T.unsafe(nil), Array)
|
54969
55324
|
|
54970
55325
|
# A place where information about a target ruby version is found.
|
54971
55326
|
#
|
54972
55327
|
# @api private
|
54973
55328
|
#
|
54974
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55329
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#24
|
54975
55330
|
class RuboCop::TargetRuby::Source
|
54976
55331
|
# @api private
|
54977
55332
|
# @return [Source] a new instance of Source
|
54978
55333
|
#
|
54979
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55334
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#27
|
54980
55335
|
def initialize(config); end
|
54981
55336
|
|
54982
55337
|
# @api private
|
54983
55338
|
#
|
54984
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55339
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#25
|
54985
55340
|
def name; end
|
54986
55341
|
|
54987
55342
|
# @api private
|
54988
55343
|
#
|
54989
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55344
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#32
|
54990
55345
|
def to_s; end
|
54991
55346
|
|
54992
55347
|
# @api private
|
54993
55348
|
#
|
54994
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55349
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#25
|
54995
55350
|
def version; end
|
54996
55351
|
end
|
54997
55352
|
|
@@ -55000,34 +55355,34 @@ end
|
|
55000
55355
|
#
|
55001
55356
|
# @api private
|
55002
55357
|
#
|
55003
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55358
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#86
|
55004
55359
|
class RuboCop::TargetRuby::ToolVersionsFile < ::RuboCop::TargetRuby::RubyVersionFile
|
55005
55360
|
# @api private
|
55006
55361
|
#
|
55007
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55362
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#90
|
55008
55363
|
def name; end
|
55009
55364
|
|
55010
55365
|
private
|
55011
55366
|
|
55012
55367
|
# @api private
|
55013
55368
|
#
|
55014
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55369
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#96
|
55015
55370
|
def filename; end
|
55016
55371
|
|
55017
55372
|
# @api private
|
55018
55373
|
#
|
55019
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55374
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#100
|
55020
55375
|
def pattern; end
|
55021
55376
|
end
|
55022
55377
|
|
55023
55378
|
# @api private
|
55024
55379
|
#
|
55025
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55380
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#87
|
55026
55381
|
RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_FILENAME = T.let(T.unsafe(nil), String)
|
55027
55382
|
|
55028
55383
|
# @api private
|
55029
55384
|
#
|
55030
|
-
# source://rubocop//lib/rubocop/target_ruby.rb#
|
55385
|
+
# source://rubocop//lib/rubocop/target_ruby.rb#88
|
55031
55386
|
RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_PATTERN = T.let(T.unsafe(nil), Regexp)
|
55032
55387
|
|
55033
55388
|
# source://rubocop//lib/rubocop/ast_aliases.rb#7
|
@@ -55053,12 +55408,12 @@ module RuboCop::Version
|
|
55053
55408
|
class << self
|
55054
55409
|
# @api private
|
55055
55410
|
#
|
55056
|
-
# source://rubocop//lib/rubocop/version.rb#
|
55411
|
+
# source://rubocop//lib/rubocop/version.rb#93
|
55057
55412
|
def document_version; end
|
55058
55413
|
|
55059
55414
|
# @api private
|
55060
55415
|
#
|
55061
|
-
# source://rubocop//lib/rubocop/version.rb#
|
55416
|
+
# source://rubocop//lib/rubocop/version.rb#43
|
55062
55417
|
def extension_versions(env); end
|
55063
55418
|
|
55064
55419
|
# Returns feature version in one of two ways:
|
@@ -55068,17 +55423,17 @@ module RuboCop::Version
|
|
55068
55423
|
#
|
55069
55424
|
# @api private
|
55070
55425
|
#
|
55071
|
-
# source://rubocop//lib/rubocop/version.rb#
|
55426
|
+
# source://rubocop//lib/rubocop/version.rb#77
|
55072
55427
|
def feature_version(feature); end
|
55073
55428
|
|
55074
55429
|
# @api private
|
55075
55430
|
#
|
55076
|
-
# source://rubocop//lib/rubocop/version.rb#
|
55431
|
+
# source://rubocop//lib/rubocop/version.rb#98
|
55077
55432
|
def server_mode; end
|
55078
55433
|
|
55079
55434
|
# @api private
|
55080
55435
|
#
|
55081
|
-
# source://rubocop//lib/rubocop/version.rb#
|
55436
|
+
# source://rubocop//lib/rubocop/version.rb#21
|
55082
55437
|
def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end
|
55083
55438
|
end
|
55084
55439
|
end
|
@@ -55086,7 +55441,7 @@ end
|
|
55086
55441
|
# source://rubocop//lib/rubocop/version.rb#12
|
55087
55442
|
RuboCop::Version::CANONICAL_FEATURE_NAMES = T.let(T.unsafe(nil), Hash)
|
55088
55443
|
|
55089
|
-
# source://rubocop//lib/rubocop/version.rb#
|
55444
|
+
# source://rubocop//lib/rubocop/version.rb#16
|
55090
55445
|
RuboCop::Version::EXTENSION_PATH_NAMES = T.let(T.unsafe(nil), Hash)
|
55091
55446
|
|
55092
55447
|
# source://rubocop//lib/rubocop/version.rb#8
|