remove new method and reset without TODO
This commit is contained in:
parent
7e31574c3f
commit
7a95219d2b
@ -292,8 +292,7 @@ module FormulaCellarChecks
|
|||||||
dot_brew_formula = formula.prefix/".brew/#{formula.name}.rb"
|
dot_brew_formula = formula.prefix/".brew/#{formula.name}.rb"
|
||||||
return unless dot_brew_formula.exist?
|
return unless dot_brew_formula.exist?
|
||||||
|
|
||||||
require "utils/ast"
|
return unless dot_brew_formula.read.include? "ENV.runtime_cpu_detection"
|
||||||
return unless Utils::AST::FormulaAST.new(dot_brew_formula.read).include_runtime_cpu_detection?
|
|
||||||
|
|
||||||
# macOS `objdump` is a bit slow, so we prioritise llvm's `llvm-objdump` (~5.7x faster)
|
# macOS `objdump` is a bit slow, so we prioritise llvm's `llvm-objdump` (~5.7x faster)
|
||||||
# or binutils' `objdump` (~1.8x faster) if they are installed.
|
# or binutils' `objdump` (~1.8x faster) if they are installed.
|
||||||
|
|||||||
@ -190,19 +190,6 @@ module Utils
|
|||||||
tree_rewriter.insert_after(preceding_expr, "\n#{stanza_text(name, value, indent: 2)}")
|
tree_rewriter.insert_after(preceding_expr, "\n#{stanza_text(name, value, indent: 2)}")
|
||||||
end
|
end
|
||||||
|
|
||||||
sig { returns(T::Boolean) }
|
|
||||||
def include_runtime_cpu_detection?
|
|
||||||
install_node = children.find do |child|
|
|
||||||
(child.is_a? RuboCop::AST::DefNode) && child.method_name == :install
|
|
||||||
end
|
|
||||||
|
|
||||||
return false if install_node.blank?
|
|
||||||
|
|
||||||
install_node.each_node.any? do |node|
|
|
||||||
node.send_type? && node.receiver&.const_name == "ENV" && node.method_name == :runtime_cpu_detection
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
sig { returns(String) }
|
sig { returns(String) }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user