audit: tweak dependency option audit.

Make sure that `if build.with?` isn't caught.
This commit is contained in:
Mike McQuaid 2017-04-27 16:30:05 +01:00
parent 698afa2ba7
commit 1c9cfb2419

View File

@ -981,7 +981,7 @@ class FormulaAuditor
problem "#{$2} modules should be vendored rather than use deprecated `depends_on \"#{$1}\" => :#{$2}#{$3}`"
end
if line =~ /depends_on\s+['"](.+)['"]\s+=>\s+.*['"](.+)['"]/
if line =~ /depends_on\s+['"](.+)['"]\s+=>\s+.*(?<!\?[( ])['"](.+)['"]/
problem "Dependency #{$1} should not use option #{$2}"
end