13 Commits

Author SHA1 Message Date
Markus Reiter
b90290b18c Refactor and document Bottles. 2020-08-23 04:44:57 +02:00
vidusheeamoli
c7ce119633 sorbet: solve typecheck errors. 23 => 15 errors 2020-08-11 02:53:10 +05:30
vidusheeamoli
c27916cd87 srb/inreplace.rbi: add method signatures 2020-07-26 13:32:17 +05:30
vidusheeamoli
fd382d2ecd srb: set utils/inreplace.rb to true and refactor
- Sorbet gives preference to class methods over methods defined in
  included modules, hence Sorbet was unavailable to resolve the
definition of the gsub! method.
- The gsub! method in StringInreplaceExtension conflicts with the definition in String.
- This PR refactors the call to the gsub! method so that a custom object
  is exposed instead of a string.
2020-07-26 12:43:31 +05:30
Issy Long
2536f0a09f
Merge pull request #7946 from vidusheeamoli/utils-user-to-true
sorbet: set utils/user.rb to true
2020-07-11 17:55:44 +01:00
vidusheeamoli
9799f32506 sorbet: set utils/user.rb to true 2020-07-11 01:04:22 +05:30
vidusheeamoli
ca97f93bd4 sorbet: set utils/shebang.rb to true 2020-07-09 23:22:48 +05:30
vidusheeamoli
5d91491a93 sorbet: set utils/link.rb to true 2020-07-09 23:18:51 +05:30
Issy Long
2c3b2f68cd
Revert #7933 ("sorbet: set utils/git.rb to true")
- My refactoring of #7933 went wrong in that the tests passed for `brew
  extract` and my manual testing, but both forgot about third-party taps
  exist, so that functionality broke as follows (courtesy of Misty).

  Before:

  ```
  # Git.last_revision_commit_of_files("/usr/local/Homebrew", ["LICENSE.txt", "README.md"])
  => ["ac0665d", ["README.md"]]
  ```

  After:

  ```
  # Git.last_revision_commit_of_files("/usr/local/Homebrew", ["LICENSE.txt", "README.md"])
  => [nil, []]
  ```

- While we think about how to do splats in Sorbet, revert this so
  that users are able to `brew extract` from third party taps again.

- A TODO for later in a separate PR is to write a test for `brew
  extract` that tests the behaviour of third-party taps.

---

- Reverted this manually because the GitHub UI couldn't do it.
- Arguably I didn't need to remove the RBI file, but it's easier to have
  everything gone for now and then revert this revert in future once we
  have a strategy for dealing with splats in Sorbet than have
  inconsistency.
2020-07-09 08:18:38 +01:00
vidusheeamoli
79ac3875d5 sorbet: set utils/notability.rb to true 2020-07-08 23:38:42 +05:30
vidusheeamoli
76a2e69990 sorbet: set utils/git.rb to true
(cherry picked from commit 44a04adb1de430066af73a65766eb644c0f5bd41)
2020-07-08 22:34:26 +05:30
vidusheeamoli
5fe38ad7a0 srb: set utils files to true
Set utils/bottles.rb, utils/shell.rb and utils/svn.rb to true so that
type errors in these files may be reported by Sorbet

(cherry picked from commit fd3db131b0da78169fdff2031180a2bebe3cbb84)
2020-07-03 00:51:08 +05:30
vidusheeamoli
89605d2c6f sorbet/files.yaml: set utils/tty.rb to true 2020-07-02 16:05:54 +05:30