sorbet-result 0.1.1 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,7 +13,7 @@ module RBI; end
13
13
  class RBI::ASTVisitor
14
14
  abstract!
15
15
 
16
- # source://sorbet-runtime/0.5.10773/lib/types/private/abstract/declare.rb#37
16
+ # source://sorbet-runtime/0.5.10792/lib/types/private/abstract/declare.rb#37
17
17
  def initialize(*args, **_arg1, &blk); end
18
18
 
19
19
  # @abstract
@@ -1761,7 +1761,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct
1761
1761
  def to_s; end
1762
1762
 
1763
1763
  class << self
1764
- # source://sorbet-runtime/0.5.10773/lib/types/struct.rb#13
1764
+ # source://sorbet-runtime/0.5.10792/lib/types/struct.rb#13
1765
1765
  def inherited(s); end
1766
1766
  end
1767
1767
  end
@@ -1978,7 +1978,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct
1978
1978
  def to_s; end
1979
1979
 
1980
1980
  class << self
1981
- # source://sorbet-runtime/0.5.10773/lib/types/struct.rb#13
1981
+ # source://sorbet-runtime/0.5.10792/lib/types/struct.rb#13
1982
1982
  def inherited(s); end
1983
1983
  end
1984
1984
  end
@@ -2018,7 +2018,7 @@ class RBI::Scope < ::RBI::Tree
2018
2018
 
2019
2019
  abstract!
2020
2020
 
2021
- # source://sorbet-runtime/0.5.10773/lib/types/private/abstract/declare.rb#37
2021
+ # source://sorbet-runtime/0.5.10792/lib/types/private/abstract/declare.rb#37
2022
2022
  def initialize(*args, **_arg1, &blk); end
2023
2023
 
2024
2024
  # source://rbi//lib/rbi/printer.rb#240
@@ -2993,7 +2993,7 @@ end
2993
2993
  class RBI::Visitor
2994
2994
  abstract!
2995
2995
 
2996
- # source://sorbet-runtime/0.5.10773/lib/types/private/abstract/declare.rb#37
2996
+ # source://sorbet-runtime/0.5.10792/lib/types/private/abstract/declare.rb#37
2997
2997
  def initialize(*args, **_arg1, &blk); end
2998
2998
 
2999
2999
  # @abstract
@@ -5266,7 +5266,7 @@ RuboCop::AST::NodePattern::Sets::SET_READ_BINREAD = T.let(T.unsafe(nil), Set)
5266
5266
  RuboCop::AST::NodePattern::Sets::SET_REDUCE_INJECT = T.let(T.unsafe(nil), Set)
5267
5267
 
5268
5268
  # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10
5269
- RuboCop::AST::NodePattern::Sets::SET_REJECT_REJECT = T.let(T.unsafe(nil), Set)
5269
+ RuboCop::AST::NodePattern::Sets::SET_REJECT_DELETE_IF_REJECT = T.let(T.unsafe(nil), Set)
5270
5270
 
5271
5271
  # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10
5272
5272
  RuboCop::AST::NodePattern::Sets::SET_REQUIRE_REQUIRE_RELATIVE = T.let(T.unsafe(nil), Set)
@@ -5376,6 +5376,9 @@ RuboCop::AST::NodePattern::Sets::SET____ETC_2 = T.let(T.unsafe(nil), Set)
5376
5376
  # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10
5377
5377
  RuboCop::AST::NodePattern::Sets::SET____ETC_3 = T.let(T.unsafe(nil), Set)
5378
5378
 
5379
+ # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10
5380
+ RuboCop::AST::NodePattern::Sets::SET____ETC_4 = T.let(T.unsafe(nil), Set)
5381
+
5379
5382
  # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10
5380
5383
  RuboCop::AST::NodePattern::Sets::SET_____2 = T.let(T.unsafe(nil), Set)
5381
5384
 
