rubocops: xcodebuild needs an Xcode dependency

This commit is contained in:
Michael Cho 2024-09-17 11:59:50 -04:00
parent 335d370ec0
commit 834c2b1094
No known key found for this signature in database
GPG Key ID: 55E85E28A7CD1E85

View File

@ -62,6 +62,10 @@ module RuboCop
problem %q(use "xcodebuild *args" instead of "system 'xcodebuild', *args") problem %q(use "xcodebuild *args" instead of "system 'xcodebuild', *args")
end end
if !depends_on?(:xcode) && method_called_ever?(body_node, :xcodebuild)
problem "`xcodebuild` needs an Xcode dependency"
end
if (method_node = find_method_def(body_node, :install)) if (method_node = find_method_def(body_node, :install))
find_method_with_args(method_node, :system, "go", "get") do find_method_with_args(method_node, :system, "go", "get") do
problem "Do not use `go get`. Please ask upstream to implement Go vendoring" problem "Do not use `go get`. Please ask upstream to implement Go vendoring"