mirror of
https://github.com/Homebrew/brew.git
synced 2026-08-12 22:29:27 +04:00
Update rubocop to 1.89.0
Also updates rubocop-sorbet (0.13.2 -> 0.14.0) and json (2.21.1 -> 2.21.2), which rubocop depends on. Two suppressions can go away thanks to bug fixes in this release: - rubocop/rubocop#15438 and rubocop/rubocop#15442 stop `Style/ArrayIntersect` firing when the `include?` receiver in a block is not an array literal, so the cop is re-enabled. It still cannot guarantee the *outer* receiver is an `Array`, and in `cask/artifact/abstract_uninstall.rb` that receiver is the `Enumerator` from `Pathname#each_filename`, which has no `intersect?`. Convert with `to_a` there rather than taking the autocorrect verbatim. - rubocop/rubocop#15452 fixes the `Layout/HashAlignment` false positive on multi-line hash keys, so the two `delegate` disable comments in `formula.rb` are dead and removed. One suppression is added: rubocop/rubocop#15493 makes `Style/IfUnlessModifier` respect `Layout/LineLength`'s exemptions rather than its `Max`. Several of our exemption patterns are unescaped regexes (`"#{version."` matches `#{version}`, `#{version_text}` and `#{version_info[...]}`), so the cop demanded modifier form for statements that then ran to 179 characters. Disable the cop. Reported upstream as rubocop/rubocop#15531. rubocop-sorbet 0.14.0 widens `Sorbet/SetterReturnType` to cover setters taking splat and keyword arguments, so several `depends_on` and ENV setters switch to `.void`. Under `HOMEBREW_SORBET_RUNTIME` a `.void` method returns the sentinel `T::Private::Types::Void::VOID`, which breaks the two callers that consumed a setter's return value. Sorbet does not catch either statically: - `DependsOn#load` stored the result of `send(:"#{key}=", ...)` into the delegated hash, so the whole `depends_on` stanza became `VOID`. Read the value back through the matching reader instead. - `Superenv#cc=` assigned `super` to `HOMEBREW_CC`, raising `TypeError: no implicit conversion of Module into String`. Assign from `val`. Drop `extend/ENV/shared.rbi`, which existed to widen `[]=` to accept `Pathname` and `PATH`. Without it `[]=` resolves to Sorbet's own `ENVClass#[]=`, which takes `T.nilable(String)`, so the ENV assignments convert explicitly with `to_s`/`&.to_s`. Both `Pathname` and `PATH` define `to_str`, so Ruby was already converting implicitly and behaviour is unchanged. The remaining changes are new offenses in this release: - `Lint/UselessAssignment` (rubocop/rubocop#12269) catches the `root_url = root_url =` workaround in `dev-cmd/tap-new.rb`. The Ruby `assigned but unused variable` warning it silenced no longer fires on our vendored Ruby, so drop it. - `Style/RedundantParentheses` (rubocop/rubocop#15472) and `Layout/MultilineMethodCallIndentation` autocorrections. The redundant `T.let` on `GitHub::API::ERRORS` is also dropped. Claude-Session: https://claude.ai/code/session_01AdSQcU5MmY4VWiFdfrPeu2
This commit is contained in:
@@ -354,12 +354,6 @@ Style/AndOr:
|
||||
Style/ArgumentsForwarding:
|
||||
Enabled: false
|
||||
|
||||
# Autocorrects `include?`/`member?` block patterns to `intersect?` even when the second operand
|
||||
# isn't actually an `Array` (e.g. `String`, `Set`, `Enumerator`), which can raise at runtime.
|
||||
# Re-enable once a rubocop version with https://github.com/rubocop/rubocop/pull/15442 is released.
|
||||
Style/ArrayIntersect:
|
||||
Enabled: false
|
||||
|
||||
# Avoid leaking resources.
|
||||
Style/AutoResourceCleanup:
|
||||
Enabled: true
|
||||
@@ -446,6 +440,11 @@ Style/HashAsLastArrayItem:
|
||||
- "/**/Formula/**/*.rb"
|
||||
- "**/Formula/**/*.rb"
|
||||
|
||||
# Restore when the fix for https://github.com/rubocop/rubocop/issues/15531
|
||||
# is released.
|
||||
Style/IfUnlessModifier:
|
||||
Enabled: false
|
||||
|
||||
Style/InverseMethods:
|
||||
InverseMethods:
|
||||
:blank?: :present?
|
||||
|
||||
@@ -74,7 +74,7 @@ GEM
|
||||
rspec-support (3.13.7)
|
||||
rspec_junit_formatter (0.6.0)
|
||||
rspec-core (>= 2, < 4, != 2.12.0)
|
||||
rubocop (1.88.2)
|
||||
rubocop (1.89.0)
|
||||
json (~> 2.3)
|
||||
language_server-protocol (~> 3.17.0.2)
|
||||
lint_roller (~> 1.1.0)
|
||||
@@ -99,7 +99,7 @@ GEM
|
||||
lint_roller (~> 1.1)
|
||||
regexp_parser (>= 2.0)
|
||||
rubocop (~> 1.86, >= 1.86.2)
|
||||
rubocop-sorbet (0.13.2)
|
||||
rubocop-sorbet (0.14.0)
|
||||
lint_roller
|
||||
rubocop (>= 1.75.2)
|
||||
ruby-lsp (0.26.10)
|
||||
@@ -252,12 +252,12 @@ CHECKSUMS
|
||||
rspec-sorbet (1.9.2) sha256=28bf3969fa136ed22edd05b00d23aab52c276f2fcc89fccbb16b8fd0c48931c8
|
||||
rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
|
||||
rspec_junit_formatter (0.6.0) sha256=40dde674e6ae4e6cc0ff560da25497677e34fefd2338cc467a8972f602b62b15
|
||||
rubocop (1.88.2) sha256=8def251c90cd955feb4daa3edc0ab56893250c4ce90ef81e6c80c03f9a939bbf
|
||||
rubocop (1.89.0) sha256=4dee8e3ee9c45e474834efd9e8d6fd031e8331c8dacdff0de4ad65ae0a6faae7
|
||||
rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db
|
||||
rubocop-md (2.0.4) sha256=0d076b6b5e99dea2ddc928c4bd702497decb9a8400da7808091e02ebcafcfb93
|
||||
rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834
|
||||
rubocop-rspec (3.10.2) sha256=0b3e2ecc592cd10ecbf0095bb58d1e357905276e069643523cc19eb7495f65e2
|
||||
rubocop-sorbet (0.13.2) sha256=7901e57b6b8e9e9b970d941dbdbb89f2c9de0183bfd2551460468f8aa9548655
|
||||
rubocop-sorbet (0.14.0) sha256=30899556c9d02ab291d8bb761bae1cc025de56f72d909286b6960c1620d67bda
|
||||
ruby-lsp (0.26.10) sha256=e67284af94423531f6b9a583350596421b5a6a4dd93083f1c2ba03da7c23bbed
|
||||
ruby-macho (6.0.0) sha256=7bae15ff5564d06342a045523e47049cbf09f16e80b5ceb5bbc5fd8d8ec00c8e
|
||||
ruby-prof (2.0.5) sha256=dbc3b5112089538ac33303145db0cbd77cbdcdbc05b09e44a967ff72a36d6c0e
|
||||
|
||||
@@ -137,7 +137,7 @@ module Cask
|
||||
next
|
||||
end
|
||||
|
||||
if resolved_path.each_filename.any? { |part| [".", ".."].include?(part) }
|
||||
if resolved_path.each_filename.to_a.intersect?([".", ".."])
|
||||
opoo "Skipping #{Formatter.identifier(action)} for path with relative segments '#{path}'."
|
||||
next
|
||||
end
|
||||
|
||||
@@ -79,12 +79,13 @@ module Cask
|
||||
raise "invalid depends_on key: '#{key.inspect}'" unless VALID_KEYS.include?(key)
|
||||
|
||||
previous_macos = @macos if key == :macos
|
||||
__getobj__[key] = case key
|
||||
case key
|
||||
when :macos, :maximum_macos
|
||||
send(:"#{key}=", *value, set_in_block:)
|
||||
else
|
||||
send(:"#{key}=", *value)
|
||||
end
|
||||
__getobj__[key] = public_send(key)
|
||||
record_os_requirement(key, set_in_block:, os_scoped:)
|
||||
next if key != :macos
|
||||
next if value != :any
|
||||
@@ -95,24 +96,24 @@ module Cask
|
||||
end
|
||||
end
|
||||
|
||||
sig { params(args: String).returns(T::Array[String]) }
|
||||
sig { params(args: String).void }
|
||||
def formula=(*args)
|
||||
formula.concat(args)
|
||||
end
|
||||
|
||||
sig { params(args: String).returns(T::Array[String]) }
|
||||
sig { params(args: String).void }
|
||||
def cask=(*args)
|
||||
cask.concat(args)
|
||||
end
|
||||
|
||||
sig { params(args: T.any(String, Symbol), set_in_block: T::Boolean).returns(T.nilable(MacOSRequirement)) }
|
||||
sig { params(args: T.any(String, Symbol), set_in_block: T::Boolean).void }
|
||||
def macos=(*args, set_in_block: false)
|
||||
@macos = MacOSRequirement.parse(args, comparator: ">=")
|
||||
rescue MacOSVersion::Error, TypeError => e
|
||||
raise "invalid 'depends_on macos' value: #{e}"
|
||||
end
|
||||
|
||||
sig { params(args: T.any(String, Symbol), set_in_block: T::Boolean).returns(T.nilable(MacOSRequirement)) }
|
||||
sig { params(args: T.any(String, Symbol), set_in_block: T::Boolean).void }
|
||||
def maximum_macos=(*args, set_in_block: false)
|
||||
raise "invalid 'depends_on maximum_macos' value: only a single macOS version is allowed" if args.count != 1
|
||||
|
||||
@@ -128,7 +129,7 @@ module Cask
|
||||
@maximum_macos = maximum_macos
|
||||
end
|
||||
|
||||
sig { params(args: T.any(String, Symbol)).returns(T.nilable(LinuxRequirement)) }
|
||||
sig { params(args: T.any(String, Symbol)).void }
|
||||
def linux=(*args)
|
||||
raise "Only a single 'depends_on linux' is allowed." if @linux
|
||||
raise "invalid 'depends_on linux' value: #{args.first.inspect}" if args.first != :any
|
||||
@@ -136,7 +137,7 @@ module Cask
|
||||
@linux = LinuxRequirement.new
|
||||
end
|
||||
|
||||
sig { params(args: Symbol).returns(T::Array[T::Hash[Symbol, T.any(Symbol, Integer)]]) }
|
||||
sig { params(args: Symbol).void }
|
||||
def arch=(*args)
|
||||
@arch ||= []
|
||||
arches = args.map do |elt|
|
||||
|
||||
@@ -44,8 +44,7 @@ module Homebrew
|
||||
titleized_repository = tap.repository.dup
|
||||
titleized_user[0] = T.must(titleized_user[0]).upcase
|
||||
titleized_repository[0] = T.must(titleized_repository[0]).upcase
|
||||
# Duplicate assignment to silence `assigned but unused variable` warning
|
||||
root_url = root_url = GitHubPackages.root_url(tap.user, "homebrew-#{tap.repository}") if args.github_packages?
|
||||
root_url = GitHubPackages.root_url(tap.user, "homebrew-#{tap.repository}") if args.github_packages?
|
||||
|
||||
(tap.path/"Formula").mkpath
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ module SharedEnvExtension
|
||||
|
||||
sig { params(key: String, path: T.any(String, Pathname)).void }
|
||||
def append_path(key, path)
|
||||
self[key] = PATH.new(self[key]).append(path)
|
||||
self[key] = PATH.new(self[key]).append(path).to_s
|
||||
end
|
||||
|
||||
sig { params(rustflags: String).void }
|
||||
@@ -140,7 +140,7 @@ module SharedEnvExtension
|
||||
def prepend_path(key, path)
|
||||
return if %w[/usr/bin /bin /usr/sbin /sbin].include? path.to_s
|
||||
|
||||
self[key] = PATH.new(self[key]).prepend(path)
|
||||
self[key] = PATH.new(self[key]).prepend(path).to_s
|
||||
end
|
||||
|
||||
sig { params(key: String, path: T.any(String, Pathname)).void }
|
||||
@@ -285,7 +285,7 @@ module SharedEnvExtension
|
||||
end
|
||||
if gfortran
|
||||
puts "This may be changed by setting the `$FC` environment variable."
|
||||
self["FC"] = self["F77"] = gfortran
|
||||
self["FC"] = self["F77"] = gfortran.to_s
|
||||
flags = FC_FLAG_VARS
|
||||
end
|
||||
end
|
||||
@@ -352,12 +352,12 @@ module SharedEnvExtension
|
||||
sig { params(_flags: T::Array[String], _map: T::Hash[Symbol, String]).void }
|
||||
def set_cpu_flags(_flags, _map = {}); end
|
||||
|
||||
sig { params(val: T.any(String, Pathname)).returns(String) }
|
||||
sig { params(val: T.any(String, Pathname)).void }
|
||||
def cc=(val)
|
||||
self["CC"] = self["OBJC"] = val.to_s
|
||||
end
|
||||
|
||||
sig { params(val: T.any(String, Pathname)).returns(String) }
|
||||
sig { params(val: T.any(String, Pathname)).void }
|
||||
def cxx=(val)
|
||||
self["CXX"] = self["OBJCXX"] = val.to_s
|
||||
end
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
# typed: strict
|
||||
|
||||
module SharedEnvExtension
|
||||
# Overload to allow `PATH` values.
|
||||
sig {
|
||||
type_parameters(:U).params(
|
||||
key: String,
|
||||
value: T.all(T.type_parameter(:U), T.nilable(T.any(String, Pathname, PATH))),
|
||||
).returns(T.type_parameter(:U))
|
||||
}
|
||||
def []=(key, value); end
|
||||
end
|
||||
@@ -31,7 +31,7 @@ module Stdenv
|
||||
|
||||
# Set the default pkg-config search path, overriding the built-in paths
|
||||
# Anything in PKG_CONFIG_PATH is searched before paths in this variable
|
||||
self["PKG_CONFIG_LIBDIR"] = determine_pkg_config_libdir
|
||||
self["PKG_CONFIG_LIBDIR"] = determine_pkg_config_libdir&.to_s
|
||||
|
||||
self["MAKEFLAGS"] = "-j#{make_jobs}"
|
||||
self["RUSTC_WRAPPER"] = "#{HOMEBREW_SHIMS_PATH}/shared/rustc_wrapper"
|
||||
|
||||
@@ -82,9 +82,9 @@ module Superenv
|
||||
self["MAKEFLAGS"] ||= "-j#{determine_make_jobs}"
|
||||
self["RUSTC_WRAPPER"] = "#{HOMEBREW_SHIMS_PATH}/shared/rustc_wrapper"
|
||||
self["HOMEBREW_RUSTFLAGS"] = Hardware.rustflags_target_cpu(effective_arch)
|
||||
self["PATH"] = determine_path
|
||||
self["PKG_CONFIG_PATH"] = determine_pkg_config_path
|
||||
self["PKG_CONFIG_LIBDIR"] = determine_pkg_config_libdir || ""
|
||||
self["PATH"] = determine_path&.to_s
|
||||
self["PKG_CONFIG_PATH"] = determine_pkg_config_path&.to_s
|
||||
self["PKG_CONFIG_LIBDIR"] = (determine_pkg_config_libdir || "").to_s
|
||||
self["HOMEBREW_CCCFG"] = determine_cccfg
|
||||
self["HOMEBREW_OPTIMIZATION_LEVEL"] = compiler.match?(GNU_GCC_REGEXP) ? "O2" : "Os"
|
||||
self["HOMEBREW_BREW_FILE"] = HOMEBREW_BREW_FILE.to_s
|
||||
@@ -94,17 +94,17 @@ module Superenv
|
||||
self["HOMEBREW_TEMP"] = HOMEBREW_TEMP.to_s
|
||||
self["HOMEBREW_OPTFLAGS"] = determine_optflags
|
||||
self["HOMEBREW_MAKE_JOBS"] = determine_make_jobs.to_s
|
||||
self["CMAKE_PREFIX_PATH"] = determine_cmake_prefix_path
|
||||
self["CMAKE_FRAMEWORK_PATH"] = determine_cmake_frameworks_path
|
||||
self["CMAKE_INCLUDE_PATH"] = determine_cmake_include_path
|
||||
self["CMAKE_LIBRARY_PATH"] = determine_cmake_library_path
|
||||
self["ACLOCAL_PATH"] = determine_aclocal_path
|
||||
self["CMAKE_PREFIX_PATH"] = determine_cmake_prefix_path&.to_s
|
||||
self["CMAKE_FRAMEWORK_PATH"] = determine_cmake_frameworks_path&.to_s
|
||||
self["CMAKE_INCLUDE_PATH"] = determine_cmake_include_path&.to_s
|
||||
self["CMAKE_LIBRARY_PATH"] = determine_cmake_library_path&.to_s
|
||||
self["ACLOCAL_PATH"] = determine_aclocal_path&.to_s
|
||||
self["M4"] = "#{HOMEBREW_PREFIX}/opt/m4/bin/m4" if deps.any? { |d| d.name == "libtool" }
|
||||
self["HOMEBREW_ISYSTEM_PATHS"] = determine_isystem_paths
|
||||
self["HOMEBREW_INCLUDE_PATHS"] = determine_include_paths
|
||||
self["HOMEBREW_LIBRARY_PATHS"] = determine_library_paths
|
||||
self["HOMEBREW_ISYSTEM_PATHS"] = determine_isystem_paths&.to_s
|
||||
self["HOMEBREW_INCLUDE_PATHS"] = determine_include_paths&.to_s
|
||||
self["HOMEBREW_LIBRARY_PATHS"] = determine_library_paths&.to_s
|
||||
self["HOMEBREW_DEPENDENCIES"] = determine_dependencies
|
||||
self["HOMEBREW_FORMULA_PREFIX"] = @formula.prefix unless @formula.nil?
|
||||
self["HOMEBREW_FORMULA_PREFIX"] = @formula.prefix.to_s unless @formula.nil?
|
||||
# Prevent the OpenSSL rust crate from building a vendored OpenSSL.
|
||||
# https://github.com/sfackler/rust-openssl/blob/994e5ff8c63557ab2aa85c85cc6956b0b0216ca7/openssl/src/lib.rs#L65
|
||||
self["OPENSSL_NO_VENDOR"] = "1"
|
||||
@@ -155,9 +155,10 @@ module Superenv
|
||||
|
||||
private
|
||||
|
||||
sig { params(val: T.any(String, Pathname)).returns(String) }
|
||||
sig { params(val: T.any(String, Pathname)).void }
|
||||
def cc=(val)
|
||||
self["HOMEBREW_CC"] = super
|
||||
super
|
||||
self["HOMEBREW_CC"] = val.to_s
|
||||
end
|
||||
|
||||
sig { returns(String) }
|
||||
|
||||
@@ -38,7 +38,7 @@ module OS
|
||||
|
||||
self["HOMEBREW_OPTIMIZATION_LEVEL"] = "O2"
|
||||
self["HOMEBREW_DYNAMIC_LINKER"] = determine_dynamic_linker_path
|
||||
self["HOMEBREW_RPATH_PATHS"] = determine_rpath_paths(formula)
|
||||
self["HOMEBREW_RPATH_PATHS"] = determine_rpath_paths(formula).to_s
|
||||
m4_path_deps = ["libtool", "bison"]
|
||||
self["M4"] = "#{HOMEBREW_PREFIX}/opt/m4/bin/m4" if deps.any? { m4_path_deps.include?(it.name) }
|
||||
return unless ::Hardware::CPU.arm64?
|
||||
|
||||
@@ -538,8 +538,7 @@ class Formula
|
||||
!!head && !stable
|
||||
end
|
||||
|
||||
# Stop RuboCop from erroneously indenting hash target
|
||||
delegate [ # rubocop:disable Layout/HashAlignment
|
||||
delegate [
|
||||
:bottle_defined?,
|
||||
:bottle_tag?,
|
||||
:bottled?,
|
||||
@@ -618,8 +617,7 @@ class Formula
|
||||
# @see .version
|
||||
delegate version: :active_spec
|
||||
|
||||
# Stop RuboCop from erroneously indenting hash target
|
||||
delegate [ # rubocop:disable Layout/HashAlignment
|
||||
delegate [
|
||||
:allow_network_access!,
|
||||
:deny_network_access!,
|
||||
:network_access_allowed?,
|
||||
|
||||
@@ -1324,12 +1324,12 @@ module Homebrew
|
||||
|
||||
sig { params(message: String, location: T.nilable(Homebrew::SourceLocation), corrected: T::Boolean).void }
|
||||
def problem(message, location: nil, corrected: false)
|
||||
@problems << ({ message:, location:, corrected: })
|
||||
@problems << { message:, location:, corrected: }
|
||||
end
|
||||
|
||||
sig { params(message: String, location: T.nilable(Homebrew::SourceLocation), corrected: T::Boolean).void }
|
||||
def new_formula_problem(message, location: nil, corrected: false)
|
||||
@new_formula_problems << ({ message:, location:, corrected: })
|
||||
@new_formula_problems << { message:, location:, corrected: }
|
||||
end
|
||||
|
||||
sig { params(repo_owner: String).returns(T::Boolean) }
|
||||
|
||||
+73
-16
@@ -299,6 +299,7 @@ class RuboCop::Config
|
||||
def disabled_new_cops?; end
|
||||
def each(*_arg0, **_arg1, &_arg2); end
|
||||
def each_key(*_arg0, **_arg1, &_arg2); end
|
||||
def enabled_new_cop?(qualified_cop_name); end
|
||||
def enabled_new_cops?; end
|
||||
def fetch(*_arg0, **_arg1, &_arg2); end
|
||||
def file_to_exclude?(file); end
|
||||
@@ -340,10 +341,14 @@ class RuboCop::Config
|
||||
|
||||
private
|
||||
|
||||
def comparable_version(value); end
|
||||
def department_of(qualified_cop_name); end
|
||||
def enable_cop?(qualified_cop_name, cop_options); end
|
||||
def gem_version_to_major_minor_float(gem_version); end
|
||||
def match_relative_or_absolute_path?(pattern, relative_file_path, absolute_file_path); end
|
||||
def new_cops_covered?(qualified_cop_name); end
|
||||
def new_cops_setting_for(qualified_cop_name); end
|
||||
def new_cops_version_covers?(new_cops_version, qualified_cop_name); end
|
||||
def read_gem_versions_from_target_lockfile; end
|
||||
def read_rails_version_from_bundler_lock_file; end
|
||||
def target_rails_version_from_bundler_lock_file; end
|
||||
@@ -691,11 +696,15 @@ class RuboCop::ConfigValidator
|
||||
def check_target_ruby; end
|
||||
def each_invalid_parameter(cop_name); end
|
||||
def list_unknown_cops(invalid_cop_names); end
|
||||
def new_cops_value_for_department(name, section); end
|
||||
def new_cops_version_value?(value); end
|
||||
def param_error_message(parent, key, value, supposed_values); end
|
||||
def reject_conflicting_safe_settings; end
|
||||
def reject_mutually_exclusive_defaults; end
|
||||
def suggestion(name); end
|
||||
def target_ruby; end
|
||||
def validate_all_cops_new_cops_parameter; end
|
||||
def validate_department_new_cops_parameters; end
|
||||
def validate_enforced_styles(valid_cop_names); end
|
||||
def validate_new_cops_parameter; end
|
||||
def validate_parameter_names(valid_cop_names); end
|
||||
@@ -716,6 +725,8 @@ RuboCop::ConfigValidator::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array)
|
||||
|
||||
RuboCop::ConfigValidator::NEW_COPS_VALUES = T.let(T.unsafe(nil), Array)
|
||||
|
||||
RuboCop::ConfigValidator::NEW_COPS_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp)
|
||||
|
||||
RuboCop::Cop::Alignment::SPACE = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::AllowedIdentifiers::SIGILS = T.let(T.unsafe(nil), String)
|
||||
@@ -1058,6 +1069,12 @@ RuboCop::Cop::Generator::CONFIGURATION_ADDED_MESSAGE = T.let(T.unsafe(nil), Stri
|
||||
|
||||
RuboCop::Cop::Generator::ConfigurationInjector::TEMPLATE = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Generator::RegistrationInjector::DEPARTMENT_REQUIRE_PATTERN = T.let(T.unsafe(nil), Regexp)
|
||||
|
||||
RuboCop::Cop::Generator::RegistrationInjector::ENTRY_PATTERN = T.let(T.unsafe(nil), Regexp)
|
||||
|
||||
RuboCop::Cop::Generator::RegistrationInjector::EXTEND_PATTERN = T.let(T.unsafe(nil), Regexp)
|
||||
|
||||
RuboCop::Cop::Generator::RequireFileInjector::REQUIRE_PATH = T.let(T.unsafe(nil), Regexp)
|
||||
|
||||
RuboCop::Cop::Generator::SOURCE_TEMPLATE = T.let(T.unsafe(nil), String)
|
||||
@@ -1420,10 +1437,12 @@ RuboCop::Cop::Lint::AmbiguousAssignment::MISTAKES = T.let(T.unsafe(nil), Hash)
|
||||
|
||||
RuboCop::Cop::Lint::AmbiguousAssignment::MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array)
|
||||
RuboCop::Cop::Lint::AmbiguousBlockAssociation::BLOCK_METHODS = T.let(T.unsafe(nil), Set)
|
||||
|
||||
RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG_DO_END_BLOCK = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::AmbiguousOperator::AMBIGUITIES = T.let(T.unsafe(nil), Hash)
|
||||
|
||||
RuboCop::Cop::Lint::AmbiguousOperator::MSG_FORMAT = T.let(T.unsafe(nil), String)
|
||||
@@ -1514,6 +1533,14 @@ RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::NO_ARG_ALGORITHM = T.let(T.unsafe
|
||||
|
||||
RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
||||
|
||||
RuboCop::Cop::Lint::DeprecatedReference::CONSTANT_MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::DeprecatedReference::DEPRECATED_TAG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::DeprecatedReference::DEPRECATION_DETAIL = T.let(T.unsafe(nil), Regexp)
|
||||
|
||||
RuboCop::Cop::Lint::DeprecatedReference::METHOD_MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor::MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String)
|
||||
@@ -1528,9 +1555,9 @@ RuboCop::Cop::Lint::DuplicateMagicComment::MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String)
|
||||
RuboCop::Cop::Lint::DuplicateMethods::INDEXABLE_METHOD_NAME = T.let(T.unsafe(nil), Regexp)
|
||||
|
||||
RuboCop::Cop::Lint::DuplicateMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
||||
RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement::MSG_REPEATED_ELEMENT = T.let(T.unsafe(nil), String)
|
||||
|
||||
@@ -1642,6 +1669,8 @@ RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PROTECTED = T.let(T.u
|
||||
|
||||
RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::InheritException::INDIRECT_MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::InheritException::MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::InheritException::PREFERRED_BASE_CLASS = T.let(T.unsafe(nil), Hash)
|
||||
@@ -1700,6 +1729,14 @@ RuboCop::Cop::Lint::MultipleComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil),
|
||||
|
||||
RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe(nil), Array)
|
||||
|
||||
RuboCop::Cop::Lint::NameTypo::CONSTANT_MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::NameTypo::LITERAL_IDENTIFIER_PATTERN = T.let(T.unsafe(nil), Regexp)
|
||||
|
||||
RuboCop::Cop::Lint::NameTypo::METHOD_MEMBER_REGEXP = T.let(T.unsafe(nil), Regexp)
|
||||
|
||||
RuboCop::Cop::Lint::NameTypo::METHOD_MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::NestedMethodDefinition::MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::NestedPercentLiteral::MSG = T.let(T.unsafe(nil), String)
|
||||
@@ -1980,6 +2017,12 @@ RuboCop::Cop::Lint::UnreachablePatternBranch::MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::UnreachablePatternBranch::MSG_ELSE = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::UnusedPrivateMethod::IDENTIFIER_PATTERN = T.let(T.unsafe(nil), Regexp)
|
||||
|
||||
RuboCop::Cop::Lint::UnusedPrivateMethod::IMPLICITLY_INVOKED_METHODS = T.let(T.unsafe(nil), Set)
|
||||
|
||||
RuboCop::Cop::Lint::UnusedPrivateMethod::MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_ESCAPE = T.let(T.unsafe(nil), Array)
|
||||
|
||||
RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_UNESCAPE = T.let(T.unsafe(nil), Array)
|
||||
@@ -2308,16 +2351,18 @@ class RuboCop::Cop::Registry
|
||||
def department_missing?(badge, name); end
|
||||
def departments; end
|
||||
def disabled(config); end
|
||||
def disabled_names(config); end
|
||||
def dismiss(cop); end
|
||||
def each(&block); end
|
||||
def enabled(config); end
|
||||
def enabled?(cop, config); end
|
||||
def enabled_pending_cop?(cop_cfg, config); end
|
||||
def enabled_pending_cop?(cop_cfg, config, cop = T.unsafe(nil)); end
|
||||
def enlist(cop); end
|
||||
def filter_by_badge(options = T.unsafe(nil)); end
|
||||
def find_by_cop_name(cop_name); end
|
||||
def find_cops_by_directive(directive); end
|
||||
def freeze; end
|
||||
def lazy_load(cop_name, constant_name); end
|
||||
def lazy_load(badge, constant_name); end
|
||||
def length; end
|
||||
def names; end
|
||||
def names_for_department(department); end
|
||||
@@ -2334,16 +2379,21 @@ class RuboCop::Cop::Registry
|
||||
def with_department(department); end
|
||||
def without_department(department); end
|
||||
|
||||
protected
|
||||
|
||||
def add_entry(badge, cop_or_name); end
|
||||
|
||||
private
|
||||
|
||||
def clear_enrollment_queue; end
|
||||
def emit_warning(path, message); end
|
||||
def enabled_cop_name?(cop_name, config); end
|
||||
def initialize_copy(reg); end
|
||||
def load_all_lazy_cops; end
|
||||
def load_lazy_cop(badge); end
|
||||
def registered?(badge); end
|
||||
def registered_badges; end
|
||||
def resolve_badge(given_badge, real_badge, source_path, warn: T.unsafe(nil)); end
|
||||
def with(cops); end
|
||||
|
||||
class << self
|
||||
def all; end
|
||||
@@ -2355,6 +2405,8 @@ class RuboCop::Cop::Registry
|
||||
end
|
||||
end
|
||||
|
||||
RuboCop::Cop::ReparsedEquivalence::MAX_VERIFICATION_FRAGMENT_SIZE = T.let(T.unsafe(nil), Integer)
|
||||
|
||||
RuboCop::Cop::RequireLibrary::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
||||
|
||||
RuboCop::Cop::Security::CompoundHash::COMBINATOR_IN_HASH_MSG = T.let(T.unsafe(nil), String)
|
||||
@@ -2647,6 +2699,8 @@ RuboCop::Cop::Style::DocumentDynamicEvalDefinition::MSG = T.let(T.unsafe(nil), S
|
||||
|
||||
RuboCop::Cop::Style::DocumentDynamicEvalDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
|
||||
|
||||
RuboCop::Cop::Style::Documentation::DIRECTIVE_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp)
|
||||
|
||||
RuboCop::Cop::Style::Documentation::MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Style::DocumentationMethod::MSG = T.let(T.unsafe(nil), String)
|
||||
@@ -2865,6 +2919,8 @@ RuboCop::Cop::Style::IfInsideElse::MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_MODIFIER = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_MODIFIER_PARENS = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_NORMAL = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), String)
|
||||
@@ -3317,21 +3373,17 @@ RuboCop::Cop::Style::RedundantInterpolation::MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Style::RedundantInterpolationUnfreeze::MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Style::RedundantLineContinuation::ALLOWED_STRING_TOKENS = T.let(T.unsafe(nil), Array)
|
||||
|
||||
RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TAKING_FLOW_TOKEN_TYPES = T.let(T.unsafe(nil), Array)
|
||||
|
||||
RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TYPES = T.let(T.unsafe(nil), Array)
|
||||
|
||||
RuboCop::Cop::Style::RedundantLineContinuation::ARITHMETIC_OPERATOR_TOKENS = T.let(T.unsafe(nil), Array)
|
||||
|
||||
RuboCop::Cop::Style::RedundantLineContinuation::LINE_CONTINUATION = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Style::RedundantLineContinuation::LINE_CONTINUATION_PATTERN = T.let(T.unsafe(nil), Regexp)
|
||||
|
||||
RuboCop::Cop::Style::RedundantLineContinuation::MSG = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::Cop::Style::RedundantLineContinuation::STRING_LITERAL_BEGIN_TOKENS = T.let(T.unsafe(nil), Array)
|
||||
RuboCop::Cop::Style::RedundantLineContinuation::STRING_LITERAL_BEGINNING_TOKEN_TYPES = T.let(T.unsafe(nil), Array)
|
||||
|
||||
RuboCop::Cop::Style::RedundantLineContinuation::STRING_LITERAL_ENDING_TOKEN_TYPES = T.let(T.unsafe(nil), Array)
|
||||
|
||||
RuboCop::Cop::Style::RedundantLineContinuation::STRING_TOKEN_TYPES = T.let(T.unsafe(nil), Array)
|
||||
|
||||
RuboCop::Cop::Style::RedundantMinMaxBy::MSG_BLOCK = T.let(T.unsafe(nil), String)
|
||||
|
||||
@@ -3964,6 +4016,8 @@ RuboCop::DirectiveComment::MALFORMED_DIRECTIVE_WITHOUT_COP_NAME_REGEXP = T.let(T
|
||||
|
||||
RuboCop::DirectiveComment::PUSH_POP_ARGS_PATTERN = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::DirectiveComment::STYLE_DISABLE_COPS_DIRECTIVE_COP = T.let(T.unsafe(nil), String)
|
||||
|
||||
RuboCop::DirectiveComment::TRAILING_COMMENT_MARKER = T.let(T.unsafe(nil), String)
|
||||
|
||||
class RuboCop::Error < ::StandardError; end
|
||||
@@ -4288,6 +4342,8 @@ class RuboCop::Runner
|
||||
private
|
||||
|
||||
def add_redundant_disables(file, offenses, source); end
|
||||
def build_project_index(target_files); end
|
||||
def bundled_gem_files; end
|
||||
def cached_result(file, team); end
|
||||
def cached_run?; end
|
||||
def check_for_infinite_loop(processed_source, offenses_by_iteration); end
|
||||
@@ -4301,7 +4357,6 @@ class RuboCop::Runner
|
||||
def file_iterator(files, &block); end
|
||||
def file_offenses(file); end
|
||||
def file_started(file); end
|
||||
def filter_cop_classes(cop_classes, config); end
|
||||
def find_target_files(paths); end
|
||||
def finished_report(file, index, offenses); end
|
||||
def formatter_set; end
|
||||
@@ -4313,6 +4368,7 @@ class RuboCop::Runner
|
||||
def list_files(paths); end
|
||||
def mark_as_safe_by_config?(config); end
|
||||
def minimum_severity_to_fail; end
|
||||
def mobilize_cop_badge?(badge, config); end
|
||||
def mobilize_team(processed_source); end
|
||||
def mobilized_cop_classes(config); end
|
||||
def offense_displayed?(offense); end
|
||||
@@ -4323,6 +4379,7 @@ class RuboCop::Runner
|
||||
def process_report_queue_entry(index); end
|
||||
def project_index_disables_parallel?; end
|
||||
def project_index_enabled?; end
|
||||
def project_index_files(target_files); end
|
||||
def qualify_option_cop_names; end
|
||||
def redundant_cop_disable_directive(file); end
|
||||
def run_in_parallel?(files); end
|
||||
@@ -111,7 +111,7 @@ module Homebrew
|
||||
|
||||
sig { params(message: String).void }
|
||||
def problem(message)
|
||||
@problems << ({ message:, location: nil, corrected: false })
|
||||
@problems << { message:, location: nil, corrected: false }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -323,7 +323,7 @@ RSpec.describe Homebrew::InstallSteps do
|
||||
end
|
||||
|
||||
expect(steps).to all(satisfy do |step|
|
||||
(step.keys & %w[attempts force group match overwrite uninstall]).empty?
|
||||
!step.keys.intersect?(%w[attempts force group match overwrite uninstall])
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
@@ -160,14 +160,14 @@ module GitHub
|
||||
end
|
||||
end
|
||||
|
||||
ERRORS = T.let([
|
||||
ERRORS = [
|
||||
AuthenticationFailedError,
|
||||
GitRepositoryIsEmptyError,
|
||||
HTTPNotFoundError,
|
||||
RateLimitExceededError,
|
||||
Error,
|
||||
JSON::ParserError,
|
||||
].freeze, T::Array[T.any(T.class_of(Error), T.class_of(JSON::ParserError))])
|
||||
].freeze
|
||||
|
||||
# Gets the token from the GitHub CLI for github.com.
|
||||
sig { returns(T.nilable(String)) }
|
||||
|
||||
+2
-2
@@ -89,11 +89,11 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-progressbar-1.13.0/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-emoji-4.2.0/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-display_width-3.2.0/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.88.2/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.89.0/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-md-2.0.4/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-performance-1.26.1/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec-3.10.2/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-sorbet-0.13.2/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-sorbet-0.14.0/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-lsp-0.26.10/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-macho-6.0.0/lib")
|
||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/ruby-prof-2.0.5")
|
||||
|
||||
@@ -201,7 +201,7 @@ module Homebrew
|
||||
return component unless component.include?("%")
|
||||
|
||||
component.b.gsub(/%[0-9A-Fa-f]{2}/) { |m| Integer(m[1, 2], 16).chr }
|
||||
.force_encoding(component.encoding)
|
||||
.force_encoding(component.encoding)
|
||||
end
|
||||
|
||||
sig { params(basename: String, name: String).returns(T.nilable(String)) }
|
||||
|
||||
Reference in New Issue
Block a user