aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2014-12-27 15:59:16 +0000
committerMike McQuaid2014-12-27 16:31:44 +0000
commitc4f7217811bc0f471ad0b4a51506b7ed377991b9 (patch)
treeeb257ff5f064b2dd199c8870aa6fa8ccf198379d /Library
parentf3a5a83452494c11bf6ff58db1b983172c76fc7f (diff)
downloadbrew-c4f7217811bc0f471ad0b4a51506b7ed377991b9.tar.bz2
audit (strict): add require formula check.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/audit.rb5
1 files changed, 5 insertions, 0 deletions
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