@@ -1222,7 +1222,8 @@ RuboCop::Cop::Minitest::LiteralAsActualArgument::MSG = T.let(T.unsafe(nil), Stri
1222
1222
  # source://rubocop-minitest//lib/rubocop/cop/minitest/literal_as_actual_argument.rb#25
1223
1223
  RuboCop::Cop::Minitest::LiteralAsActualArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
1224
1224
 
1225
- # Checks if test cases contain too many assertion calls.
1225
+ # Checks if test cases contain too many assertion calls. If conditional code with assertions
1226
+ # is used, the branch with maximum assertions is counted.
1226
1227
  # The maximum allowed assertion calls is configurable.
1227
1228
  #
1228
1229
  # @example Max: 1
@@ -1245,23 +1246,29 @@ RuboCop::Cop::Minitest::LiteralAsActualArgument::RESTRICT_ON_SEND = T.let(T.unsa
1245
1246
  # end
1246
1247
  # end
1247
1248
  #
1248
- # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#29
1249
+ # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#30
1249
1250
  class RuboCop::Cop::Minitest::MultipleAssertions < ::RuboCop::Cop::Base
1250
1251
  include ::RuboCop::Cop::ConfigurableMax
1251
1252
  include ::RuboCop::Cop::VisibilityHelp
1252
1253
  include ::RuboCop::Cop::DefNode
1253
1254
  include ::RuboCop::Cop::MinitestExplorationHelpers
1254
1255
 
1255
- # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#35
1256
+ # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#36
1256
1257
  def on_class(class_node); end
1257
1258
 
1258
1259
  private
1259
1260
 
1260
- # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#52
1261
+ # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#53
1262
+ def assertions_count(node); end
1263
+
1264
+ # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#72
1265
+ def assertions_count_in_branches(branches); end
1266
+
1267
+ # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#76
1261
1268
  def max_assertions; end
1262
1269
  end
1263
1270
 
1264
- # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#33
1271
+ # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#34
1265
1272
  RuboCop::Cop::Minitest::MultipleAssertions::MSG = T.let(T.unsafe(nil), String)
1266
1273
 
1267
1274
  # Common functionality for `AssertNil` and `RefuteNil` cops.
@@ -2000,6 +2007,42 @@ RuboCop::Cop::Minitest::RefuteSame::MSG = T.let(T.unsafe(nil), String)
2000
2007
  # source://rubocop-minitest//lib/rubocop/cop/mixin/minitest_cop_rule.rb#44
2001
2008
  RuboCop::Cop::Minitest::RefuteSame::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
2002
2009
 
2010
+ # Enforces the use of `skip` instead of `return` in test methods.
2011
+ #
2012
+ # @example
2013
+ # # bad
2014
+ # def test_something
2015
+ # return if condition?
2016
+ # assert_equal(42, something)
2017
+ # end
2018
+ #
2019
+ # # good
2020
+ # def test_something
2021
+ # skip if condition?
2022
+ # assert_equal(42, something)
2023
+ # end
2024
+ #
2025
+ # source://rubocop-minitest//lib/rubocop/cop/minitest/return_in_test_method.rb#21
2026
+ class RuboCop::Cop::Minitest::ReturnInTestMethod < ::RuboCop::Cop::Base
2027
+ include ::RuboCop::Cop::VisibilityHelp
2028
+ include ::RuboCop::Cop::DefNode
2029
+ include ::RuboCop::Cop::MinitestExplorationHelpers
2030
+ extend ::RuboCop::Cop::AutoCorrector
2031
+
2032
+ # source://rubocop-minitest//lib/rubocop/cop/minitest/return_in_test_method.rb#27
2033
+ def on_return(node); end
2034
+
2035
+ private
2036
+
2037
+ # @return [Boolean]
2038
+ #
2039
+ # source://rubocop-minitest//lib/rubocop/cop/minitest/return_in_test_method.rb#38
2040
+ def inside_block?(node); end
2041
+ end
2042
+
2043
+ # source://rubocop-minitest//lib/rubocop/cop/minitest/return_in_test_method.rb#25
2044
+ RuboCop::Cop::Minitest::ReturnInTestMethod::MSG = T.let(T.unsafe(nil), String)
2045
+
2003
2046
  # Checks that `ensure` call even if `skip`. It is unexpected that `ensure` will be called when skipping test.
2004
2047
  # If conditional `skip` is used, it checks that `ensure` is also called conditionally.
2005
2048
  #