xcodebuild audit: match xcodebuild with no args
Closes #2199. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
This commit is contained in:
parent
fd4fd18277
commit
177aefdf55
@ -924,7 +924,7 @@ class FormulaAuditor
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if text =~ /xcodebuild[ (]["'*]/ && !text.include?("SYMROOT=")
|
if text =~ /xcodebuild[ (]*["'*]*/ && !text.include?("SYMROOT=")
|
||||||
problem 'xcodebuild should be passed an explicit "SYMROOT"'
|
problem 'xcodebuild should be passed an explicit "SYMROOT"'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -465,4 +465,38 @@ class FormulaAuditorTests < Homebrew::TestCase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_audit_xcodebuild_suggests_symroot
|
||||||
|
fa = formula_auditor "foo", <<-EOS.undent
|
||||||
|
class Foo < Formula
|
||||||
|
url "http://example.com/foo-1.0.tgz"
|
||||||
|
homepage "http://example.com"
|
||||||
|
|
||||||
|
def install
|
||||||
|
xcodebuild "-project", "meow.xcodeproject"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
EOS
|
||||||
|
|
||||||
|
fa.audit_text
|
||||||
|
|
||||||
|
assert_match 'xcodebuild should be passed an explicit "SYMROOT"', fa.problems.first
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_audit_bare_xcodebuild_suggests_symroot_also
|
||||||
|
fa = formula_auditor "foo", <<-EOS.undent
|
||||||
|
class Foo < Formula
|
||||||
|
url "http://example.com/foo-1.0.tgz"
|
||||||
|
homepage "http://example.com"
|
||||||
|
|
||||||
|
def install
|
||||||
|
xcodebuild
|
||||||
|
end
|
||||||
|
end
|
||||||
|
EOS
|
||||||
|
|
||||||
|
fa.audit_text
|
||||||
|
|
||||||
|
assert_match 'xcodebuild should be passed an explicit "SYMROOT"', fa.problems.first
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user