Merge pull request #18346 from cho-m/xcodebuild-dep

rubocops: `xcodebuild` needs an Xcode dependency
This commit is contained in:
Mike McQuaid 2024-09-18 09:11:41 +01:00 committed by GitHub
commit e220725814
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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"