audit: clean up some regexps
This commit is contained in:
parent
4a8653ba7d
commit
8bd619e03b
@ -430,16 +430,17 @@ class FormulaAuditor
|
|||||||
problem "Use MacOS.version instead of MACOS_VERSION"
|
problem "Use MacOS.version instead of MACOS_VERSION"
|
||||||
end
|
end
|
||||||
|
|
||||||
if text =~ /(MacOS.((snow_)?leopard|leopard|(mountain_)?lion)\?)/
|
cats = %w{leopard snow_leopard lion mountain_lion}.join("|")
|
||||||
problem "#{$1} is deprecated, use a comparison to MacOS.version instead"
|
if text =~ /MacOS\.(?:#{cats})\?/
|
||||||
|
problem "\"#{$&}\" is deprecated, use a comparison to MacOS.version instead"
|
||||||
end
|
end
|
||||||
|
|
||||||
if text =~ /skip_clean\s+:all/
|
if text =~ /skip_clean\s+:all/
|
||||||
problem "`skip_clean :all` is deprecated; brew no longer strips symbols"
|
problem "`skip_clean :all` is deprecated; brew no longer strips symbols"
|
||||||
end
|
end
|
||||||
|
|
||||||
if text =~ /depends_on (.*)\.new$/
|
if text =~ /depends_on [A-Z][\w:]+\.new$/
|
||||||
problem "`depends_on` can take requirement classes directly"
|
problem "`depends_on` can take requirement classes instead of instances"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user