audit: Remove SYMROOT
SYMROOT is only a valid argument when -project is used. xcodebuild has other uses than building Xcode projects.
This commit is contained in:
parent
64b6846d60
commit
ceeb5ea9ec
@ -53,12 +53,6 @@ module RuboCop
|
||||
problem "\"Formula.factory(name)\" is deprecated in favor of \"Formula[name]\""
|
||||
end
|
||||
|
||||
find_every_method_call_by_name(body_node, :xcodebuild).each do |m|
|
||||
next if parameters_passed?(m, /SYMROOT=/)
|
||||
|
||||
problem 'xcodebuild should be passed an explicit "SYMROOT"'
|
||||
end
|
||||
|
||||
find_method_with_args(body_node, :system, "xcodebuild") do
|
||||
problem %q(use "xcodebuild *args" instead of "system 'xcodebuild', *args")
|
||||
end
|
||||
|
@ -71,32 +71,6 @@ describe RuboCop::Cop::FormulaAudit::Text do
|
||||
RUBY
|
||||
end
|
||||
|
||||
it "reports an offense if xcodebuild is called without SYMROOT" do
|
||||
expect_offense(<<~RUBY)
|
||||
class Foo < Formula
|
||||
url "https://brew.sh/foo-1.0.tgz"
|
||||
homepage "https://brew.sh"
|
||||
|
||||
def install
|
||||
xcodebuild "-project", "meow.xcodeproject"
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ xcodebuild should be passed an explicit \"SYMROOT\"
|
||||
end
|
||||
end
|
||||
RUBY
|
||||
|
||||
expect_offense(<<~RUBY)
|
||||
class Foo < Formula
|
||||
url "https://brew.sh/foo-1.0.tgz"
|
||||
homepage "https://brew.sh"
|
||||
|
||||
def install
|
||||
xcodebuild
|
||||
^^^^^^^^^^ xcodebuild should be passed an explicit \"SYMROOT\"
|
||||
end
|
||||
end
|
||||
RUBY
|
||||
end
|
||||
|
||||
it "reports an offense if `go get` is executed" do
|
||||
expect_offense(<<~RUBY)
|
||||
class Foo < Formula
|
||||
|
Loading…
x
Reference in New Issue
Block a user