sorbet-result 0.2.1 → 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 +14 -0
- data/Gemfile.lock +13 -13
- 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/{rubocop-ast@1.28.1.rbi → rubocop-ast@1.29.0.rbi} +43 -27
- data/sorbet/rbi/gems/{rubocop@1.51.0.rbi → rubocop@1.52.0.rbi} +384 -198
- metadata +7 -7
- 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
@@ -2511,6 +2511,22 @@ module RuboCop::Cop::AllowedPattern
|
|
2511
2511
|
def matches_ignored_pattern?(line); end
|
2512
2512
|
end
|
2513
2513
|
|
2514
|
+
# This module encapsulates the ability to allow certain receivers in a cop.
|
2515
|
+
#
|
2516
|
+
# source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#6
|
2517
|
+
module RuboCop::Cop::AllowedReceivers
|
2518
|
+
# @return [Boolean]
|
2519
|
+
#
|
2520
|
+
# source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#7
|
2521
|
+
def allowed_receiver?(receiver); end
|
2522
|
+
|
2523
|
+
# source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#29
|
2524
|
+
def allowed_receivers; end
|
2525
|
+
|
2526
|
+
# source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#13
|
2527
|
+
def receiver_name(receiver); end
|
2528
|
+
end
|
2529
|
+
|
2514
2530
|
# Error raised when an unqualified cop name is used that could
|
2515
2531
|
# refer to two or more cops under different departments
|
2516
2532
|
#
|
@@ -19429,20 +19445,25 @@ class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base
|
|
19429
19445
|
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#59
|
19430
19446
|
def on_class(node); end
|
19431
19447
|
|
19432
|
-
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#
|
19448
|
+
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#70
|
19433
19449
|
def on_send(node); end
|
19434
19450
|
|
19435
19451
|
private
|
19436
19452
|
|
19437
19453
|
# @return [Boolean]
|
19438
19454
|
#
|
19439
|
-
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#
|
19455
|
+
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#87
|
19440
19456
|
def exception_class?(class_node); end
|
19441
19457
|
|
19442
|
-
#
|
19458
|
+
# @return [Boolean]
|
19459
|
+
#
|
19460
|
+
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#91
|
19461
|
+
def inherit_exception_class_with_omitted_namespace?(class_node); end
|
19462
|
+
|
19463
|
+
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#83
|
19443
19464
|
def message(node); end
|
19444
19465
|
|
19445
|
-
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#
|
19466
|
+
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#97
|
19446
19467
|
def preferred_base_class; end
|
19447
19468
|
end
|
19448
19469
|
|
@@ -19848,6 +19869,9 @@ RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil),
|
|
19848
19869
|
# missing method. In other cases, the theoretical ideal handling could be
|
19849
19870
|
# challenging or verbose for no actual gain.
|
19850
19871
|
#
|
19872
|
+
# Autocorrection is not supported because the position of `super` cannot be
|
19873
|
+
# determined automatically.
|
19874
|
+
#
|
19851
19875
|
# @example
|
19852
19876
|
# # bad
|
19853
19877
|
# class Employee < Person
|
@@ -19894,61 +19918,61 @@ RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil),
|
|
19894
19918
|
# end
|
19895
19919
|
# end
|
19896
19920
|
#
|
19897
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19921
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#63
|
19898
19922
|
class RuboCop::Cop::Lint::MissingSuper < ::RuboCop::Cop::Base
|
19899
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19923
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#77
|
19900
19924
|
def class_new_block(param0 = T.unsafe(nil)); end
|
19901
19925
|
|
19902
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19926
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#83
|
19903
19927
|
def on_def(node); end
|
19904
19928
|
|
19905
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19929
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#93
|
19906
19930
|
def on_defs(node); end
|
19907
19931
|
|
19908
19932
|
private
|
19909
19933
|
|
19910
19934
|
# @return [Boolean]
|
19911
19935
|
#
|
19912
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19936
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#105
|
19913
19937
|
def callback_method_def?(node); end
|
19914
19938
|
|
19915
19939
|
# @return [Boolean]
|
19916
19940
|
#
|
19917
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19941
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#111
|
19918
19942
|
def contains_super?(node); end
|
19919
19943
|
|
19920
19944
|
# @return [Boolean]
|
19921
19945
|
#
|
19922
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19946
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#115
|
19923
19947
|
def inside_class_with_stateful_parent?(node); end
|
19924
19948
|
|
19925
19949
|
# @return [Boolean]
|
19926
19950
|
#
|
19927
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19951
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#101
|
19928
19952
|
def offender?(node); end
|
19929
19953
|
|
19930
19954
|
# @return [Boolean]
|
19931
19955
|
#
|
19932
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19956
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#127
|
19933
19957
|
def stateless_class?(node); end
|
19934
19958
|
end
|
19935
19959
|
|
19936
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19960
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#74
|
19937
19961
|
RuboCop::Cop::Lint::MissingSuper::CALLBACKS = T.let(T.unsafe(nil), Set)
|
19938
19962
|
|
19939
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19963
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#65
|
19940
19964
|
RuboCop::Cop::Lint::MissingSuper::CALLBACK_MSG = T.let(T.unsafe(nil), String)
|
19941
19965
|
|
19942
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19966
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#69
|
19943
19967
|
RuboCop::Cop::Lint::MissingSuper::CLASS_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array)
|
19944
19968
|
|
19945
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19969
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#64
|
19946
19970
|
RuboCop::Cop::Lint::MissingSuper::CONSTRUCTOR_MSG = T.let(T.unsafe(nil), String)
|
19947
19971
|
|
19948
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19972
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#70
|
19949
19973
|
RuboCop::Cop::Lint::MissingSuper::METHOD_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array)
|
19950
19974
|
|
19951
|
-
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#
|
19975
|
+
# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#67
|
19952
19976
|
RuboCop::Cop::Lint::MissingSuper::STATELESS_CLASSES = T.let(T.unsafe(nil), Array)
|
19953
19977
|
|
19954
19978
|
# Do not mix named captures and numbered captures in a Regexp literal
|
@@ -21548,6 +21572,7 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T
|
|
21548
21572
|
# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#51
|
21549
21573
|
class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base
|
21550
21574
|
include ::RuboCop::Cop::AllowedMethods
|
21575
|
+
include ::RuboCop::Cop::NilMethods
|
21551
21576
|
include ::RuboCop::Cop::RangeHelp
|
21552
21577
|
extend ::RuboCop::Cop::AutoCorrector
|
21553
21578
|
|
@@ -24360,7 +24385,7 @@ class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base
|
|
24360
24385
|
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50
|
24361
24386
|
def after_leaving_scope(scope, _variable_table); end
|
24362
24387
|
|
24363
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24388
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#136
|
24364
24389
|
def autocorrect(corrector, assignment); end
|
24365
24390
|
|
24366
24391
|
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#54
|
@@ -24381,19 +24406,19 @@ class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base
|
|
24381
24406
|
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#95
|
24382
24407
|
def operator_assignment_message(scope, assignment); end
|
24383
24408
|
|
24384
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24409
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#152
|
24385
24410
|
def remove_exception_assignment_part(corrector, node); end
|
24386
24411
|
|
24387
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24412
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#176
|
24388
24413
|
def remove_local_variable_assignment_part(corrector, node); end
|
24389
24414
|
|
24390
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24415
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#165
|
24391
24416
|
def remove_trailing_character_from_operator(corrector, node); end
|
24392
24417
|
|
24393
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24418
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#161
|
24394
24419
|
def rename_variable_with_underscore(corrector, node); end
|
24395
24420
|
|
24396
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24421
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#169
|
24397
24422
|
def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end
|
24398
24423
|
|
24399
24424
|
# TODO: More precise handling (rescue, ensure, nested begin, etc.)
|
@@ -27873,11 +27898,14 @@ RuboCop::Cop::Naming::RescuedExceptionsVariableName::MSG = T.let(T.unsafe(nil),
|
|
27873
27898
|
#
|
27874
27899
|
# # good
|
27875
27900
|
# fooBar = 1
|
27901
|
+
# @example AllowedIdentifiers: ['fooBar']
|
27902
|
+
# # good (with EnforcedStyle: snake_case)
|
27903
|
+
# fooBar = 1
|
27876
27904
|
# @example AllowedPatterns: ['_v\d+\z']
|
27877
|
-
# # good
|
27905
|
+
# # good (with EnforcedStyle: camelCase)
|
27878
27906
|
# :release_v1
|
27879
27907
|
#
|
27880
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27908
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#31
|
27881
27909
|
class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base
|
27882
27910
|
include ::RuboCop::Cop::AllowedIdentifiers
|
27883
27911
|
include ::RuboCop::Cop::ConfigurableEnforcedStyle
|
@@ -27885,51 +27913,51 @@ class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base
|
|
27885
27913
|
include ::RuboCop::Cop::ConfigurableNaming
|
27886
27914
|
include ::RuboCop::Cop::AllowedPattern
|
27887
27915
|
|
27888
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27916
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27889
27917
|
def on_arg(node); end
|
27890
27918
|
|
27891
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27919
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27892
27920
|
def on_blockarg(node); end
|
27893
27921
|
|
27894
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27922
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27895
27923
|
def on_cvasgn(node); end
|
27896
27924
|
|
27897
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27925
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27898
27926
|
def on_ivasgn(node); end
|
27899
27927
|
|
27900
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27928
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27901
27929
|
def on_kwarg(node); end
|
27902
27930
|
|
27903
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27931
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27904
27932
|
def on_kwoptarg(node); end
|
27905
27933
|
|
27906
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27934
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27907
27935
|
def on_kwrestarg(node); end
|
27908
27936
|
|
27909
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27937
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27910
27938
|
def on_lvar(node); end
|
27911
27939
|
|
27912
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27940
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27913
27941
|
def on_lvasgn(node); end
|
27914
27942
|
|
27915
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27943
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27916
27944
|
def on_optarg(node); end
|
27917
27945
|
|
27918
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27946
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42
|
27919
27947
|
def on_restarg(node); end
|
27920
27948
|
|
27921
27949
|
# @return [Boolean]
|
27922
27950
|
#
|
27923
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27951
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#38
|
27924
27952
|
def valid_name?(node, name, given_style = T.unsafe(nil)); end
|
27925
27953
|
|
27926
27954
|
private
|
27927
27955
|
|
27928
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27956
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#62
|
27929
27957
|
def message(style); end
|
27930
27958
|
end
|
27931
27959
|
|
27932
|
-
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#
|
27960
|
+
# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#36
|
27933
27961
|
RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String)
|
27934
27962
|
|
27935
27963
|
# Makes sure that all numbered variables use the
|
@@ -29990,29 +30018,29 @@ class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base
|
|
29990
30018
|
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#71
|
29991
30019
|
def check(send_node); end
|
29992
30020
|
|
29993
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30021
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#114
|
29994
30022
|
def class_send_elements(class_node); end
|
29995
30023
|
|
29996
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30024
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#157
|
29997
30025
|
def group_accessors(node, accessors); end
|
29998
30026
|
|
29999
30027
|
# @return [Boolean]
|
30000
30028
|
#
|
30001
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30029
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#96
|
30002
30030
|
def groupable_accessor?(node); end
|
30003
30031
|
|
30004
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30032
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#134
|
30005
30033
|
def groupable_sibling_accessors(send_node); end
|
30006
30034
|
|
30007
30035
|
# @return [Boolean]
|
30008
30036
|
#
|
30009
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30037
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#126
|
30010
30038
|
def grouped_style?; end
|
30011
30039
|
|
30012
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30040
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#143
|
30013
30041
|
def message(send_node); end
|
30014
30042
|
|
30015
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30043
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#148
|
30016
30044
|
def preferred_accessors(node); end
|
30017
30045
|
|
30018
30046
|
# @return [Boolean]
|
@@ -30020,12 +30048,12 @@ class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base
|
|
30020
30048
|
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#91
|
30021
30049
|
def previous_line_comment?(node); end
|
30022
30050
|
|
30023
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30051
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#163
|
30024
30052
|
def separate_accessors(node); end
|
30025
30053
|
|
30026
30054
|
# @return [Boolean]
|
30027
30055
|
#
|
30028
|
-
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#
|
30056
|
+
# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#130
|
30029
30057
|
def separated_style?; end
|
30030
30058
|
end
|
30031
30059
|
|
@@ -31896,49 +31924,53 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
|
31896
31924
|
#
|
31897
31925
|
# # good
|
31898
31926
|
# hash.compact!
|
31927
|
+
# @example AllowedReceivers: ['params']
|
31928
|
+
# # good
|
31929
|
+
# params.reject(&:nil?)
|
31899
31930
|
#
|
31900
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31931
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#42
|
31901
31932
|
class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base
|
31933
|
+
include ::RuboCop::Cop::AllowedReceivers
|
31902
31934
|
include ::RuboCop::Cop::RangeHelp
|
31903
31935
|
extend ::RuboCop::Cop::AutoCorrector
|
31904
31936
|
extend ::RuboCop::Cop::TargetRubyVersion
|
31905
31937
|
|
31906
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31938
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#82
|
31907
31939
|
def on_send(node); end
|
31908
31940
|
|
31909
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31941
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#62
|
31910
31942
|
def reject_method?(param0 = T.unsafe(nil)); end
|
31911
31943
|
|
31912
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31944
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#55
|
31913
31945
|
def reject_method_with_block_pass?(param0 = T.unsafe(nil)); end
|
31914
31946
|
|
31915
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31947
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#72
|
31916
31948
|
def select_method?(param0 = T.unsafe(nil)); end
|
31917
31949
|
|
31918
31950
|
private
|
31919
31951
|
|
31920
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31952
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#119
|
31921
31953
|
def good_method_name(node); end
|
31922
31954
|
|
31923
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31955
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#97
|
31924
31956
|
def offense_range(node); end
|
31925
31957
|
|
31926
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31958
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#127
|
31927
31959
|
def range(begin_pos_node, end_pos_node); end
|
31928
31960
|
|
31929
31961
|
# @return [Boolean]
|
31930
31962
|
#
|
31931
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31963
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#113
|
31932
31964
|
def to_enum_method?(node); end
|
31933
31965
|
end
|
31934
31966
|
|
31935
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31967
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#48
|
31936
31968
|
RuboCop::Cop::Style::CollectionCompact::MSG = T.let(T.unsafe(nil), String)
|
31937
31969
|
|
31938
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31970
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#49
|
31939
31971
|
RuboCop::Cop::Style::CollectionCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
31940
31972
|
|
31941
|
-
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#
|
31973
|
+
# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#50
|
31942
31974
|
RuboCop::Cop::Style::CollectionCompact::TO_ENUM_METHODS = T.let(T.unsafe(nil), Array)
|
31943
31975
|
|
31944
31976
|
# Enforces the use of consistent method names
|
@@ -34924,7 +34956,12 @@ class RuboCop::Cop::Style::ExactRegexpMatch < ::RuboCop::Cop::Base
|
|
34924
34956
|
|
34925
34957
|
private
|
34926
34958
|
|
34927
|
-
#
|
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
|
34928
34965
|
def new_method(node); end
|
34929
34966
|
end
|
34930
34967
|
|
@@ -36458,68 +36495,58 @@ RuboCop::Cop::Style::HashConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr
|
|
36458
36495
|
#
|
36459
36496
|
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#30
|
36460
36497
|
class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base
|
36498
|
+
include ::RuboCop::Cop::AllowedReceivers
|
36461
36499
|
include ::RuboCop::Cop::Lint::UnusedArgument
|
36462
36500
|
extend ::RuboCop::Cop::AutoCorrector
|
36463
36501
|
|
36464
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36502
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#38
|
36465
36503
|
def kv_each(param0 = T.unsafe(nil)); end
|
36466
36504
|
|
36467
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36505
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#43
|
36468
36506
|
def kv_each_with_block_pass(param0 = T.unsafe(nil)); end
|
36469
36507
|
|
36470
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36508
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#47
|
36471
36509
|
def on_block(node); end
|
36472
36510
|
|
36473
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36511
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#55
|
36474
36512
|
def on_block_pass(node); end
|
36475
36513
|
|
36476
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36514
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#47
|
36477
36515
|
def on_numblock(node); end
|
36478
36516
|
|
36479
36517
|
private
|
36480
36518
|
|
36481
|
-
#
|
36482
|
-
#
|
36483
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#120
|
36484
|
-
def allowed_receiver?(receiver); end
|
36485
|
-
|
36486
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#138
|
36487
|
-
def allowed_receivers; end
|
36488
|
-
|
36489
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#85
|
36519
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#86
|
36490
36520
|
def check_argument(variable); end
|
36491
36521
|
|
36492
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36522
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#110
|
36493
36523
|
def correct_args(node, corrector); end
|
36494
36524
|
|
36495
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36525
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#96
|
36496
36526
|
def correct_implicit(node, corrector, method_name); end
|
36497
36527
|
|
36498
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36528
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#101
|
36499
36529
|
def correct_key_value_each(node, corrector); end
|
36500
36530
|
|
36501
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36531
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#82
|
36502
36532
|
def format_message(method_name); end
|
36503
36533
|
|
36504
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36534
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#117
|
36505
36535
|
def kv_range(outer_node); end
|
36506
36536
|
|
36507
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36508
|
-
def receiver_name(receiver); end
|
36509
|
-
|
36510
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#62
|
36537
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#63
|
36511
36538
|
def register_kv_offense(target, method); end
|
36512
36539
|
|
36513
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36540
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#72
|
36514
36541
|
def register_kv_with_block_pass_offense(node, target, method); end
|
36515
36542
|
|
36516
36543
|
# @return [Boolean]
|
36517
36544
|
#
|
36518
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36545
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#92
|
36519
36546
|
def used?(arg); end
|
36520
36547
|
end
|
36521
36548
|
|
36522
|
-
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#
|
36549
|
+
# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#35
|
36523
36550
|
RuboCop::Cop::Style::HashEachMethods::MSG = T.let(T.unsafe(nil), String)
|
36524
36551
|
|
36525
36552
|
# Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods
|
@@ -38865,12 +38892,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38865
38892
|
|
38866
38893
|
# @return [Boolean]
|
38867
38894
|
#
|
38868
|
-
# 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
|
38869
38896
|
def allowed_chained_call_with_parentheses?(node); end
|
38870
38897
|
|
38871
38898
|
# @return [Boolean]
|
38872
38899
|
#
|
38873
|
-
# 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
|
38874
38901
|
def allowed_multiline_call_with_parentheses?(node); end
|
38875
38902
|
|
38876
38903
|
# @return [Boolean]
|
@@ -38880,17 +38907,17 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38880
38907
|
|
38881
38908
|
# @return [Boolean]
|
38882
38909
|
#
|
38883
|
-
# 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
|
38884
38911
|
def ambiguous_literal?(node); end
|
38885
38912
|
|
38886
38913
|
# @return [Boolean]
|
38887
38914
|
#
|
38888
|
-
# 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
|
38889
38916
|
def assigned_before?(node, target); end
|
38890
38917
|
|
38891
38918
|
# @return [Boolean]
|
38892
38919
|
#
|
38893
|
-
# 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
|
38894
38921
|
def assignment_in_condition?(node); end
|
38895
38922
|
|
38896
38923
|
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#31
|
@@ -38898,7 +38925,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38898
38925
|
|
38899
38926
|
# @return [Boolean]
|
38900
38927
|
#
|
38901
|
-
# 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
|
38902
38929
|
def call_as_argument_or_chain?(node); end
|
38903
38930
|
|
38904
38931
|
# @return [Boolean]
|
@@ -38933,17 +38960,17 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38933
38960
|
|
38934
38961
|
# @return [Boolean]
|
38935
38962
|
#
|
38936
|
-
# 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
|
38937
38964
|
def forwards_anonymous_rest_arguments?(node); end
|
38938
38965
|
|
38939
38966
|
# @return [Boolean]
|
38940
38967
|
#
|
38941
|
-
# 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
|
38942
38969
|
def hash_literal?(node); end
|
38943
38970
|
|
38944
38971
|
# @return [Boolean]
|
38945
38972
|
#
|
38946
|
-
# 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
|
38947
38974
|
def hash_literal_in_arguments?(node); end
|
38948
38975
|
|
38949
38976
|
# @return [Boolean]
|
@@ -38953,7 +38980,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38953
38980
|
|
38954
38981
|
# @return [Boolean]
|
38955
38982
|
#
|
38956
|
-
# 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
|
38957
38984
|
def inside_string_interpolation?(node); end
|
38958
38985
|
|
38959
38986
|
# Require hash value omission be enclosed in parentheses to prevent the following issue:
|
@@ -38971,7 +38998,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38971
38998
|
|
38972
38999
|
# @return [Boolean]
|
38973
39000
|
#
|
38974
|
-
# 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
|
38975
39002
|
def logical_operator?(node); end
|
38976
39003
|
|
38977
39004
|
# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#40
|
@@ -38987,7 +39014,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38987
39014
|
|
38988
39015
|
# @return [Boolean]
|
38989
39016
|
#
|
38990
|
-
# 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
|
38991
39018
|
def regexp_slash_literal?(node); end
|
38992
39019
|
|
38993
39020
|
# @return [Boolean]
|
@@ -38997,7 +39024,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
38997
39024
|
|
38998
39025
|
# @return [Boolean]
|
38999
39026
|
#
|
39000
|
-
# 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
|
39001
39028
|
def splat?(node); end
|
39002
39029
|
|
39003
39030
|
# @return [Boolean]
|
@@ -39012,12 +39039,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
|
|
39012
39039
|
|
39013
39040
|
# @return [Boolean]
|
39014
39041
|
#
|
39015
|
-
# 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
|
39016
39043
|
def ternary_if?(node); end
|
39017
39044
|
|
39018
39045
|
# @return [Boolean]
|
39019
39046
|
#
|
39020
|
-
# 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
|
39021
39048
|
def unary_literal?(node); end
|
39022
39049
|
end
|
39023
39050
|
|
@@ -40293,70 +40320,79 @@ RuboCop::Cop::Style::MultilineWhenThen::MSG = T.let(T.unsafe(nil), String)
|
|
40293
40320
|
#
|
40294
40321
|
# # good
|
40295
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'
|
40296
40329
|
#
|
40297
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40330
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#52
|
40298
40331
|
class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base
|
40299
40332
|
extend ::RuboCop::Cop::AutoCorrector
|
40300
40333
|
|
40301
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40334
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#58
|
40302
40335
|
def on_new_investigation; end
|
40303
40336
|
|
40304
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40337
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#62
|
40305
40338
|
def on_or(node); end
|
40306
40339
|
|
40307
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40340
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#88
|
40308
40341
|
def simple_comparison_lhs?(param0 = T.unsafe(nil)); end
|
40309
40342
|
|
40310
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40343
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#93
|
40311
40344
|
def simple_comparison_rhs?(param0 = T.unsafe(nil)); end
|
40312
40345
|
|
40313
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40346
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#85
|
40314
40347
|
def simple_double_comparison?(param0 = T.unsafe(nil)); end
|
40315
40348
|
|
40316
40349
|
private
|
40317
40350
|
|
40318
40351
|
# @return [Boolean]
|
40319
40352
|
#
|
40320
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40353
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#161
|
40321
40354
|
def allow_method_comparison?; end
|
40322
40355
|
|
40323
40356
|
# @return [Boolean]
|
40324
40357
|
#
|
40325
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40358
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#136
|
40326
40359
|
def comparison?(node); end
|
40327
40360
|
|
40361
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#165
|
40362
|
+
def comparisons_threshold; end
|
40363
|
+
|
40328
40364
|
# @return [Boolean]
|
40329
40365
|
#
|
40330
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40366
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#128
|
40331
40367
|
def nested_comparison?(node); end
|
40332
40368
|
|
40333
40369
|
# @return [Boolean]
|
40334
40370
|
#
|
40335
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40371
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#97
|
40336
40372
|
def nested_variable_comparison?(node); end
|
40337
40373
|
|
40338
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40374
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#156
|
40339
40375
|
def reset_comparison; end
|
40340
40376
|
|
40341
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40377
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#140
|
40342
40378
|
def root_of_or_node(or_node); end
|
40343
40379
|
|
40344
40380
|
# @return [Boolean]
|
40345
40381
|
#
|
40346
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40382
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#150
|
40347
40383
|
def switch_comparison?(node); end
|
40348
40384
|
|
40349
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40385
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#124
|
40350
40386
|
def variable_name(node); end
|
40351
40387
|
|
40352
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40388
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#103
|
40353
40389
|
def variables_in_node(node); end
|
40354
40390
|
|
40355
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40391
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#111
|
40356
40392
|
def variables_in_simple_node(node); end
|
40357
40393
|
end
|
40358
40394
|
|
40359
|
-
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#
|
40395
|
+
# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#55
|
40360
40396
|
RuboCop::Cop::Style::MultipleComparison::MSG = T.let(T.unsafe(nil), String)
|
40361
40397
|
|
40362
40398
|
# Checks whether some constant value isn't a
|
@@ -43122,6 +43158,47 @@ end
|
|
43122
43158
|
# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#57
|
43123
43159
|
RuboCop::Cop::Style::RedundantArgument::MSG = T.let(T.unsafe(nil), String)
|
43124
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
|
+
|
43125
43202
|
# Checks for redundant assignment before returning.
|
43126
43203
|
#
|
43127
43204
|
# @example
|
@@ -43919,6 +43996,70 @@ RuboCop::Cop::Style::RedundantFileExtensionInRequire::MSG = T.let(T.unsafe(nil),
|
|
43919
43996
|
# source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#32
|
43920
43997
|
RuboCop::Cop::Style::RedundantFileExtensionInRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
43921
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
|
+
|
43922
44063
|
# Check for uses of `Object#freeze` on immutable objects.
|
43923
44064
|
#
|
43924
44065
|
# NOTE: Regexp and Range literals are frozen objects since Ruby 3.0.
|
@@ -44700,6 +44841,37 @@ RuboCop::Cop::Style::RedundantRegexpCharacterClass::MSG_REDUNDANT_CHARACTER_CLAS
|
|
44700
44841
|
# source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#33
|
44701
44842
|
RuboCop::Cop::Style::RedundantRegexpCharacterClass::REQUIRES_ESCAPE_OUTSIDE_CHAR_CLASS_CHARS = T.let(T.unsafe(nil), Array)
|
44702
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
|
+
|
44703
44875
|
# Checks for redundant escapes inside Regexp literals.
|
44704
44876
|
#
|
44705
44877
|
# @example
|
@@ -45692,7 +45864,7 @@ class RuboCop::Cop::Style::RequireOrder < ::RuboCop::Cop::Base
|
|
45692
45864
|
|
45693
45865
|
private
|
45694
45866
|
|
45695
|
-
# source://rubocop//lib/rubocop/cop/style/require_order.rb#
|
45867
|
+
# source://rubocop//lib/rubocop/cop/style/require_order.rb#115
|
45696
45868
|
def autocorrect(corrector, node, previous_older_sibling); end
|
45697
45869
|
|
45698
45870
|
# source://rubocop//lib/rubocop/cop/style/require_order.rb#101
|
@@ -45700,7 +45872,7 @@ class RuboCop::Cop::Style::RequireOrder < ::RuboCop::Cop::Base
|
|
45700
45872
|
|
45701
45873
|
# @return [Boolean]
|
45702
45874
|
#
|
45703
|
-
# source://rubocop//lib/rubocop/cop/style/require_order.rb#
|
45875
|
+
# source://rubocop//lib/rubocop/cop/style/require_order.rb#133
|
45704
45876
|
def in_same_section?(node1, node2); end
|
45705
45877
|
|
45706
45878
|
# @return [Boolean]
|
@@ -45708,10 +45880,10 @@ class RuboCop::Cop::Style::RequireOrder < ::RuboCop::Cop::Base
|
|
45708
45880
|
# source://rubocop//lib/rubocop/cop/style/require_order.rb#97
|
45709
45881
|
def not_modifier_form?(node); end
|
45710
45882
|
|
45711
|
-
# source://rubocop//lib/rubocop/cop/style/require_order.rb#
|
45883
|
+
# source://rubocop//lib/rubocop/cop/style/require_order.rb#123
|
45712
45884
|
def search_node(node); end
|
45713
45885
|
|
45714
|
-
# source://rubocop//lib/rubocop/cop/style/require_order.rb#
|
45886
|
+
# source://rubocop//lib/rubocop/cop/style/require_order.rb#127
|
45715
45887
|
def sibling_node(node); end
|
45716
45888
|
end
|
45717
45889
|
|
@@ -45721,9 +45893,7 @@ RuboCop::Cop::Style::RequireOrder::MSG = T.let(T.unsafe(nil), String)
|
|
45721
45893
|
# source://rubocop//lib/rubocop/cop/style/require_order.rb#71
|
45722
45894
|
RuboCop::Cop::Style::RequireOrder::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
45723
45895
|
|
45724
|
-
# Checks for uses of rescue in its modifier form
|
45725
|
-
#
|
45726
|
-
# The cop to check `rescue` in its modifier form is added for following
|
45896
|
+
# Checks for uses of `rescue` in its modifier form is added for following
|
45727
45897
|
# reasons:
|
45728
45898
|
#
|
45729
45899
|
# * The syntax of modifier form `rescue` can be misleading because it
|
@@ -45758,36 +45928,36 @@ RuboCop::Cop::Style::RequireOrder::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array
|
|
45758
45928
|
# handle_error
|
45759
45929
|
# end
|
45760
45930
|
#
|
45761
|
-
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#
|
45931
|
+
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#40
|
45762
45932
|
class RuboCop::Cop::Style::RescueModifier < ::RuboCop::Cop::Base
|
45763
45933
|
include ::RuboCop::Cop::Alignment
|
45764
45934
|
include ::RuboCop::Cop::RangeHelp
|
45765
45935
|
include ::RuboCop::Cop::RescueNode
|
45766
45936
|
extend ::RuboCop::Cop::AutoCorrector
|
45767
45937
|
|
45768
|
-
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#
|
45938
|
+
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#52
|
45769
45939
|
def on_resbody(node); end
|
45770
45940
|
|
45771
45941
|
private
|
45772
45942
|
|
45773
|
-
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#
|
45943
|
+
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#70
|
45774
45944
|
def correct_rescue_block(corrector, node, parenthesized); end
|
45775
45945
|
|
45776
|
-
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#
|
45946
|
+
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#86
|
45777
45947
|
def indentation_and_offset(node, parenthesized); end
|
45778
45948
|
|
45779
45949
|
# @return [Boolean]
|
45780
45950
|
#
|
45781
|
-
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#
|
45951
|
+
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#66
|
45782
45952
|
def parenthesized?(node); end
|
45783
45953
|
|
45784
45954
|
class << self
|
45785
|
-
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#
|
45955
|
+
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#48
|
45786
45956
|
def autocorrect_incompatible_with; end
|
45787
45957
|
end
|
45788
45958
|
end
|
45789
45959
|
|
45790
|
-
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#
|
45960
|
+
# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#46
|
45791
45961
|
RuboCop::Cop::Style::RescueModifier::MSG = T.let(T.unsafe(nil), String)
|
45792
45962
|
|
45793
45963
|
# Checks for rescuing `StandardError`. There are two supported
|
@@ -46262,7 +46432,7 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base
|
|
46262
46432
|
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#74
|
46263
46433
|
def env_const?(param0 = T.unsafe(nil)); end
|
46264
46434
|
|
46265
|
-
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#
|
46435
|
+
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#88
|
46266
46436
|
def on_send(node); end
|
46267
46437
|
|
46268
46438
|
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#56
|
@@ -46270,29 +46440,32 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base
|
|
46270
46440
|
|
46271
46441
|
private
|
46272
46442
|
|
46273
|
-
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#
|
46443
|
+
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#132
|
46274
46444
|
def extract_send_node(block_node); end
|
46275
46445
|
|
46276
|
-
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#
|
46446
|
+
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#145
|
46277
46447
|
def find_regexp(node, block); end
|
46278
46448
|
|
46279
46449
|
# @return [Boolean]
|
46280
46450
|
#
|
46281
|
-
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#
|
46451
|
+
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#156
|
46282
46452
|
def match_predicate_without_receiver?(node); end
|
46283
46453
|
|
46284
46454
|
# @return [Boolean]
|
46285
46455
|
#
|
46286
|
-
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#
|
46456
|
+
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#141
|
46287
46457
|
def opposite?(regexp_method_send_node); end
|
46288
46458
|
|
46289
46459
|
# @return [Boolean]
|
46290
46460
|
#
|
46291
|
-
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#
|
46461
|
+
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#106
|
46292
46462
|
def receiver_allowed?(node); end
|
46293
46463
|
|
46294
|
-
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#
|
46295
|
-
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
|
46296
46469
|
end
|
46297
46470
|
|
46298
46471
|
# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#49
|
@@ -50630,59 +50803,59 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force
|
|
50630
50803
|
#
|
50631
50804
|
# @api private
|
50632
50805
|
#
|
50633
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50806
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#76
|
50634
50807
|
def investigate(processed_source); end
|
50635
50808
|
|
50636
50809
|
# @api private
|
50637
50810
|
#
|
50638
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50811
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#85
|
50639
50812
|
def process_node(node); end
|
50640
50813
|
|
50641
50814
|
# @api private
|
50642
50815
|
#
|
50643
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50816
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#71
|
50644
50817
|
def variable_table; end
|
50645
50818
|
|
50646
50819
|
private
|
50647
50820
|
|
50648
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50821
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#368
|
50649
50822
|
def after_declaring_variable(arg); end
|
50650
50823
|
|
50651
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50824
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#368
|
50652
50825
|
def after_entering_scope(arg); end
|
50653
50826
|
|
50654
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50827
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#368
|
50655
50828
|
def after_leaving_scope(arg); end
|
50656
50829
|
|
50657
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50830
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#368
|
50658
50831
|
def before_declaring_variable(arg); end
|
50659
50832
|
|
50660
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50833
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#368
|
50661
50834
|
def before_entering_scope(arg); end
|
50662
50835
|
|
50663
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50836
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#368
|
50664
50837
|
def before_leaving_scope(arg); end
|
50665
50838
|
|
50666
50839
|
# @api private
|
50667
50840
|
#
|
50668
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50841
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#339
|
50669
50842
|
def descendant_reference(node); end
|
50670
50843
|
|
50671
50844
|
# @api private
|
50672
50845
|
#
|
50673
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50846
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#329
|
50674
50847
|
def each_descendant_reference(loop_node); end
|
50675
50848
|
|
50676
50849
|
# @api private
|
50677
50850
|
#
|
50678
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50851
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#314
|
50679
50852
|
def find_variables_in_loop(loop_node); end
|
50680
50853
|
|
50681
50854
|
# This is called for each scope recursively.
|
50682
50855
|
#
|
50683
50856
|
# @api private
|
50684
50857
|
#
|
50685
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50858
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#94
|
50686
50859
|
def inspect_variables_in_scope(scope_node); end
|
50687
50860
|
|
50688
50861
|
# Mark all assignments which are referenced in the same loop
|
@@ -50691,98 +50864,98 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force
|
|
50691
50864
|
#
|
50692
50865
|
# @api private
|
50693
50866
|
#
|
50694
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50867
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#295
|
50695
50868
|
def mark_assignments_as_referenced_in_loop(node); end
|
50696
50869
|
|
50697
50870
|
# @api private
|
50698
50871
|
#
|
50699
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50872
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#126
|
50700
50873
|
def node_handler_method_name(node); end
|
50701
50874
|
|
50702
50875
|
# @api private
|
50703
50876
|
#
|
50704
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50877
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#100
|
50705
50878
|
def process_children(origin_node); end
|
50706
50879
|
|
50707
50880
|
# @api private
|
50708
50881
|
#
|
50709
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50882
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#231
|
50710
50883
|
def process_loop(node); end
|
50711
50884
|
|
50712
50885
|
# @api private
|
50713
50886
|
#
|
50714
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50887
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#160
|
50715
50888
|
def process_regexp_named_captures(node); end
|
50716
50889
|
|
50717
50890
|
# @api private
|
50718
50891
|
#
|
50719
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50892
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#246
|
50720
50893
|
def process_rescue(node); end
|
50721
50894
|
|
50722
50895
|
# @api private
|
50723
50896
|
#
|
50724
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50897
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#265
|
50725
50898
|
def process_scope(node); end
|
50726
50899
|
|
50727
50900
|
# @api private
|
50728
50901
|
#
|
50729
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50902
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#284
|
50730
50903
|
def process_send(node); end
|
50731
50904
|
|
50732
50905
|
# @api private
|
50733
50906
|
#
|
50734
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50907
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#142
|
50735
50908
|
def process_variable_assignment(node); end
|
50736
50909
|
|
50737
50910
|
# @api private
|
50738
50911
|
#
|
50739
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50912
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#130
|
50740
50913
|
def process_variable_declaration(node); end
|
50741
50914
|
|
50742
50915
|
# @api private
|
50743
50916
|
#
|
50744
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50917
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#219
|
50745
50918
|
def process_variable_multiple_assignment(node); end
|
50746
50919
|
|
50747
50920
|
# @api private
|
50748
50921
|
#
|
50749
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50922
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#184
|
50750
50923
|
def process_variable_operator_assignment(node); end
|
50751
50924
|
|
50752
50925
|
# @api private
|
50753
50926
|
#
|
50754
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50927
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#226
|
50755
50928
|
def process_variable_referencing(node); end
|
50756
50929
|
|
50757
50930
|
# @api private
|
50758
50931
|
#
|
50759
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50932
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#257
|
50760
50933
|
def process_zero_arity_super(node); end
|
50761
50934
|
|
50762
50935
|
# @api private
|
50763
50936
|
#
|
50764
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50937
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#178
|
50765
50938
|
def regexp_captured_names(node); end
|
50766
50939
|
|
50767
50940
|
# @api private
|
50768
50941
|
# @return [Boolean]
|
50769
50942
|
#
|
50770
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50943
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#351
|
50771
50944
|
def scanned_node?(node); end
|
50772
50945
|
|
50773
50946
|
# @api private
|
50774
50947
|
#
|
50775
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50948
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#355
|
50776
50949
|
def scanned_nodes; end
|
50777
50950
|
|
50778
50951
|
# @api private
|
50779
50952
|
#
|
50780
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50953
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#108
|
50781
50954
|
def skip_children!; end
|
50782
50955
|
|
50783
50956
|
# @api private
|
50784
50957
|
#
|
50785
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
50958
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#278
|
50786
50959
|
def twisted_nodes(node); end
|
50787
50960
|
end
|
50788
50961
|
|
@@ -50807,7 +50980,7 @@ class RuboCop::Cop::VariableForce::Assignment
|
|
50807
50980
|
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#50
|
50808
50981
|
def exception_assignment?; end
|
50809
50982
|
|
50810
|
-
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#
|
50983
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#77
|
50811
50984
|
def meta_assignment_node; end
|
50812
50985
|
|
50813
50986
|
# @return [Boolean]
|
@@ -50823,7 +50996,7 @@ class RuboCop::Cop::VariableForce::Assignment
|
|
50823
50996
|
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12
|
50824
50997
|
def node; end
|
50825
50998
|
|
50826
|
-
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#
|
50999
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#72
|
50827
51000
|
def operator; end
|
50828
51001
|
|
50829
51002
|
# @return [Boolean]
|
@@ -50854,6 +51027,11 @@ class RuboCop::Cop::VariableForce::Assignment
|
|
50854
51027
|
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#46
|
50855
51028
|
def regexp_named_capture?; end
|
50856
51029
|
|
51030
|
+
# @return [Boolean]
|
51031
|
+
#
|
51032
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#66
|
51033
|
+
def rest_assignment?; end
|
51034
|
+
|
50857
51035
|
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#33
|
50858
51036
|
def scope; end
|
50859
51037
|
|
@@ -50869,11 +51047,14 @@ class RuboCop::Cop::VariableForce::Assignment
|
|
50869
51047
|
|
50870
51048
|
private
|
50871
51049
|
|
50872
|
-
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#
|
51050
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#97
|
50873
51051
|
def multiple_assignment_node; end
|
50874
51052
|
|
50875
|
-
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#
|
51053
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#89
|
50876
51054
|
def operator_assignment_node; end
|
51055
|
+
|
51056
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#106
|
51057
|
+
def rest_assignment_node; end
|
50877
51058
|
end
|
50878
51059
|
|
50879
51060
|
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#10
|
@@ -50881,12 +51062,12 @@ RuboCop::Cop::VariableForce::Assignment::MULTIPLE_LEFT_HAND_SIDE_TYPE = T.let(T.
|
|
50881
51062
|
|
50882
51063
|
# @api private
|
50883
51064
|
#
|
50884
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51065
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#65
|
50885
51066
|
class RuboCop::Cop::VariableForce::AssignmentReference < ::Struct
|
50886
51067
|
# @api private
|
50887
51068
|
# @return [Boolean]
|
50888
51069
|
#
|
50889
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51070
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#66
|
50890
51071
|
def assignment?; end
|
50891
51072
|
|
50892
51073
|
# Returns the value of attribute node
|
@@ -51331,7 +51512,7 @@ RuboCop::Cop::VariableForce::LOGICAL_OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(
|
|
51331
51512
|
|
51332
51513
|
# @api private
|
51333
51514
|
#
|
51334
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51515
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#48
|
51335
51516
|
RuboCop::Cop::VariableForce::LOOP_TYPES = T.let(T.unsafe(nil), Array)
|
51336
51517
|
|
51337
51518
|
# @api private
|
@@ -51341,7 +51522,7 @@ RuboCop::Cop::VariableForce::MULTIPLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Sym
|
|
51341
51522
|
|
51342
51523
|
# @api private
|
51343
51524
|
#
|
51344
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51525
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#112
|
51345
51526
|
RuboCop::Cop::VariableForce::NODE_HANDLER_METHOD_NAMES = T.let(T.unsafe(nil), Hash)
|
51346
51527
|
|
51347
51528
|
# @api private
|
@@ -51351,7 +51532,7 @@ RuboCop::Cop::VariableForce::OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Ar
|
|
51351
51532
|
|
51352
51533
|
# @api private
|
51353
51534
|
#
|
51354
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51535
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#47
|
51355
51536
|
RuboCop::Cop::VariableForce::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array)
|
51356
51537
|
|
51357
51538
|
# @api private
|
@@ -51361,9 +51542,14 @@ RuboCop::Cop::VariableForce::REGEXP_NAMED_CAPTURE_TYPE = T.let(T.unsafe(nil), Sy
|
|
51361
51542
|
|
51362
51543
|
# @api private
|
51363
51544
|
#
|
51364
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51545
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#50
|
51365
51546
|
RuboCop::Cop::VariableForce::RESCUE_TYPE = T.let(T.unsafe(nil), Symbol)
|
51366
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
|
+
|
51367
51553
|
# This class represents each reference of a variable.
|
51368
51554
|
#
|
51369
51555
|
# source://rubocop//lib/rubocop/cop/variable_force/reference.rb#7
|
@@ -51411,12 +51597,12 @@ RuboCop::Cop::VariableForce::Reference::VARIABLE_REFERENCE_TYPES = T.let(T.unsaf
|
|
51411
51597
|
|
51412
51598
|
# @api private
|
51413
51599
|
#
|
51414
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51600
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#55
|
51415
51601
|
RuboCop::Cop::VariableForce::SCOPE_TYPES = T.let(T.unsafe(nil), Array)
|
51416
51602
|
|
51417
51603
|
# @api private
|
51418
51604
|
#
|
51419
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51605
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#57
|
51420
51606
|
RuboCop::Cop::VariableForce::SEND_TYPE = T.let(T.unsafe(nil), Symbol)
|
51421
51607
|
|
51422
51608
|
# A Scope represents a context of local variable visibility.
|
@@ -51495,7 +51681,7 @@ RuboCop::Cop::VariableForce::Scope::OUTER_SCOPE_CHILD_INDICES = T.let(T.unsafe(n
|
|
51495
51681
|
|
51496
51682
|
# @api private
|
51497
51683
|
#
|
51498
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51684
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#54
|
51499
51685
|
RuboCop::Cop::VariableForce::TWISTED_SCOPE_TYPES = T.let(T.unsafe(nil), Array)
|
51500
51686
|
|
51501
51687
|
# @api private
|
@@ -51510,7 +51696,7 @@ RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Ar
|
|
51510
51696
|
|
51511
51697
|
# @api private
|
51512
51698
|
#
|
51513
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51699
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#45
|
51514
51700
|
RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symbol)
|
51515
51701
|
|
51516
51702
|
# A Variable represents existence of a local variable.
|
@@ -51627,12 +51813,12 @@ RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsa
|
|
51627
51813
|
|
51628
51814
|
# @api private
|
51629
51815
|
#
|
51630
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51816
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#59
|
51631
51817
|
class RuboCop::Cop::VariableForce::VariableReference < ::Struct
|
51632
51818
|
# @api private
|
51633
51819
|
# @return [Boolean]
|
51634
51820
|
#
|
51635
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51821
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#60
|
51636
51822
|
def assignment?; end
|
51637
51823
|
|
51638
51824
|
# Returns the value of attribute name
|
@@ -51714,7 +51900,7 @@ end
|
|
51714
51900
|
|
51715
51901
|
# @api private
|
51716
51902
|
#
|
51717
|
-
# source://rubocop//lib/rubocop/cop/variable_force.rb#
|
51903
|
+
# source://rubocop//lib/rubocop/cop/variable_force.rb#52
|
51718
51904
|
RuboCop::Cop::VariableForce::ZERO_ARITY_SUPER_TYPE = T.let(T.unsafe(nil), Symbol)
|
51719
51905
|
|
51720
51906
|
# Help methods for determining node visibility.
|
@@ -55222,12 +55408,12 @@ module RuboCop::Version
|
|
55222
55408
|
class << self
|
55223
55409
|
# @api private
|
55224
55410
|
#
|
55225
|
-
# source://rubocop//lib/rubocop/version.rb#
|
55411
|
+
# source://rubocop//lib/rubocop/version.rb#93
|
55226
55412
|
def document_version; end
|
55227
55413
|
|
55228
55414
|
# @api private
|
55229
55415
|
#
|
55230
|
-
# source://rubocop//lib/rubocop/version.rb#
|
55416
|
+
# source://rubocop//lib/rubocop/version.rb#43
|
55231
55417
|
def extension_versions(env); end
|
55232
55418
|
|
55233
55419
|
# Returns feature version in one of two ways:
|
@@ -55237,17 +55423,17 @@ module RuboCop::Version
|
|
55237
55423
|
#
|
55238
55424
|
# @api private
|
55239
55425
|
#
|
55240
|
-
# source://rubocop//lib/rubocop/version.rb#
|
55426
|
+
# source://rubocop//lib/rubocop/version.rb#77
|
55241
55427
|
def feature_version(feature); end
|
55242
55428
|
|
55243
55429
|
# @api private
|
55244
55430
|
#
|
55245
|
-
# source://rubocop//lib/rubocop/version.rb#
|
55431
|
+
# source://rubocop//lib/rubocop/version.rb#98
|
55246
55432
|
def server_mode; end
|
55247
55433
|
|
55248
55434
|
# @api private
|
55249
55435
|
#
|
55250
|
-
# source://rubocop//lib/rubocop/version.rb#
|
55436
|
+
# source://rubocop//lib/rubocop/version.rb#21
|
55251
55437
|
def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end
|
55252
55438
|
end
|
55253
55439
|
end
|
@@ -55255,7 +55441,7 @@ end
|
|
55255
55441
|
# source://rubocop//lib/rubocop/version.rb#12
|
55256
55442
|
RuboCop::Version::CANONICAL_FEATURE_NAMES = T.let(T.unsafe(nil), Hash)
|
55257
55443
|
|
55258
|
-
# source://rubocop//lib/rubocop/version.rb#
|
55444
|
+
# source://rubocop//lib/rubocop/version.rb#16
|
55259
55445
|
RuboCop::Version::EXTENSION_PATH_NAMES = T.let(T.unsafe(nil), Hash)
|
55260
55446
|
|
55261
55447
|
# source://rubocop//lib/rubocop/version.rb#8
|