rubocops/text: forbid "go get" only in install method

This commit is contained in:
Dawid Dziurla 2021-11-14 14:04:14 +01:00 committed by GitHub
parent 1f0ab4a1ee
commit 55244c845b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,8 +57,10 @@ module RuboCop
problem %q(use "xcodebuild *args" instead of "system 'xcodebuild', *args")
end
find_method_with_args(body_node, :system, "go", "get") do
problem "Do not use `go get`. Please ask upstream to implement Go vendoring"
if (method_node = find_method_def(body_node, :install))
find_method_with_args(method_node, :system, "go", "get") do
problem "Do not use `go get`. Please ask upstream to implement Go vendoring"
end
end
find_method_with_args(body_node, :system, "dep", "ensure") do |d|