Skip to content

Commit

Permalink
Make brew typecheck --update --suggest-typed bump strictness further
Browse files Browse the repository at this point in the history
- Not only `false` to `true` but `true` to `strict`.
- Only humans every run this, but our goal is to increase the
  typechecking in our files to get to `strict` everywhere so
  let's make that easy to remember to do.
  • Loading branch information
issyl0 committed Jun 2, 2024
1 parent 11f042e commit bd53f29
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Library/Homebrew/dev-cmd/typecheck.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ def run
safe_system "bundle", "exec", "parlour"

if args.suggest_typed?
ohai "Bumping Sorbet `typed` sigils..."
ohai "Checking if we can bump Sorbet `typed` sigils from `false` to `true` and from `true` to `strict`..."
# --sorbet needed because of https://github.com/Shopify/spoom/issues/488
safe_system "bundle", "exec", "spoom", "srb", "bump", "--dry", "--sorbet",
"#{Gem.bin_path("sorbet", "srb")} tc"
safe_system "bundle", "exec", "spoom", "srb", "bump", "--dry", "--from", "false", "--to", "true",
"--sorbet", "#{Gem.bin_path("sorbet", "srb")} tc"
safe_system "bundle", "exec", "spoom", "srb", "bump", "--dry", "--from", "true", "--to", "strict",
"--sorbet", "#{Gem.bin_path("sorbet", "srb")} tc"
end

return
Expand Down

0 comments on commit bd53f29

Please sign in to comment.