implement fixes and comments for DisableComment rubocop

This commit is contained in:
Kristján Oddsson 2025-01-29 09:17:01 +00:00
parent 6b7e0ecd5d
commit 3b0794a884
4 changed files with 5 additions and 4 deletions

View File

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

View File

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

View File

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

View File

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