aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2017-01-09 13:24:51 +0000
committerMike McQuaid2017-01-09 13:24:51 +0000
commit346d68eb04013d2322796ed1a0edd7de007a156d (patch)
treed1197cd1cdcb8f5a3a93c77d2f42ddae1cf2713e /Library/Homebrew
parentf7bccee2145547d21b2629cab8b5fddff3299bda (diff)
downloadbrew-346d68eb04013d2322796ed1a0edd7de007a156d.tar.bz2
audit: check virtualenv and setuptools resource.
`virtualenv_install_with_resources` will automatically define and install a `setuptools` resource so this is unnecessary. References https://github.com/Homebrew/homebrew-core/pull/8570
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 6d43c51bf..744aa6fbe 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -819,6 +819,11 @@ class FormulaAuditor
problem "Formulae should not depend on both OpenSSL and LibreSSL (even optionally)."
end
+ if text =~ /virtualenv_(create|install_with_resources)/ &&
+ text =~ /resource\s+['"]setuptools['"]\s+do/
+ problem "Formulae using virtualenvs do not need a `setuptools` resource."
+ end
+
return unless text.include?('require "language/go"') && !text.include?("go_resource")
problem "require \"language/go\" is unnecessary unless using `go_resource`s"
end