audit: Check for invocations of cctools.

Now that ruby-macho is available, cctools should be invoked as little
as possible.
This commit is contained in:
William Woodruff 2017-01-11 23:07:26 -05:00
parent f7bccee214
commit 82c046b3e1
No known key found for this signature in database
GPG Key ID: 85AE00C504833B3C

View File

@ -1039,6 +1039,10 @@ class FormulaAuditor
problem "'fails_with :llvm' is now a no-op so should be removed" problem "'fails_with :llvm' is now a no-op so should be removed"
end end
if line =~ /system\s+['"](otool)|(install_name_tool)|(lipo)/
problem "Use ruby-macho instead of calling #{$1}"
end
if formula.tap.to_s == "homebrew/core" if formula.tap.to_s == "homebrew/core"
["OS.mac?", "OS.linux?"].each do |check| ["OS.mac?", "OS.linux?"].each do |check|
next unless line.include?(check) next unless line.include?(check)