Skip to content
Snippets Groups Projects
Commit 0c9047a2 authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #2562 from DomT4/you_shall_not_pass_go_get

audit: formally ban go get usage
parents 59f78361 ed1ae19a
No related branches found
No related tags found
No related merge requests found
......@@ -885,6 +885,10 @@ class FormulaAuditor
problem "Formulae using virtualenvs do not need a `setuptools` resource."
end
if text =~ /system\s+['"]go['"],\s+['"]get['"]/
problem "Formulae should not use `go get`. If non-vendored resources are required use `go_resource`s."
end
return unless text.include?('require "language/go"') && !text.include?("go_resource")
problem "require \"language/go\" is unnecessary unless using `go_resource`s"
end
......
......@@ -430,6 +430,21 @@ describe FormulaAuditor do
expect(fa.problems.first)
.to match('xcodebuild should be passed an explicit "SYMROOT"')
end
specify "disallow go get usage" do
fa = formula_auditor "foo", <<-EOS.undent
class Foo <Formula
url "http://example.com/foo-1.0.tgz"
def install
system "go", "get", "bar"
end
end
EOS
fa.audit_text
expect(fa.problems.first)
.to match("Formulae should not use `go get`. If non-vendored resources are required use `go_resource`s.")
end
end
describe "#audit_revision_and_version_scheme" do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment