From 883fee78adab15f205d201116f89f85e608fd334 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Tue, 31 Oct 2017 00:55:00 +0000 Subject: [PATCH] text_cop: warn against go_resource usage for strict audit --- Library/Homebrew/rubocops/text_cop.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Library/Homebrew/rubocops/text_cop.rb b/Library/Homebrew/rubocops/text_cop.rb index c99adfc10d..1546a9cc3c 100644 --- a/Library/Homebrew/rubocops/text_cop.rb +++ b/Library/Homebrew/rubocops/text_cop.rb @@ -51,5 +51,14 @@ module RuboCop 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 + end end end