Skip to content

Commit

Permalink
Merge pull request Homebrew#8896 from reitermarkus/sorbet-inline
Browse files Browse the repository at this point in the history
Inline type annotations.
  • Loading branch information
reitermarkus committed Oct 13, 2020
2 parents 2a9bb36 + 73dc98d commit bf7fe45
Show file tree
Hide file tree
Showing 894 changed files with 1,689 additions and 1,838 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/sorbet.yml
@@ -1,4 +1,4 @@
name: Update Sorbet-related files
name: Update Sorbet files
on:
push:
paths:
Expand Down Expand Up @@ -39,7 +39,8 @@ jobs:
if brew typecheck --update --fail-if-not-changed; then
git add "$GITHUB_WORKSPACE/Library/Homebrew/sorbet"
git commit -m "sorbet: Update RBI files and prune files.yaml." -m "Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml)."
git commit -m "sorbet: Update RBI files." \
-m "Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow."
echo "::set-output name=committed::true"
if [ -n "$BRANCH_EXISTS" ]; then
echo "::set-output name=pull_request::true"
Expand Down
20 changes: 18 additions & 2 deletions Library/.rubocop.yml
Expand Up @@ -12,7 +12,12 @@ AllCops:
DisplayCopNames: false
# enable all pending rubocops
NewCops: enable
Include:
- '**/*.rbi'
Exclude:
- 'Homebrew/sorbet/rbi/gems/**/*.rbi'
- 'Homebrew/sorbet/rbi/hidden-definitions/**/*.rbi'
- 'Homebrew/sorbet/rbi/todo.rbi'
- 'Homebrew/bin/*'
- 'Homebrew/vendor/**/*'

Expand Down Expand Up @@ -62,6 +67,10 @@ Naming/HeredocDelimiterNaming:
ForbiddenDelimiters:
- END, EOD, EOF

Naming/MethodName:
IgnoredPatterns:
- '\AHEAD\?\Z'

# Allow dashes in filenames.
Naming/FileName:
Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/
Expand Down Expand Up @@ -264,9 +273,14 @@ Layout/LineLength:
' "~/Library/Application Support/', '"~/Library/Caches/', '"~/Application Support',
' was verified as official when first introduced to the cask']

# Enable once we are using `sorbet-runtime`.
Sorbet/FalseSigil:
Enabled: false
Exclude:
- 'Taps/**/*.rb'
- 'Homebrew/test/**/Casks/**/*.rb'

Sorbet/StrictSigil:
Include:
- '**/*.rbi'

# Try getting rid of these.
Sorbet/ConstantsFromStrings:
Expand Down Expand Up @@ -302,6 +316,7 @@ Style/ClassVars:
Style/Documentation:
Exclude:
- 'Taps/**/*'
- '**/*.rbi'

Style/DocumentationMethod:
Include:
Expand All @@ -313,6 +328,7 @@ Style/FrozenStringLiteralComment:
Exclude:
- 'Taps/*/*/{Formula,Casks,}/*.rb'
- 'Homebrew/test/**/Casks/**/*.rb'
- '**/*.rbi'

# TODO: remove this when possible.
Style/GlobalVars:
Expand Down
4 changes: 0 additions & 4 deletions Library/Homebrew/.rubocop.yml
Expand Up @@ -45,10 +45,6 @@ Naming/PredicateName:
# Can't rename these.
AllowedMethods: is_32_bit?, is_64_bit?

Style/FrozenStringLiteralComment:
Exclude:
- '**/Casks/**/*.rb'

Style/HashAsLastArrayItem:
Exclude:
- 'test/utils/spdx_spec.rb'
1 change: 1 addition & 0 deletions Library/Homebrew/PATH.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

# Represention of a `*PATH` environment variable.
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/bintray.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "utils/curl"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/brew.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

if ENV["HOMEBREW_STACKPROF"]
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/build.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

# This script is loaded by formula_installer as a separate instance.
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/build_environment.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

# Settings for the build environment.
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/build_options.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

# Options for a formula build.
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cache_store.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

require "json"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask.rb
@@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true

require "cask/artifact"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact.rb
@@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true

require "cask/artifact/app"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/abstract_artifact.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

module Cask
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/abstract_flight_block.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

require "cask/artifact/abstract_artifact"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/abstract_uninstall.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "timeout"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/app.rb
@@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/artifact.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/audio_unit_plugin.rb
@@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/binary.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

require "cask/artifact/symlinked"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/colorpicker.rb
@@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/dictionary.rb
@@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/font.rb
@@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/input_method.rb
@@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/installer.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "cask/artifact/abstract_artifact"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/internet_plugin.rb
@@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/manpage.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

require "cask/artifact/symlinked"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/mdimporter.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/moved.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "cask/artifact/relocated"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/pkg.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "plist"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/postflight_block.rb
@@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true

require "cask/artifact/abstract_flight_block"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/preflight_block.rb
@@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true

require "cask/artifact/abstract_flight_block"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/prefpane.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/qlplugin.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/relocated.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

require "cask/artifact/abstract_artifact"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/screen_saver.rb
@@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/service.rb
@@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/stage_only.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

require "cask/artifact/abstract_artifact"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/suite.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/symlinked.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "cask/artifact/relocated"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/uninstall.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "cask/artifact/abstract_uninstall"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/vst3_plugin.rb
@@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/vst_plugin.rb
@@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/artifact/zap.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "cask/artifact/abstract_uninstall"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/audit.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "cask/denylist"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/auditor.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

require "cask/audit"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cache.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

module Cask
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cask.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "cask/cask_loader"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cask_loader.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "cask/cache"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/caskroom.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "utils/user"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "optparse"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd/--cache.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

module Cask
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd/abstract_command.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "search"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd/abstract_internal_command.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

module Cask
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd/audit.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "utils/github/actions"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd/cat.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

module Cask
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd/create.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

module Cask
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd/doctor.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

module Cask
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd/edit.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

module Cask
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd/fetch.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

module Cask
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd/help.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

module Cask
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd/home.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

module Cask
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd/info.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "json"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd/install.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

module Cask
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd/internal_help.rb
@@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true

module Cask
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd/internal_stanza.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "cask/dsl"
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/cask/cmd/list.rb
@@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true

require "cask/artifact/relocated"
Expand Down

0 comments on commit bf7fe45

Please sign in to comment.