diff options
| -rw-r--r-- | Library/Homebrew/rubocops/text_cop.rb | 11 | ||||
| -rw-r--r-- | Library/Homebrew/test/rubocops/text_cop_spec.rb | 4 |
2 files changed, 12 insertions, 3 deletions
diff --git a/Library/Homebrew/rubocops/text_cop.rb b/Library/Homebrew/rubocops/text_cop.rb index d56c9bf46..1546a9cc3 100644 --- a/Library/Homebrew/rubocops/text_cop.rb +++ b/Library/Homebrew/rubocops/text_cop.rb @@ -46,7 +46,16 @@ module RuboCop 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 diff --git a/Library/Homebrew/test/rubocops/text_cop_spec.rb b/Library/Homebrew/test/rubocops/text_cop_spec.rb index 84e2344c5..1b2d61d0c 100644 --- a/Library/Homebrew/test/rubocops/text_cop_spec.rb +++ b/Library/Homebrew/test/rubocops/text_cop_spec.rb @@ -66,7 +66,7 @@ describe RuboCop::Cop::FormulaAudit::Text do 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 @@ -139,7 +139,7 @@ describe RuboCop::Cop::FormulaAudit::Text do 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 |
