From c2abfe89bbccf95c112b4883b26ffb5bee03889f Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 27 Dec 2014 15:59:16 +0000 Subject: audit (strict): add require formula check. --- Library/Homebrew/cmd/audit.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Library') diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 8c76d92a7..b2264be40 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -41,6 +41,7 @@ class FormulaText @text = path.open("rb", &:read) end + def without_patch @text.split("\n__END__").first end @@ -565,6 +566,10 @@ class FormulaAuditor good_quotes = bad_quotes.gsub "'", "\"" problem "use double-quotes for `#{good_quotes}` instead of `#{bad_quotes}`" end + + if line =~ /(require ["']formula["'])/ + problem "`#{$1}` is now unnecessary" + end end end -- cgit v1.2.3