Merge pull request #8896 from reitermarkus/sorbet-inline

Inline type annotations.
This commit is contained in:
Markus Reiter 2020-10-13 10:40:53 +02:00 committed by GitHub
commit bf7fe45e89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
894 changed files with 1706 additions and 1855 deletions

View File

@ -1,4 +1,4 @@
name: Update Sorbet-related files name: Update Sorbet files
on: on:
push: push:
paths: paths:
@ -39,7 +39,8 @@ jobs:
if brew typecheck --update --fail-if-not-changed; then if brew typecheck --update --fail-if-not-changed; then
git add "$GITHUB_WORKSPACE/Library/Homebrew/sorbet" 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" echo "::set-output name=committed::true"
if [ -n "$BRANCH_EXISTS" ]; then if [ -n "$BRANCH_EXISTS" ]; then
echo "::set-output name=pull_request::true" echo "::set-output name=pull_request::true"

View File

@ -12,7 +12,12 @@ AllCops:
DisplayCopNames: false DisplayCopNames: false
# enable all pending rubocops # enable all pending rubocops
NewCops: enable NewCops: enable
Include:
- '**/*.rbi'
Exclude: Exclude:
- 'Homebrew/sorbet/rbi/gems/**/*.rbi'
- 'Homebrew/sorbet/rbi/hidden-definitions/**/*.rbi'
- 'Homebrew/sorbet/rbi/todo.rbi'
- 'Homebrew/bin/*' - 'Homebrew/bin/*'
- 'Homebrew/vendor/**/*' - 'Homebrew/vendor/**/*'
@ -62,6 +67,10 @@ Naming/HeredocDelimiterNaming:
ForbiddenDelimiters: ForbiddenDelimiters:
- END, EOD, EOF - END, EOD, EOF
Naming/MethodName:
IgnoredPatterns:
- '\AHEAD\?\Z'
# Allow dashes in filenames. # Allow dashes in filenames.
Naming/FileName: Naming/FileName:
Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/ Regex: !ruby/regexp /^[\w\@\-\+\.]+(\.rb)?$/
@ -264,9 +273,14 @@ Layout/LineLength:
' "~/Library/Application Support/', '"~/Library/Caches/', '"~/Application Support', ' "~/Library/Application Support/', '"~/Library/Caches/', '"~/Application Support',
' was verified as official when first introduced to the cask'] ' was verified as official when first introduced to the cask']
# Enable once we are using `sorbet-runtime`.
Sorbet/FalseSigil: Sorbet/FalseSigil:
Enabled: false Exclude:
- 'Taps/**/*.rb'
- 'Homebrew/test/**/Casks/**/*.rb'
Sorbet/StrictSigil:
Include:
- '**/*.rbi'
# Try getting rid of these. # Try getting rid of these.
Sorbet/ConstantsFromStrings: Sorbet/ConstantsFromStrings:
@ -302,6 +316,7 @@ Style/ClassVars:
Style/Documentation: Style/Documentation:
Exclude: Exclude:
- 'Taps/**/*' - 'Taps/**/*'
- '**/*.rbi'
Style/DocumentationMethod: Style/DocumentationMethod:
Include: Include:
@ -313,6 +328,7 @@ Style/FrozenStringLiteralComment:
Exclude: Exclude:
- 'Taps/*/*/{Formula,Casks,}/*.rb' - 'Taps/*/*/{Formula,Casks,}/*.rb'
- 'Homebrew/test/**/Casks/**/*.rb' - 'Homebrew/test/**/Casks/**/*.rb'
- '**/*.rbi'
# TODO: remove this when possible. # TODO: remove this when possible.
Style/GlobalVars: Style/GlobalVars:

View File

