From c98deebdbf0cfac6d9c6c86fa0af138f334d7e99 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 12 Sep 2020 14:40:39 +0100 Subject: [PATCH] sorbet: Add a RBI file for `utils/svn.rb` typechecking - Needed to `include Kernel` otherwise Sorbet couldn't find the `system_command` method. - I've also attempted to construct method signatures for all the methods. - Before, `brew typecheck` surfaced 36 errors. Now we're down to 33 errors. --- Library/Homebrew/sorbet/rbi/utils/svn.rbi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Library/Homebrew/sorbet/rbi/utils/svn.rbi diff --git a/Library/Homebrew/sorbet/rbi/utils/svn.rbi b/Library/Homebrew/sorbet/rbi/utils/svn.rbi new file mode 100644 index 0000000000..b2081d8743 --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/utils/svn.rbi @@ -0,0 +1,14 @@ +# typed: strict + +module Utils::Svn + include Kernel + + sig { returns(T::Boolean) } + def available?; end + + sig { returns(T.nilable(String)) } + def version; end + + sig { params(url: String).returns(T::Boolean) } + def remote_exists?(url); end +end