sorbet-result 0.3.0 → 1.0.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 +1 -1
- data/CHANGELOG.md +13 -0
- data/Gemfile.lock +17 -15
- data/README.md +16 -2
- data/lib/typed/failure.rb +20 -0
- data/lib/typed/result.rb +15 -0
- data/lib/typed/success.rb +19 -0
- data/sorbet/rbi/gems/{minitest@5.18.0.rbi → minitest@5.18.1.rbi} +134 -134
- data/sorbet/rbi/gems/{parser@3.2.2.1.rbi → parser@3.2.2.3.rbi} +544 -544
- data/sorbet/rbi/gems/racc@1.7.1.rbi +161 -0
- data/sorbet/rbi/gems/{regexp_parser@2.8.0.rbi → regexp_parser@2.8.1.rbi} +33 -32
- data/sorbet/rbi/gems/{rubocop@1.52.0.rbi → rubocop@1.52.1.rbi} +155 -169
- data/sorbet/rbi/gems/{unparser@0.6.7.rbi → unparser@0.6.8.rbi} +19 -18
- metadata +9 -8
@@ -4878,7 +4878,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter
|
|
4878
4878
|
|
4879
4879
|
# Legacy
|
4880
4880
|
#
|
4881
|
-
# source://parser/3.2.2.
|
4881
|
+
# source://parser/3.2.2.3/lib/parser/source/tree_rewriter.rb#252
|
4882
4882
|
def rewrite; end
|
4883
4883
|
|
4884
4884
|
# Swaps sources at the given ranges.
|
@@ -7953,53 +7953,53 @@ RuboCop::Cop::Layout::ClassStructure::MSG = T.let(T.unsafe(nil), String)
|
|
7953
7953
|
# Hi
|
7954
7954
|
# EOS
|
7955
7955
|
#
|
7956
|
-
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#
|
7956
|
+
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#48
|
7957
7957
|
class RuboCop::Cop::Layout::ClosingHeredocIndentation < ::RuboCop::Cop::Base
|
7958
7958
|
include ::RuboCop::Cop::Heredoc
|
7959
7959
|
extend ::RuboCop::Cop::AutoCorrector
|
7960
7960
|
|
7961
|
-
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#
|
7961
|
+
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#57
|
7962
7962
|
def on_heredoc(node); end
|
7963
7963
|
|
7964
7964
|
private
|
7965
7965
|
|
7966
7966
|
# @return [Boolean]
|
7967
7967
|
#
|
7968
|
-
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#
|
7968
|
+
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#74
|
7969
7969
|
def argument_indentation_correct?(node); end
|
7970
7970
|
|
7971
|
-
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#
|
7971
|
+
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#82
|
7972
7972
|
def closing_indentation(node); end
|
7973
7973
|
|
7974
|
-
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#
|
7974
|
+
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#101
|
7975
7975
|
def find_node_used_heredoc_argument(node); end
|
7976
7976
|
|
7977
|
-
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#
|
7977
|
+
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#90
|
7978
7978
|
def heredoc_closing(node); end
|
7979
7979
|
|
7980
|
-
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#
|
7980
|
+
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#86
|
7981
7981
|
def heredoc_opening(node); end
|
7982
7982
|
|
7983
|
-
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#
|
7983
|
+
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#117
|
7984
7984
|
def indent_level(source_line); end
|
7985
7985
|
|
7986
|
-
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#
|
7986
|
+
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#94
|
7987
7987
|
def indented_end(node); end
|
7988
7988
|
|
7989
|
-
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#
|
7989
|
+
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#109
|
7990
7990
|
def message(node); end
|
7991
7991
|
|
7992
|
-
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#
|
7992
|
+
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#70
|
7993
7993
|
def opening_indentation(node); end
|
7994
7994
|
end
|
7995
7995
|
|
7996
|
-
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#
|
7996
|
+
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#53
|
7997
7997
|
RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG = T.let(T.unsafe(nil), String)
|
7998
7998
|
|
7999
|
-
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#
|
7999
|
+
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#54
|
8000
8000
|
RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG_ARG = T.let(T.unsafe(nil), String)
|
8001
8001
|
|
8002
|
-
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#
|
8002
|
+
# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#52
|
8003
8003
|
RuboCop::Cop::Layout::ClosingHeredocIndentation::SIMPLE_HEREDOC = T.let(T.unsafe(nil), String)
|
8004
8004
|
|
8005
8005
|
# Checks the indentation of hanging closing parentheses in
|
@@ -18689,7 +18689,7 @@ end
|
|
18689
18689
|
# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#51
|
18690
18690
|
RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String)
|
18691
18691
|
|
18692
|
-
#
|
18692
|
+
# Emulates the following Ruby warnings in Ruby 2.6.
|
18693
18693
|
#
|
18694
18694
|
# [source,console]
|
18695
18695
|
# ----
|
@@ -18744,42 +18744,42 @@ RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String)
|
|
18744
18744
|
# ERB.new(str, nil, '-', '@output_buffer')
|
18745
18745
|
# end
|
18746
18746
|
#
|
18747
|
-
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#
|
18747
|
+
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#61
|
18748
18748
|
class RuboCop::Cop::Lint::ErbNewArguments < ::RuboCop::Cop::Base
|
18749
18749
|
include ::RuboCop::Cop::RangeHelp
|
18750
18750
|
extend ::RuboCop::Cop::AutoCorrector
|
18751
18751
|
extend ::RuboCop::Cop::TargetRubyVersion
|
18752
18752
|
|
18753
|
-
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#
|
18753
|
+
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#83
|
18754
18754
|
def erb_new_with_non_keyword_arguments(param0 = T.unsafe(nil)); end
|
18755
18755
|
|
18756
|
-
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#
|
18756
|
+
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#88
|
18757
18757
|
def on_send(node); end
|
18758
18758
|
|
18759
18759
|
private
|
18760
18760
|
|
18761
|
-
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#
|
18761
|
+
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#153
|
18762
18762
|
def arguments_range(node); end
|
18763
18763
|
|
18764
|
-
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#
|
18764
|
+
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#108
|
18765
18765
|
def autocorrect(corrector, node); end
|
18766
18766
|
|
18767
|
-
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#
|
18767
|
+
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#123
|
18768
18768
|
def build_kwargs(node); end
|
18769
18769
|
|
18770
18770
|
# @return [Boolean]
|
18771
18771
|
#
|
18772
|
-
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#
|
18772
|
+
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#119
|
18773
18773
|
def correct_arguments?(arguments); end
|
18774
18774
|
|
18775
|
-
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#
|
18775
|
+
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#140
|
18776
18776
|
def override_by_legacy_args(kwargs, node); end
|
18777
18777
|
end
|
18778
18778
|
|
18779
|
-
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#
|
18779
|
+
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#68
|
18780
18780
|
RuboCop::Cop::Lint::ErbNewArguments::MESSAGES = T.let(T.unsafe(nil), Array)
|
18781
18781
|
|
18782
|
-
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#
|
18782
|
+
# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#80
|
18783
18783
|
RuboCop::Cop::Lint::ErbNewArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
18784
18784
|
|
18785
18785
|
# Looks for uses of flip-flop operator
|
@@ -19184,30 +19184,30 @@ RuboCop::Cop::Lint::HeredocMethodCallPosition::MSG = T.let(T.unsafe(nil), String
|
|
19184
19184
|
# # good
|
19185
19185
|
# foo.equal?(bar)
|
19186
19186
|
#
|
19187
|
-
# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#
|
19187
|
+
# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#18
|
19188
19188
|
class RuboCop::Cop::Lint::IdentityComparison < ::RuboCop::Cop::Base
|
19189
19189
|
extend ::RuboCop::Cop::AutoCorrector
|
19190
19190
|
|
19191
|
-
# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#
|
19191
|
+
# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#24
|
19192
19192
|
def on_send(node); end
|
19193
19193
|
|
19194
19194
|
private
|
19195
19195
|
|
19196
19196
|
# @return [Boolean]
|
19197
19197
|
#
|
19198
|
-
# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#
|
19198
|
+
# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#40
|
19199
19199
|
def compare_between_object_id_by_double_equal?(node); end
|
19200
19200
|
|
19201
19201
|
# @return [Boolean]
|
19202
19202
|
#
|
19203
|
-
# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#
|
19203
|
+
# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#44
|
19204
19204
|
def object_id_method?(node); end
|
19205
19205
|
end
|
19206
19206
|
|
19207
|
-
# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#
|
19207
|
+
# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#21
|
19208
19208
|
RuboCop::Cop::Lint::IdentityComparison::MSG = T.let(T.unsafe(nil), String)
|
19209
19209
|
|
19210
|
-
# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#
|
19210
|
+
# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#22
|
19211
19211
|
RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
19212
19212
|
|
19213
19213
|
# Checks for implicit string concatenation of string literals
|
@@ -19268,7 +19268,7 @@ RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil
|
|
19268
19268
|
# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#26
|
19269
19269
|
RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), String)
|
19270
19270
|
|
19271
|
-
#
|
19271
|
+
# Checks for `IO.select` that is incompatible with Fiber Scheduler since Ruby 3.0.
|
19272
19272
|
#
|
19273
19273
|
# When an array of IO objects waiting for an exception (the third argument of `IO.select`)
|
19274
19274
|
# is used as an argument, there is no alternative API, so offenses are not registered.
|
@@ -19292,31 +19292,31 @@ RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), Stri
|
|
19292
19292
|
# # good
|
19293
19293
|
# io.wait_writable(timeout)
|
19294
19294
|
#
|
19295
|
-
# 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#34
|
19296
19296
|
class RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler < ::RuboCop::Cop::Base
|
19297
19297
|
extend ::RuboCop::Cop::AutoCorrector
|
19298
19298
|
|
19299
|
-
# 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#41
|
19300
19300
|
def io_select(param0 = T.unsafe(nil)); end
|
19301
19301
|
|
19302
|
-
# 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#46
|
19303
19303
|
def on_send(node); end
|
19304
19304
|
|
19305
19305
|
private
|
19306
19306
|
|
19307
|
-
# 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#69
|
19308
19308
|
def preferred_method(read, write, timeout); end
|
19309
19309
|
|
19310
19310
|
# @return [Boolean]
|
19311
19311
|
#
|
19312
|
-
# 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#63
|
19313
19313
|
def scheduler_compatible?(io1, io2); end
|
19314
19314
|
end
|
19315
19315
|
|
19316
|
-
# 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#37
|
19317
19317
|
RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::MSG = T.let(T.unsafe(nil), String)
|
19318
19318
|
|
19319
|
-
# 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#38
|
19320
19320
|
RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
19321
19321
|
|
19322
19322
|
# Checks for `private` or `protected` access modifiers which are
|
@@ -19463,7 +19463,7 @@ class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base
|
|
19463
19463
|
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#83
|
19464
19464
|
def message(node); end
|
19465
19465
|
|
19466
|
-
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#
|
19466
|
+
# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#99
|
19467
19467
|
def preferred_base_class; end
|
19468
19468
|
end
|
19469
19469
|
|
@@ -20822,24 +20822,24 @@ RuboCop::Cop::Lint::OrAssignmentToConstant::MSG = T.let(T.unsafe(nil), String)
|
|
20822
20822
|
# # frozen_string_literal: true
|
20823
20823
|
# p [''.frozen?, ''.encoding] #=> [true, #<Encoding:US-ASCII>]
|
20824
20824
|
#
|
20825
|
-
# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#
|
20825
|
+
# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#32
|
20826
20826
|
class RuboCop::Cop::Lint::OrderedMagicComments < ::RuboCop::Cop::Base
|
20827
20827
|
include ::RuboCop::Cop::FrozenStringLiteral
|
20828
20828
|
extend ::RuboCop::Cop::AutoCorrector
|
20829
20829
|
|
20830
|
-
# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#
|
20830
|
+
# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#38
|
20831
20831
|
def on_new_investigation; end
|
20832
20832
|
|
20833
20833
|
private
|
20834
20834
|
|
20835
|
-
# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#
|
20835
|
+
# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#55
|
20836
20836
|
def autocorrect(corrector, encoding_line, frozen_string_literal_line); end
|
20837
20837
|
|
20838
|
-
# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#
|
20838
|
+
# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#63
|
20839
20839
|
def magic_comment_lines; end
|
20840
20840
|
end
|
20841
20841
|
|
20842
|
-
# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#
|
20842
|
+
# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#36
|
20843
20843
|
RuboCop::Cop::Lint::OrderedMagicComments::MSG = T.let(T.unsafe(nil), String)
|
20844
20844
|
|
20845
20845
|
# Looks for references of Regexp captures that are out of range
|
@@ -21572,7 +21572,6 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T
|
|
21572
21572
|
# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#51
|
21573
21573
|
class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base
|
21574
21574
|
include ::RuboCop::Cop::AllowedMethods
|
21575
|
-
include ::RuboCop::Cop::NilMethods
|
21576
21575
|
include ::RuboCop::Cop::RangeHelp
|
21577
21576
|
extend ::RuboCop::Cop::AutoCorrector
|
21578
21577
|
|
@@ -22487,7 +22486,7 @@ RuboCop::Cop::Lint::SelfAssignment::ASSIGNMENT_TYPE_TO_RHS_TYPE = T.let(T.unsafe
|
|
22487
22486
|
# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#20
|
22488
22487
|
RuboCop::Cop::Lint::SelfAssignment::MSG = T.let(T.unsafe(nil), String)
|
22489
22488
|
|
22490
|
-
#
|
22489
|
+
# Checks for `send`, `public_send`, and `__send__` methods
|
22491
22490
|
# when using mix-in.
|
22492
22491
|
#
|
22493
22492
|
# `include` and `prepend` methods were private methods until Ruby 2.0,
|
@@ -22517,41 +22516,41 @@ RuboCop::Cop::Lint::SelfAssignment::MSG = T.let(T.unsafe(nil), String)
|
|
22517
22516
|
# Foo.prepend Bar
|
22518
22517
|
# Foo.extend Bar
|
22519
22518
|
#
|
22520
|
-
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#
|
22519
|
+
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#36
|
22521
22520
|
class RuboCop::Cop::Lint::SendWithMixinArgument < ::RuboCop::Cop::Base
|
22522
22521
|
include ::RuboCop::Cop::RangeHelp
|
22523
22522
|
extend ::RuboCop::Cop::AutoCorrector
|
22524
22523
|
|
22525
|
-
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#
|
22524
|
+
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#53
|
22526
22525
|
def on_send(node); end
|
22527
22526
|
|
22528
|
-
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#
|
22527
|
+
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#46
|
22529
22528
|
def send_with_mixin_argument?(param0 = T.unsafe(nil)); end
|
22530
22529
|
|
22531
22530
|
private
|
22532
22531
|
|
22533
|
-
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#
|
22532
|
+
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#67
|
22534
22533
|
def bad_location(node); end
|
22535
22534
|
|
22536
|
-
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#
|
22535
|
+
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#73
|
22537
22536
|
def message(method, module_name, bad_method); end
|
22538
22537
|
|
22539
22538
|
# @return [Boolean]
|
22540
22539
|
#
|
22541
|
-
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#
|
22540
|
+
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#77
|
22542
22541
|
def mixin_method?(node); end
|
22543
22542
|
end
|
22544
22543
|
|
22545
|
-
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#
|
22544
|
+
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#41
|
22546
22545
|
RuboCop::Cop::Lint::SendWithMixinArgument::MIXIN_METHODS = T.let(T.unsafe(nil), Array)
|
22547
22546
|
|
22548
|
-
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#
|
22547
|
+
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#40
|
22549
22548
|
RuboCop::Cop::Lint::SendWithMixinArgument::MSG = T.let(T.unsafe(nil), String)
|
22550
22549
|
|
22551
|
-
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#
|
22550
|
+
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#43
|
22552
22551
|
RuboCop::Cop::Lint::SendWithMixinArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
22553
22552
|
|
22554
|
-
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#
|
22553
|
+
# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#42
|
22555
22554
|
RuboCop::Cop::Lint::SendWithMixinArgument::SEND_METHODS = T.let(T.unsafe(nil), Array)
|
22556
22555
|
|
22557
22556
|
# Checks for shadowed arguments.
|
@@ -22741,7 +22740,7 @@ class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base
|
|
22741
22740
|
# source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#119
|
22742
22741
|
def evaluate_exceptions(group); end
|
22743
22742
|
|
22744
|
-
# source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#
|
22743
|
+
# source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#152
|
22745
22744
|
def find_shadowing_rescue(rescues); end
|
22746
22745
|
|
22747
22746
|
# source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#84
|
@@ -22752,7 +22751,7 @@ class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base
|
|
22752
22751
|
|
22753
22752
|
# @return [Boolean]
|
22754
22753
|
#
|
22755
|
-
# source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#
|
22754
|
+
# source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#137
|
22756
22755
|
def sorted?(rescued_groups); end
|
22757
22756
|
|
22758
22757
|
# @return [Boolean]
|
@@ -24406,19 +24405,19 @@ class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base
|
|
24406
24405
|
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#95
|
24407
24406
|
def operator_assignment_message(scope, assignment); end
|
24408
24407
|
|
24409
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24408
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#153
|
24410
24409
|
def remove_exception_assignment_part(corrector, node); end
|
24411
24410
|
|
24412
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24411
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#177
|
24413
24412
|
def remove_local_variable_assignment_part(corrector, node); end
|
24414
24413
|
|
24415
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24414
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#166
|
24416
24415
|
def remove_trailing_character_from_operator(corrector, node); end
|
24417
24416
|
|
24418
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24417
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#162
|
24419
24418
|
def rename_variable_with_underscore(corrector, node); end
|
24420
24419
|
|
24421
|
-
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#
|
24420
|
+
# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#170
|
24422
24421
|
def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end
|
24423
24422
|
|
24424
24423
|
# TODO: More precise handling (rescue, ensure, nested begin, etc.)
|
@@ -25822,7 +25821,7 @@ class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator
|
|
25822
25821
|
|
25823
25822
|
# @return [Boolean]
|
25824
25823
|
#
|
25825
|
-
# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#
|
25824
|
+
# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#127
|
25826
25825
|
def argument?(node); end
|
25827
25826
|
|
25828
25827
|
# @return [Boolean]
|
@@ -25832,7 +25831,7 @@ class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator
|
|
25832
25831
|
|
25833
25832
|
# @return [Boolean]
|
25834
25833
|
#
|
25835
|
-
# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#
|
25834
|
+
# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#123
|
25836
25835
|
def branch?(node); end
|
25837
25836
|
|
25838
25837
|
# @return [Boolean]
|
@@ -25845,7 +25844,7 @@ class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator
|
|
25845
25844
|
|
25846
25845
|
# @return [Boolean]
|
25847
25846
|
#
|
25848
|
-
# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#
|
25847
|
+
# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#131
|
25849
25848
|
def condition?(node); end
|
25850
25849
|
|
25851
25850
|
# @return [Boolean]
|
@@ -30659,19 +30658,19 @@ end
|
|
30659
30658
|
# source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#30
|
30660
30659
|
RuboCop::Cop::Style::BarePercentLiterals::MSG = T.let(T.unsafe(nil), String)
|
30661
30660
|
|
30662
|
-
#
|
30661
|
+
# Checks for BEGIN blocks.
|
30663
30662
|
#
|
30664
30663
|
# @example
|
30665
30664
|
# # bad
|
30666
30665
|
# BEGIN { test }
|
30667
30666
|
#
|
30668
|
-
# source://rubocop//lib/rubocop/cop/style/begin_block.rb#
|
30667
|
+
# source://rubocop//lib/rubocop/cop/style/begin_block.rb#12
|
30669
30668
|
class RuboCop::Cop::Style::BeginBlock < ::RuboCop::Cop::Base
|
30670
|
-
# source://rubocop//lib/rubocop/cop/style/begin_block.rb#
|
30669
|
+
# source://rubocop//lib/rubocop/cop/style/begin_block.rb#15
|
30671
30670
|
def on_preexe(node); end
|
30672
30671
|
end
|
30673
30672
|
|
30674
|
-
# source://rubocop//lib/rubocop/cop/style/begin_block.rb#
|
30673
|
+
# source://rubocop//lib/rubocop/cop/style/begin_block.rb#13
|
30675
30674
|
RuboCop::Cop::Style::BeginBlock::MSG = T.let(T.unsafe(nil), String)
|
30676
30675
|
|
30677
30676
|
# Checks for places where `attr_reader` and `attr_writer`
|
@@ -31599,7 +31598,7 @@ RuboCop::Cop::Style::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
|
31599
31598
|
|
31600
31599
|
# Enforces the use of `Object#instance_of?` instead of class comparison
|
31601
31600
|
# for equality.
|
31602
|
-
# `==`, `equal?`, and `eql?`
|
31601
|
+
# `==`, `equal?`, and `eql?` custom method definitions are allowed by default.
|
31603
31602
|
# These are customizable with `AllowedMethods` option.
|
31604
31603
|
#
|
31605
31604
|
# @example
|
@@ -31611,98 +31610,77 @@ RuboCop::Cop::Style::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
|
31611
31610
|
#
|
31612
31611
|
# # good
|
31613
31612
|
# var.instance_of?(Date)
|
31614
|
-
# @example AllowedMethods: [] (default)
|
31613
|
+
# @example AllowedMethods: ['==', 'equal?', 'eql?'] (default)
|
31615
31614
|
# # good
|
31616
|
-
#
|
31615
|
+
# def ==(other)
|
31616
|
+
# self.class == other.class && name == other.name
|
31617
|
+
# end
|
31617
31618
|
#
|
31618
|
-
#
|
31619
|
-
#
|
31620
|
-
#
|
31621
|
-
# var.class.eql?(Date)
|
31622
|
-
# var.class.name == 'Date'
|
31623
|
-
# var.class.to_s == 'Date'
|
31624
|
-
# var.class.inspect == 'Date'
|
31625
|
-
# @example AllowedMethods: [`==`]
|
31626
|
-
# # good
|
31627
|
-
# var.instance_of?(Date)
|
31628
|
-
# var.class == Date
|
31629
|
-
# var.class.name == 'Date'
|
31630
|
-
# var.class.to_s == 'Date'
|
31631
|
-
# var.class.inspect == 'Date'
|
31619
|
+
# def equal?(other)
|
31620
|
+
# self.class.equal?(other.class) && name.equal?(other.name)
|
31621
|
+
# end
|
31632
31622
|
#
|
31633
|
-
#
|
31634
|
-
#
|
31635
|
-
#
|
31623
|
+
# def eql?(other)
|
31624
|
+
# self.class.eql?(other.class) && name.eql?(other.name)
|
31625
|
+
# end
|
31636
31626
|
# @example AllowedPatterns: [] (default)
|
31637
|
-
# # good
|
31638
|
-
# var.instance_of?(Date)
|
31639
|
-
#
|
31640
31627
|
# # bad
|
31641
|
-
#
|
31642
|
-
#
|
31643
|
-
#
|
31644
|
-
# var.class.name == 'Date'
|
31645
|
-
# var.class.to_s == 'Date'
|
31646
|
-
# var.class.inspect == 'Date'
|
31628
|
+
# def eq(other)
|
31629
|
+
# self.class.eq(other.class) && name.eq(other.name)
|
31630
|
+
# end
|
31647
31631
|
# @example AllowedPatterns: ['eq']
|
31648
31632
|
# # good
|
31649
|
-
#
|
31650
|
-
#
|
31651
|
-
#
|
31652
|
-
#
|
31653
|
-
# # bad
|
31654
|
-
# var.class == Date
|
31655
|
-
# var.class.name == 'Date'
|
31656
|
-
# var.class.to_s == 'Date'
|
31657
|
-
# var.class.inspect == 'Date'
|
31633
|
+
# def eq(other)
|
31634
|
+
# self.class.eq(other.class) && name.eq(other.name)
|
31635
|
+
# end
|
31658
31636
|
#
|
31659
|
-
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#
|
31637
|
+
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#47
|
31660
31638
|
class RuboCop::Cop::Style::ClassEqualityComparison < ::RuboCop::Cop::Base
|
31661
31639
|
include ::RuboCop::Cop::RangeHelp
|
31662
31640
|
include ::RuboCop::Cop::AllowedMethods
|
31663
31641
|
include ::RuboCop::Cop::AllowedPattern
|
31664
31642
|
extend ::RuboCop::Cop::AutoCorrector
|
31665
31643
|
|
31666
|
-
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#
|
31644
|
+
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#59
|
31667
31645
|
def class_comparison_candidate?(param0 = T.unsafe(nil)); end
|
31668
31646
|
|
31669
|
-
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#
|
31647
|
+
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#65
|
31670
31648
|
def on_send(node); end
|
31671
31649
|
|
31672
31650
|
private
|
31673
31651
|
|
31674
|
-
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#
|
31652
|
+
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#85
|
31675
31653
|
def class_name(class_node, node); end
|
31676
31654
|
|
31677
31655
|
# @return [Boolean]
|
31678
31656
|
#
|
31679
|
-
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#
|
31657
|
+
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#105
|
31680
31658
|
def class_name_method?(method_name); end
|
31681
31659
|
|
31682
|
-
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#
|
31660
|
+
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#121
|
31683
31661
|
def offense_range(receiver_node, node); end
|
31684
31662
|
|
31685
31663
|
# @return [Boolean]
|
31686
31664
|
#
|
31687
|
-
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#
|
31665
|
+
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#109
|
31688
31666
|
def require_cbase?(class_node); end
|
31689
31667
|
|
31690
|
-
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#
|
31668
|
+
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#117
|
31691
31669
|
def trim_string_quotes(class_node); end
|
31692
31670
|
|
31693
31671
|
# @return [Boolean]
|
31694
31672
|
#
|
31695
|
-
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#
|
31673
|
+
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#113
|
31696
31674
|
def unable_to_determine_type?(class_node); end
|
31697
31675
|
end
|
31698
31676
|
|
31699
|
-
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#
|
31677
|
+
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#56
|
31700
31678
|
RuboCop::Cop::Style::ClassEqualityComparison::CLASS_NAME_METHODS = T.let(T.unsafe(nil), Array)
|
31701
31679
|
|
31702
|
-
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#
|
31680
|
+
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#53
|
31703
31681
|
RuboCop::Cop::Style::ClassEqualityComparison::MSG = T.let(T.unsafe(nil), String)
|
31704
31682
|
|
31705
|
-
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#
|
31683
|
+
# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#55
|
31706
31684
|
RuboCop::Cop::Style::ClassEqualityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
31707
31685
|
|
31708
31686
|
# Checks for uses of the class/module name instead of
|
@@ -33264,7 +33242,7 @@ end
|
|
33264
33242
|
# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45
|
33265
33243
|
RuboCop::Cop::Style::DefWithParentheses::MSG = T.let(T.unsafe(nil), String)
|
33266
33244
|
|
33267
|
-
# Checks for places where the
|
33245
|
+
# Checks for places where the `#\_\_dir\_\_` method can replace more
|
33268
33246
|
# complex constructs to retrieve a canonicalized absolute path to the
|
33269
33247
|
# current file.
|
33270
33248
|
#
|
@@ -33323,12 +33301,12 @@ class RuboCop::Cop::Style::DirEmpty < ::RuboCop::Cop::Base
|
|
33323
33301
|
# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#28
|
33324
33302
|
def offensive?(param0 = T.unsafe(nil)); end
|
33325
33303
|
|
33326
|
-
# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#
|
33304
|
+
# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#37
|
33327
33305
|
def on_send(node); end
|
33328
33306
|
|
33329
33307
|
private
|
33330
33308
|
|
33331
|
-
# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#
|
33309
|
+
# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#48
|
33332
33310
|
def bang(node); end
|
33333
33311
|
end
|
33334
33312
|
|
@@ -34747,12 +34725,12 @@ RuboCop::Cop::Style::EnvHome::MSG = T.let(T.unsafe(nil), String)
|
|
34747
34725
|
RuboCop::Cop::Style::EnvHome::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
34748
34726
|
|
34749
34727
|
# Ensures that eval methods (`eval`, `instance_eval`, `class_eval`
|
34750
|
-
# and `module_eval`) are given filename and line number values (`
|
34751
|
-
# and `
|
34728
|
+
# and `module_eval`) are given filename and line number values (`\_\_FILE\_\_`
|
34729
|
+
# and `\_\_LINE\_\_`). This data is used to ensure that any errors raised
|
34752
34730
|
# within the evaluated code will be given the correct identification
|
34753
34731
|
# in a backtrace.
|
34754
34732
|
#
|
34755
|
-
# The cop also checks that the line number given relative to `
|
34733
|
+
# The cop also checks that the line number given relative to `\_\_LINE\_\_` is
|
34756
34734
|
# correct.
|
34757
34735
|
#
|
34758
34736
|
# This cop will autocorrect incorrect or missing filename and line number
|
@@ -36869,8 +36847,8 @@ RuboCop::Cop::Style::HashSyntax::MSG_HASH_ROCKETS = T.let(T.unsafe(nil), String)
|
|
36869
36847
|
# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#120
|
36870
36848
|
RuboCop::Cop::Style::HashSyntax::MSG_NO_MIXED_KEYS = T.let(T.unsafe(nil), String)
|
36871
36849
|
|
36872
|
-
# Looks for uses of
|
36873
|
-
#
|
36850
|
+
# Looks for uses of `\_.each_with_object({}) {...}`,
|
36851
|
+
# `\_.map {...}.to_h`, and `Hash[\_.map {...}]` that are actually just
|
36874
36852
|
# transforming the keys of a hash, and tries to use a simpler & faster
|
36875
36853
|
# call to `transform_keys` instead.
|
36876
36854
|
# It should only be enabled on Ruby version 2.5 or newer.
|
@@ -36914,8 +36892,8 @@ class RuboCop::Cop::Style::HashTransformKeys < ::RuboCop::Cop::Base
|
|
36914
36892
|
def new_method_name; end
|
36915
36893
|
end
|
36916
36894
|
|
36917
|
-
# Looks for uses of
|
36918
|
-
#
|
36895
|
+
# Looks for uses of `\_.each_with_object({}) {...}`,
|
36896
|
+
# `\_.map {...}.to_h`, and `Hash[\_.map {...}]` that are actually just
|
36919
36897
|
# transforming the values of a hash, and tries to use a simpler & faster
|
36920
36898
|
# call to `transform_values` instead.
|
36921
36899
|
#
|
@@ -47093,10 +47071,10 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
|
|
47093
47071
|
|
47094
47072
|
# @return [Boolean]
|
47095
47073
|
#
|
47096
|
-
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#
|
47074
|
+
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#240
|
47097
47075
|
def allow_modifier?; end
|
47098
47076
|
|
47099
|
-
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#
|
47077
|
+
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#225
|
47100
47078
|
def arguments_range(node); end
|
47101
47079
|
|
47102
47080
|
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81
|
@@ -47129,10 +47107,10 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
|
|
47129
47107
|
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#182
|
47130
47108
|
def correct_outer_condition(corrector, condition); end
|
47131
47109
|
|
47132
|
-
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#
|
47110
|
+
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#195
|
47133
47111
|
def insert_bang(corrector, node, is_modify_form); end
|
47134
47112
|
|
47135
|
-
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#
|
47113
|
+
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#208
|
47136
47114
|
def insert_bang_for_and(corrector, node); end
|
47137
47115
|
|
47138
47116
|
# @return [Boolean]
|
@@ -47142,15 +47120,15 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
|
|
47142
47120
|
|
47143
47121
|
# @return [Boolean]
|
47144
47122
|
#
|
47145
|
-
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#
|
47123
|
+
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#244
|
47146
47124
|
def outer_condition_modify_form?(node, if_branch); end
|
47147
47125
|
|
47148
|
-
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#
|
47126
|
+
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#236
|
47149
47127
|
def replace_condition(condition); end
|
47150
47128
|
|
47151
47129
|
# @return [Boolean]
|
47152
47130
|
#
|
47153
|
-
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#
|
47131
|
+
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#220
|
47154
47132
|
def require_parentheses?(condition); end
|
47155
47133
|
|
47156
47134
|
# @return [Boolean]
|
@@ -47163,7 +47141,7 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
|
|
47163
47141
|
|
47164
47142
|
# @return [Boolean]
|
47165
47143
|
#
|
47166
|
-
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#
|
47144
|
+
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#231
|
47167
47145
|
def wrap_condition?(node); end
|
47168
47146
|
|
47169
47147
|
class << self
|
@@ -47175,7 +47153,7 @@ end
|
|
47175
47153
|
# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#53
|
47176
47154
|
RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String)
|
47177
47155
|
|
47178
|
-
#
|
47156
|
+
# Looks for uses of Perl-style global variables.
|
47179
47157
|
# Correcting to global variables in the 'English' library
|
47180
47158
|
# will add a require statement to the top of the file if
|
47181
47159
|
# enabled by RequireEnglish config.
|
@@ -47250,88 +47228,88 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String)
|
|
47250
47228
|
# puts $*
|
47251
47229
|
# @example EnforcedStyle: use_builtin_english_names
|
47252
47230
|
#
|
47253
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47231
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#87
|
47254
47232
|
class RuboCop::Cop::Style::SpecialGlobalVars < ::RuboCop::Cop::Base
|
47255
47233
|
include ::RuboCop::Cop::ConfigurableEnforcedStyle
|
47256
47234
|
include ::RuboCop::Cop::RangeHelp
|
47257
47235
|
include ::RuboCop::Cop::RequireLibrary
|
47258
47236
|
extend ::RuboCop::Cop::AutoCorrector
|
47259
47237
|
|
47260
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47238
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#176
|
47261
47239
|
def autocorrect(corrector, node, global_var); end
|
47262
47240
|
|
47263
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47241
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#168
|
47264
47242
|
def message(global_var); end
|
47265
47243
|
|
47266
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47244
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#152
|
47267
47245
|
def on_gvar(node); end
|
47268
47246
|
|
47269
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47247
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#147
|
47270
47248
|
def on_new_investigation; end
|
47271
47249
|
|
47272
47250
|
private
|
47273
47251
|
|
47274
47252
|
# @return [Boolean]
|
47275
47253
|
#
|
47276
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47254
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#247
|
47277
47255
|
def add_require_english?; end
|
47278
47256
|
|
47279
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47257
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#241
|
47280
47258
|
def english_name_replacement(preferred_name, node); end
|
47281
47259
|
|
47282
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47260
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#190
|
47283
47261
|
def format_english_message(global_var); end
|
47284
47262
|
|
47285
47263
|
# For now, we assume that lists are 2 items or less. Easy grammar!
|
47286
47264
|
#
|
47287
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47265
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#212
|
47288
47266
|
def format_list(items); end
|
47289
47267
|
|
47290
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47268
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#198
|
47291
47269
|
def format_message(english, regular, global); end
|
47292
47270
|
|
47293
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47271
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#235
|
47294
47272
|
def matching_styles(global); end
|
47295
47273
|
|
47296
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47274
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#227
|
47297
47275
|
def preferred_names(global); end
|
47298
47276
|
|
47299
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47277
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#216
|
47300
47278
|
def replacement(node, global_var); end
|
47301
47279
|
|
47302
47280
|
# @return [Boolean]
|
47303
47281
|
#
|
47304
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47282
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#251
|
47305
47283
|
def should_require_english?(global_var); end
|
47306
47284
|
end
|
47307
47285
|
|
47308
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47286
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#128
|
47309
47287
|
RuboCop::Cop::Style::SpecialGlobalVars::BUILTIN_VARS = T.let(T.unsafe(nil), Hash)
|
47310
47288
|
|
47311
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47289
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#100
|
47312
47290
|
RuboCop::Cop::Style::SpecialGlobalVars::ENGLISH_VARS = T.let(T.unsafe(nil), Hash)
|
47313
47291
|
|
47314
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47292
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#145
|
47315
47293
|
RuboCop::Cop::Style::SpecialGlobalVars::LIBRARY_NAME = T.let(T.unsafe(nil), String)
|
47316
47294
|
|
47317
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47295
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#93
|
47318
47296
|
RuboCop::Cop::Style::SpecialGlobalVars::MSG_BOTH = T.let(T.unsafe(nil), String)
|
47319
47297
|
|
47320
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47298
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#96
|
47321
47299
|
RuboCop::Cop::Style::SpecialGlobalVars::MSG_ENGLISH = T.let(T.unsafe(nil), String)
|
47322
47300
|
|
47323
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47301
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#98
|
47324
47302
|
RuboCop::Cop::Style::SpecialGlobalVars::MSG_REGULAR = T.let(T.unsafe(nil), String)
|
47325
47303
|
|
47326
47304
|
# Anything *not* in this set is provided by the English library.
|
47327
47305
|
#
|
47328
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47306
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#122
|
47329
47307
|
RuboCop::Cop::Style::SpecialGlobalVars::NON_ENGLISH_VARS = T.let(T.unsafe(nil), Set)
|
47330
47308
|
|
47331
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47309
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#124
|
47332
47310
|
RuboCop::Cop::Style::SpecialGlobalVars::PERL_VARS = T.let(T.unsafe(nil), Hash)
|
47333
47311
|
|
47334
|
-
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#
|
47312
|
+
# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#139
|
47335
47313
|
RuboCop::Cop::Style::SpecialGlobalVars::STYLE_VARS_MAP = T.let(T.unsafe(nil), Hash)
|
47336
47314
|
|
47337
47315
|
# Check for parentheses around stabby lambda arguments.
|
@@ -50980,7 +50958,12 @@ class RuboCop::Cop::VariableForce::Assignment
|
|
50980
50958
|
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#50
|
50981
50959
|
def exception_assignment?; end
|
50982
50960
|
|
50983
|
-
#
|
50961
|
+
# @return [Boolean]
|
50962
|
+
#
|
50963
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#72
|
50964
|
+
def for_assignment?; end
|
50965
|
+
|
50966
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#83
|
50984
50967
|
def meta_assignment_node; end
|
50985
50968
|
|
50986
50969
|
# @return [Boolean]
|
@@ -50996,7 +50979,7 @@ class RuboCop::Cop::VariableForce::Assignment
|
|
50996
50979
|
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12
|
50997
50980
|
def node; end
|
50998
50981
|
|
50999
|
-
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#
|
50982
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#78
|
51000
50983
|
def operator; end
|
51001
50984
|
|
51002
50985
|
# @return [Boolean]
|
@@ -51047,13 +51030,16 @@ class RuboCop::Cop::VariableForce::Assignment
|
|
51047
51030
|
|
51048
51031
|
private
|
51049
51032
|
|
51050
|
-
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#
|
51033
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#120
|
51034
|
+
def for_assignment_node; end
|
51035
|
+
|
51036
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#104
|
51051
51037
|
def multiple_assignment_node; end
|
51052
51038
|
|
51053
|
-
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#
|
51039
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#96
|
51054
51040
|
def operator_assignment_node; end
|
51055
51041
|
|
51056
|
-
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#
|
51042
|
+
# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#113
|
51057
51043
|
def rest_assignment_node; end
|
51058
51044
|
end
|
51059
51045
|
|