Merge pull request #19168 from koddsson/fixes-for-disable-comment-rubocop

implement fixes and comments for `DisableComment` rubocop
This commit is contained in:
Mike McQuaid 2025-01-31 14:38:14 +00:00 committed by GitHub
commit 134fc4457f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 4 deletions

View File

@ -55,6 +55,7 @@ module Cask
return unless other.class < AbstractArtifact
return 0 if instance_of?(other.class)
# TODO: Replace class var @@sort_order with a class instance var.
@@sort_order ||= [ # rubocop:disable Style/ClassVars
PreflightBlock,
# The `uninstall` stanza should be run first, as it may

View File

@ -703,6 +703,7 @@ end
# Strategy for extracting local binary packages.
class LocalBottleDownloadStrategy < AbstractFileDownloadStrategy
# TODO: Call `super` here
def initialize(path) # rubocop:disable Lint/MissingSuper
@cached_location = path
extend Pourable

View File

@ -10,11 +10,9 @@ class LazyObject < Delegator
end
def __getobj__
# rubocop:disable Naming/MemoizedInstanceVariableName
return @__delegate__ if defined?(@__delegate__)
return @__getobj__ if defined?(@__getobj__)
@__delegate__ = @__callable__.call
# rubocop:enable Naming/MemoizedInstanceVariableName
@__getobj__ = @__callable__.call
end
private :__getobj__

View File

@ -30,6 +30,7 @@ module Homebrew
_system(cmd, *args, **options)
end
# `Module` and `Regexp` are global variables used as types here so they don't need to be imported
# rubocop:disable Style/GlobalVars
sig { params(the_module: Module, pattern: Regexp).void }
def self.inject_dump_stats!(the_module, pattern)