From 51763cbd1442d9bf2cf6a8b326e89f669cc86381 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Fri, 9 Feb 2024 18:13:03 +0000 Subject: [PATCH] Update RBI files for rubocop-sorbet. Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow. --- ...bet@0.7.6.rbi => rubocop-sorbet@0.7.7.rbi} | 59 +++++++++++++++++-- .../sorbet/rbi/hidden-definitions/hidden.rbi | 2 +- 2 files changed, 54 insertions(+), 7 deletions(-) rename Library/Homebrew/sorbet/rbi/gems/{rubocop-sorbet@0.7.6.rbi => rubocop-sorbet@0.7.7.rbi} (96%) diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop-sorbet@0.7.6.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop-sorbet@0.7.7.rbi similarity index 96% rename from Library/Homebrew/sorbet/rbi/gems/rubocop-sorbet@0.7.6.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop-sorbet@0.7.7.rbi index 1d487f3a6b5b8..53c38523951bf 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop-sorbet@0.7.6.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop-sorbet@0.7.7.rbi @@ -1199,12 +1199,6 @@ RuboCop::Cop::Sorbet::RedundantExtendTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil # - returns, or void # - soft, checked, or on_failure # -# # bad -# sig { returns(Integer).params(x: Integer) } -# -# # good -# sig { params(x: Integer).returns(Integer) } -# # @example # # bad # sig { void.abstract } @@ -1212,6 +1206,12 @@ RuboCop::Cop::Sorbet::RedundantExtendTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil # # good # sig { abstract.void } # +# # bad +# sig { returns(Integer).params(x: Integer) } +# +# # good +# sig { params(x: Integer).returns(Integer) } +# # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#31 class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Cop include ::RuboCop::Cop::Sorbet::SignatureHelp @@ -1474,6 +1474,53 @@ RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp) # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#53 RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array) +# Disallows the usage of `.void.checked(:tests)`. +# +# Using `.void` changes the value returned from the method, but only if +# runtime type checking is enabled for the method. Methods marked `.void` +# will return different values in tests compared with non-test +# environments. This is particularly troublesome if branching on the +# result of a `.void` method, because the returned value in test code +# will be the truthy `VOID` value, while the non-test return value may be +# falsy depending on the method's implementation. +# +# - Use `.returns(T.anything).checked(:tests)` to keep the runtime type +# checking for the rest of the parameters. +# - Use `.void.checked(:never)` if you are on an older version of Sorbet +# which does not have `T.anything` (meaning versions 0.5.10781 or +# earlier. Versions released after 2023-04-14 include `T.anything`.) +# +# @example +# +# # bad +# sig { void.checked(:tests) } +# +# # good +# sig { void } +# sig { returns(T.anything).checked(:tests) } +# sig { void.checked(:never) } +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb#31 +class RuboCop::Cop::Sorbet::VoidCheckedTests < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb#37 + def checked_tests(param0); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb#58 + def on_signature(node); end + + private + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb#48 + def top_level_void(node); end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/void_checked_tests.rb#41 +RuboCop::Cop::Sorbet::VoidCheckedTests::MESSAGE = T.let(T.unsafe(nil), String) + module RuboCop::Cop::Style; end class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base diff --git a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi index 9536c640c094e..7d7129511d813 100644 --- a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi +++ b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi @@ -6069,6 +6069,7 @@ class Object HOMEBREW_DEFAULT_LOGS = ::T.let(nil, ::T.untyped) HOMEBREW_DEFAULT_PREFIX = ::T.let(nil, ::T.untyped) HOMEBREW_DEFAULT_REPOSITORY = ::T.let(nil, ::T.untyped) + HOMEBREW_DEFAULT_TAP_CASK_REGEX = ::T.let(nil, ::T.untyped) HOMEBREW_DEFAULT_TEMP = ::T.let(nil, ::T.untyped) HOMEBREW_DOCS_WWW = ::T.let(nil, ::T.untyped) HOMEBREW_GITHUB_PACKAGES_AUTH = ::T.let(nil, ::T.untyped) @@ -6086,7 +6087,6 @@ class Object HOMEBREW_MACOS_OLDEST_ALLOWED = ::T.let(nil, ::T.untyped) HOMEBREW_MACOS_OLDEST_SUPPORTED = ::T.let(nil, ::T.untyped) HOMEBREW_MAINTAINER_JSON = ::T.let(nil, ::T.untyped) - HOMEBREW_MAIN_TAP_CASK_REGEX = ::T.let(nil, ::T.untyped) HOMEBREW_OFFICIAL_REPO_PREFIXES_REGEX = ::T.let(nil, ::T.untyped) HOMEBREW_PHYSICAL_PROCESSOR = ::T.let(nil, ::T.untyped) HOMEBREW_PINNED_KEGS = ::T.let(nil, ::T.untyped)