Skip to content

Commit

Permalink
Merge pull request #3401 from DomT4/vendor_or_na
Browse files Browse the repository at this point in the history
go: various tweaks to recommendations
  • Loading branch information
MikeMcQuaid committed Dec 16, 2017
2 parents deb3749 + bff4762 commit b4d43e9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion Library/Homebrew/rubocops/text_cop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,16 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
end

find_method_with_args(body_node, :system, "go", "get") do
problem "Formulae should not use `go get`. If non-vendored resources are required use `go_resource`s."
problem "Do not use `go get`. Please ask upstream to implement Go vendoring"
end
end
end
end
module FormulaAuditStrict
class Text < FormulaCop
def audit_formula(_node, _class_node, _parent_class_node, body_node)
find_method_with_args(body_node, :go_resource) do
problem "`go_resource`s are deprecated. Please ask upstream to implement Go vendoring"
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/test/rubocops/text_cop_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Foo < Formula
def install
system "go", "get", "bar"
^^^^^^^^^^^^^^^^^^^^^^^^^ Formulae should not use `go get`. If non-vendored resources are required use `go_resource`s.
^^^^^^^^^^^^^^^^^^^^^^^^^ Do not use `go get`. Please ask upstream to implement Go vendoring
end
end
RUBY
Expand Down Expand Up @@ -139,7 +139,7 @@ class Foo < Formula
def install
system "go", "get", "bar"
^^^^^^^^^^^^^^^^^^^^^^^^^ Formulae should not use `go get`. If non-vendored resources are required use `go_resource`s.
^^^^^^^^^^^^^^^^^^^^^^^^^ Do not use `go get`. Please ask upstream to implement Go vendoring
end
end
RUBY
Expand Down

0 comments on commit b4d43e9

Please sign in to comment.