diff options
| author | Mike McQuaid | 2017-12-16 13:34:22 +0000 | 
|---|---|---|
| committer | GitHub | 2017-12-16 13:34:22 +0000 | 
| commit | b4d43e950fd45c24e48d6ebfd3013357abcd21a9 (patch) | |
| tree | 035c37363cdd4b482e2eee4a6f3826e919cfd9fd | |
| parent | deb37497e92ca4ca09d90e47183a414f6e588900 (diff) | |
| parent | bff4762d36dd1feaf7768949b3fd32d061394c65 (diff) | |
| download | brew-b4d43e950fd45c24e48d6ebfd3013357abcd21a9.tar.bz2 | |
Merge pull request #3401 from DomT4/vendor_or_na1.4.1
go: various tweaks to recommendations
| -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 | 