@ -45,10 +45,6 @@ Naming/PredicateName:
# Can't rename these. # Can't rename these.
AllowedMethods: is_32_bit?, is_64_bit? AllowedMethods: is_32_bit?, is_64_bit?
Style/FrozenStringLiteralComment:
Exclude:
- '**/Casks/**/*.rb'
Style/HashAsLastArrayItem: Style/HashAsLastArrayItem:
Exclude: Exclude:
- 'test/utils/spdx_spec.rb' - 'test/utils/spdx_spec.rb'

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
# Represention of a `*PATH` environment variable. # Represention of a `*PATH` environment variable.

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "utils/curl" require "utils/curl"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
if ENV["HOMEBREW_STACKPROF"] if ENV["HOMEBREW_STACKPROF"]

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
# This script is loaded by formula_installer as a separate instance. # This script is loaded by formula_installer as a separate instance.

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
# Settings for the build environment. # Settings for the build environment.

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
# Options for a formula build. # Options for a formula build.

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
require "json" require "json"

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact" require "cask/artifact"

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/app" require "cask/artifact/app"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/abstract_artifact" require "cask/artifact/abstract_artifact"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "timeout" require "timeout"

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/moved" require "cask/artifact/moved"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/moved" require "cask/artifact/moved"

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/moved" require "cask/artifact/moved"

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/symlinked" require "cask/artifact/symlinked"

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/moved" require "cask/artifact/moved"

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/moved" require "cask/artifact/moved"

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/moved" require "cask/artifact/moved"

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/moved" require "cask/artifact/moved"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/abstract_artifact" require "cask/artifact/abstract_artifact"

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/moved" require "cask/artifact/moved"

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/symlinked" require "cask/artifact/symlinked"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/moved" require "cask/artifact/moved"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/relocated" require "cask/artifact/relocated"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "plist" require "plist"

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/abstract_flight_block" require "cask/artifact/abstract_flight_block"

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/abstract_flight_block" require "cask/artifact/abstract_flight_block"

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/moved" require "cask/artifact/moved"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/moved" require "cask/artifact/moved"

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/abstract_artifact" require "cask/artifact/abstract_artifact"

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/moved" require "cask/artifact/moved"

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/moved" require "cask/artifact/moved"

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/abstract_artifact" require "cask/artifact/abstract_artifact"

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/moved" require "cask/artifact/moved"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/relocated" require "cask/artifact/relocated"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/abstract_uninstall" require "cask/artifact/abstract_uninstall"

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/moved" require "cask/artifact/moved"

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/moved" require "cask/artifact/moved"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/abstract_uninstall" require "cask/artifact/abstract_uninstall"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "cask/denylist" require "cask/denylist"

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
require "cask/audit" require "cask/audit"

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "cask/cask_loader" require "cask/cask_loader"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "cask/cache" require "cask/cache"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "utils/user" require "utils/user"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "optparse" require "optparse"

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "search" require "search"

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "utils/github/actions" require "utils/github/actions"

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "json" require "json"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "cask/dsl" require "cask/dsl"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "cask/artifact/relocated" require "cask/artifact/relocated"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "json" require "json"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "env_config" require "env_config"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "json" require "json"

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
require "fileutils" require "fileutils"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "locale" require "locale"

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "cask/utils" require "cask/utils"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "delegate" require "delegate"

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
require "unpack_strategy" require "unpack_strategy"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "delegate" require "delegate"

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
require "cask/staged" require "cask/staged"

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "cask/staged" require "cask/staged"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "formula_installer" require "formula_installer"

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
require "os/mac/version" require "os/mac/version"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
require "cask/macos" require "cask/macos"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "development_tools" require "development_tools"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "utils/user" require "utils/user"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "tsort" require "tsort"

View File

@ -1,4 +1,4 @@
# typed: strict # typed: true
# frozen_string_literal: true # frozen_string_literal: true
# Class corresponding to the `url` stanza. # Class corresponding to the `url` stanza.

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "utils/user" require "utils/user"

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
module Cask module Cask

View File

@ -1,3 +1,4 @@
# typed: true
# frozen_string_literal: true # frozen_string_literal: true
# An adapter for casks to provide dependency information in a formula-like interface # An adapter for casks to provide dependency information in a formula-like interface

View File

@ -1,3 +1,4 @@
# typed: false
# frozen_string_literal: true # frozen_string_literal: true
require "language/python" require "language/python"

Some files were not shown because too many files have changed in this diff Show More