Merge pull request #1673 from MikeMcQuaid/audit-fails-with-llvm

audit: flag use of "fails_with :llvm".
This commit is contained in:
Mike McQuaid 2016-12-18 11:17:44 -08:00 committed by GitHub
commit e95c843c2e
3 changed files with 8 additions and 0 deletions

View File

@ -1000,6 +1000,10 @@ class FormulaAuditor
problem "Use Language::Node for npm install args"
end
if line.include?("fails_with :llvm")
problem "'fails_with :llvm' is now a no-op so should be removed"
end
return unless @strict
if line =~ /system ((["'])[^"' ]*(?:\s[^"' ]*)+\2)/

View File

@ -2340,6 +2340,8 @@ class Formula
# version '4.8.1'
# end</pre>
def fails_with(compiler, &block)
# TODO: deprecate this in future.
# odeprecated "fails_with :llvm" if compiler == :llvm
specs.each { |spec| spec.fails_with(compiler, &block) }
end

View File

@ -173,6 +173,8 @@ class SoftwareSpec
end
def fails_with(compiler, &block)
# TODO: deprecate this in future.
# odeprecated "fails_with :llvm" if compiler == :llvm
compiler_failures << CompilerFailure.create(compiler, &block)
end