diff --git a/Library/Homebrew/rubocops/text.rb b/Library/Homebrew/rubocops/text.rb index 6f2beaf50e..e0dd1089f8 100644 --- a/Library/Homebrew/rubocops/text.rb +++ b/Library/Homebrew/rubocops/text.rb @@ -35,13 +35,6 @@ module RuboCop problem "Formulae in homebrew/core should use OpenBLAS as the default serial linear algebra library." end - if method_called_ever?(body_node, :virtualenv_create) || - method_called_ever?(body_node, :virtualenv_install_with_resources) - find_method_with_args(body_node, :resource, "setuptools") do - problem "Formulae using virtualenvs do not need a `setuptools` resource." - end - end - unless method_called_ever?(body_node, :go_resource) # processed_source.ast is passed instead of body_node because `require` would be outside body_node find_method_with_args(processed_source.ast, :require, "language/go") do diff --git a/Library/Homebrew/test/rubocops/text_spec.rb b/Library/Homebrew/test/rubocops/text_spec.rb index b8ae63dbd1..e48ce05314 100644 --- a/Library/Homebrew/test/rubocops/text_spec.rb +++ b/Library/Homebrew/test/rubocops/text_spec.rb @@ -144,25 +144,6 @@ describe RuboCop::Cop::FormulaAudit::Text do RUBY end - it "reports an offense if formula uses virtualenv and also `setuptools` resource" do - expect_offense(<<~RUBY) - class Foo < Formula - url "https://brew.sh/foo-1.0.tgz" - homepage "https://brew.sh" - - resource "setuptools" do - ^^^^^^^^^^^^^^^^^^^^^ Formulae using virtualenvs do not need a `setuptools` resource. - url "https://foo.com/foo.tar.gz" - sha256 "db0904a28253cfe53e7dedc765c71596f3c53bb8a866ae50123320ec1a7b73fd" - end - - def install - virtualenv_create(libexec) - end - end - RUBY - end - it "reports an offense if `Formula.factory(name)` is present" do expect_offense(<<~RUBY) class Foo < Formula