Skip to content

Commit

Permalink
Merge pull request #1806 from MikeMcQuaid/audit-virtualenv-setuptools
Browse files Browse the repository at this point in the history
audit: check virtualenv and setuptools resource.
  • Loading branch information
MikeMcQuaid committed Jan 9, 2017
2 parents df46d62 + 346d68e commit 9cce341
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Library/Homebrew/dev-cmd/audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,11 @@ def audit_text
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
Expand Down

0 comments on commit 9cce341

Please sign in to comment.