audit: flag '--with{,out}-check' options

Closes Homebrew/homebrew#46794.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
This commit is contained in:
Baptiste Fontaine 2015-12-08 13:25:19 +01:00
parent d36d88edf2
commit 48b39ba1e7

View File

@ -372,6 +372,10 @@ class FormulaAuditor
if o.name !~ /with(out)?-/ && o.name != "c++11" && o.name != "universal" && o.name != "32-bit"
problem "Options should begin with with/without. Migrate '--#{o.name}' with `deprecated_option`."
end
if o.name =~ /^with(out)?-(?:checks?|tests)$/
problem "Use '--with#{$1}-test' instead of '--#{o.name}'. Migrate '--#{o.name}' with `deprecated_option`."
end
end
end