diff --git a/Library/Homebrew/PATH.rb b/Library/Homebrew/PATH.rb index af5513d6b4f42..9a5fdc0e5b213 100644 --- a/Library/Homebrew/PATH.rb +++ b/Library/Homebrew/PATH.rb @@ -10,14 +10,10 @@ class PATH delegate each: :@paths - # FIXME: Enable cop again when https://github.com/sorbet/sorbet/issues/3532 is fixed. - # rubocop:disable Style/MutableConstant Element = T.type_alias { T.nilable(T.any(Pathname, String, PATH)) } private_constant :Element Elements = T.type_alias { T.any(Element, T::Array[Element]) } private_constant :Elements - # rubocop:enable Style/MutableConstant - sig { params(paths: Elements).void } def initialize(*paths) @paths = parse(paths) diff --git a/Library/Homebrew/cask/staged.rb b/Library/Homebrew/cask/staged.rb index c358581e0945e..43d0e8c37c2ac 100644 --- a/Library/Homebrew/cask/staged.rb +++ b/Library/Homebrew/cask/staged.rb @@ -10,11 +10,7 @@ module Staged requires_ancestor { Kernel } - # FIXME: Enable cop again when https://github.com/sorbet/sorbet/issues/3532 is fixed. - # rubocop:disable Style/MutableConstant Paths = T.type_alias { T.any(String, Pathname, T::Array[T.any(String, Pathname)]) } - # rubocop:enable Style/MutableConstant - sig { params(paths: Paths, permissions_str: String).void } def set_permissions(paths, permissions_str) full_paths = remove_nonexistent(paths) diff --git a/Library/Homebrew/cli/args.rb b/Library/Homebrew/cli/args.rb index 648cd3aa71c76..462d4eef1e5ef 100644 --- a/Library/Homebrew/cli/args.rb +++ b/Library/Homebrew/cli/args.rb @@ -6,16 +6,12 @@ module Homebrew module CLI class Args < OpenStruct - # FIXME: Enable cop again when https://github.com/sorbet/sorbet/issues/3532 is fixed. - # rubocop:disable Style/MutableConstant # Represents a processed option. The array elements are: # 0: short option name (e.g. "-d") # 1: long option name (e.g. "--debug") # 2: option description (e.g. "Print debugging information") # 3: whether the option is hidden OptionsType = T.type_alias { T::Array[[String, T.nilable(String), String, T::Boolean]] } - # rubocop:enable Style/MutableConstant - sig { returns(T::Array[String]) } attr_reader :options_only, :flags_only diff --git a/Library/Homebrew/cli/parser.rb b/Library/Homebrew/cli/parser.rb index af8bec643791d..13bc524901ea3 100644 --- a/Library/Homebrew/cli/parser.rb +++ b/Library/Homebrew/cli/parser.rb @@ -13,10 +13,7 @@ module Homebrew module CLI class Parser - # FIXME: Enable cop again when https://github.com/sorbet/sorbet/issues/3532 is fixed. - # rubocop:disable Style/MutableConstant ArgType = T.type_alias { T.any(NilClass, Symbol, T::Array[String], T::Array[Symbol]) } - # rubocop:enable Style/MutableConstant HIDDEN_DESC_PLACEHOLDER = "@@HIDDEN@@" SYMBOL_TO_USAGE_MAPPING = T.let({ text_or_regex: "|`/``/`", diff --git a/Library/Homebrew/github_runner_matrix.rb b/Library/Homebrew/github_runner_matrix.rb index 8192fc3c5bc29..5671d999030c8 100644 --- a/Library/Homebrew/github_runner_matrix.rb +++ b/Library/Homebrew/github_runner_matrix.rb @@ -5,8 +5,6 @@ require "github_runner" class GitHubRunnerMatrix - # FIXME: Enable cop again when https://github.com/sorbet/sorbet/issues/3532 is fixed. - # rubocop:disable Style/MutableConstant RunnerSpec = T.type_alias { T.any(LinuxRunnerSpec, MacOSRunnerSpec) } private_constant :RunnerSpec @@ -36,8 +34,6 @@ class GitHubRunnerMatrix RunnerSpecHash = T.type_alias { T.any(LinuxRunnerSpecHash, MacOSRunnerSpecHash) } private_constant :RunnerSpecHash - # rubocop:enable Style/MutableConstant - sig { returns(T::Array[GitHubRunner]) } attr_reader :runners diff --git a/Library/Homebrew/sorbet/tapioca/compilers/args.rb b/Library/Homebrew/sorbet/tapioca/compilers/args.rb index b59ecaff3d1d4..b3ad828b483d2 100644 --- a/Library/Homebrew/sorbet/tapioca/compilers/args.rb +++ b/Library/Homebrew/sorbet/tapioca/compilers/args.rb @@ -13,12 +13,8 @@ class Args < Tapioca::Dsl::Compiler end.flatten.freeze, T::Array[String] ) - # FIXME: Enable cop again when https://github.com/sorbet/sorbet/issues/3532 is fixed. - # rubocop:disable Style/MutableConstant Parsable = T.type_alias { T.any(T.class_of(Homebrew::CLI::Args), T.class_of(Homebrew::AbstractCommand)) } ConstantType = type_member { { fixed: Parsable } } - # rubocop:enable Style/MutableConstant - sig { override.returns(T::Enumerable[Parsable]) } def self.gather_constants # require all the commands to ensure the command subclasses are defined diff --git a/Library/Homebrew/sorbet/tapioca/compilers/env_config.rb b/Library/Homebrew/sorbet/tapioca/compilers/env_config.rb index c57ff4a1132cf..4012ca9928df7 100644 --- a/Library/Homebrew/sorbet/tapioca/compilers/env_config.rb +++ b/Library/Homebrew/sorbet/tapioca/compilers/env_config.rb @@ -7,10 +7,7 @@ module Tapioca module Compilers class EnvConfig < Tapioca::Dsl::Compiler - # FIXME: Enable cop again when https://github.com/sorbet/sorbet/issues/3532 is fixed. - # rubocop:disable Style/MutableConstant ConstantType = type_member { { fixed: Module } } - # rubocop:enable Style/MutableConstant sig { override.returns(T::Enumerable[Module]) } def self.gather_constants = [Homebrew::EnvConfig] diff --git a/Library/Homebrew/sorbet/tapioca/compilers/rubocop.rb b/Library/Homebrew/sorbet/tapioca/compilers/rubocop.rb index d264f9c252b4b..86760ca5021c7 100644 --- a/Library/Homebrew/sorbet/tapioca/compilers/rubocop.rb +++ b/Library/Homebrew/sorbet/tapioca/compilers/rubocop.rb @@ -8,13 +8,9 @@ module Tapioca module Compilers class RuboCop < Tapioca::Dsl::Compiler - # FIXME: Enable cop again when https://github.com/sorbet/sorbet/issues/3532 is fixed. - # rubocop:disable Style/MutableConstant # This should be a module whose singleton class contains RuboCop::AST::NodePattern::Macros, # but I don't know how to express that in Sorbet. ConstantType = type_member { { fixed: Module } } - # rubocop:enable Style/MutableConstant - sig { override.returns(T::Enumerable[Module]) } def self.gather_constants all_modules.select do |klass| diff --git a/Library/Homebrew/sorbet/tapioca/compilers/tty.rb b/Library/Homebrew/sorbet/tapioca/compilers/tty.rb index c24e60e386750..22a20f0aa219a 100644 --- a/Library/Homebrew/sorbet/tapioca/compilers/tty.rb +++ b/Library/Homebrew/sorbet/tapioca/compilers/tty.rb @@ -7,10 +7,7 @@ module Tapioca module Compilers class Tty < Tapioca::Dsl::Compiler - # FIXME: Enable cop again when https://github.com/sorbet/sorbet/issues/3532 is fixed. - # rubocop:disable Style/MutableConstant ConstantType = type_member { { fixed: Module } } - # rubocop:enable Style/MutableConstant sig { override.returns(T::Enumerable[Module]) } def self.gather_constants = [::Tty] diff --git a/Library/Homebrew/unpack_strategy.rb b/Library/Homebrew/unpack_strategy.rb index aadd9535c6c2a..e234442d9ecff 100644 --- a/Library/Homebrew/unpack_strategy.rb +++ b/Library/Homebrew/unpack_strategy.rb @@ -11,10 +11,7 @@ module UnpackStrategy requires_ancestor { Kernel } - # FIXME: Enable cop again when https://github.com/sorbet/sorbet/issues/3532 is fixed. - # rubocop:disable Style/MutableConstant UnpackStrategyType = T.type_alias { T.all(T::Class[UnpackStrategy], UnpackStrategy::ClassMethods) } - # rubocop:enable Style/MutableConstant module ClassMethods extend T::Helpers