Skip to content

Commit

Permalink
Merge pull request #18023 from Homebrew/use-rubocop-for-sorbet-strict…
Browse files Browse the repository at this point in the history
…-sigils

rubocop: Use `Sorbet/StrictSigil` as it's better than comments
  • Loading branch information
issyl0 authored Aug 12, 2024
2 parents c8732c6 + 4597843 commit 1376c5d
Show file tree
Hide file tree
Showing 277 changed files with 284 additions and 280 deletions.
10 changes: 5 additions & 5 deletions Library/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,11 @@ Sorbet/RedundantExtendTSig:

Sorbet/StrictSigil:
Enabled: true
inherit_mode:
override:
- Include
Include:
- "**/*.rbi"
Exclude:
- "Taps/**/*"
- "/**/{Formula,Casks}/**/*.rb"
- "**/{Formula,Casks}/**/*.rb"
- "Homebrew/test/**/*.rb"

Sorbet/TrueSigil:
Enabled: true
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/PATH.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "forwardable"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/api.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "api/analytics"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/api/analytics.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

module Homebrew
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/api/cask.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "extend/cachable"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/api/download.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "downloadable"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/api/formula.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "extend/cachable"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/build.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

# This script is loaded by formula_installer as a separate instance.
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/build_environment.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

# Settings for the build environment.
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/build_options.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

# Options for a formula build.
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/bundle_version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "system_command"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cache_store.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "json"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/abstract_artifact.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "attrable"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/abstract_flight_block.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/artifact/abstract_artifact"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/abstract_uninstall.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "timeout"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/binary.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/artifact/symlinked"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/installer.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/artifact/abstract_artifact"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/keyboard_layout.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/manpage.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/artifact/symlinked"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/mdimporter.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/moved.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/artifact/relocated"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/pkg.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "plist"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/qlplugin.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/artifact/moved"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/relocated.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/artifact/abstract_artifact"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/stage_only.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/artifact/abstract_artifact"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/symlinked.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/artifact/relocated"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/uninstall.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/artifact/abstract_uninstall"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/zap.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/artifact/abstract_uninstall"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact_set.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

module Cask
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/audit.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "attrable"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/auditor.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/audit"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/cask.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "attrable"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/cask_loader.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/cache"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/caskroom.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "utils/user"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/config.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "json"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/download.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "downloadable"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/dsl.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "attrable"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/dsl/base.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/utils"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/dsl/caveats.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "attrable"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/dsl/conflicts_with.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "delegate"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/dsl/container.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "unpack_strategy"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/dsl/depends_on.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "delegate"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/dsl/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

module Cask
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/exceptions.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

module Cask
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/installer.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "attrable"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/list.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/artifact/relocated"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/macos.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

module OS
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

module Cask
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/migrator.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/cask_loader"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/pkg.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "cask/macos"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/quarantine.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "development_tools"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/reinstall.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

module Cask
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/staged.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "utils/user"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/tab.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "tab"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/uninstall.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

module Cask
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/url.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "source_location"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/utils.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "utils/user"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask_dependent.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "requirement"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/caveats.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "language/python"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cleaner.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

# Cleans a newly installed keg.
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cleanup.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "utils/bottles"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cli/args.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true # This cannot be `# typed: strict` due to the use of `undef`.
# typed: true # rubocop:disable Sorbet/StrictSigil
# frozen_string_literal: true

require "ostruct"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cli/named_args.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "delegate"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cmd/deps.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: true
# typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true

require "abstract_command"
Expand Down
Loading

0 comments on commit 1376c5d

Please sign in to comment.