aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/audit.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 8b773345d..2ed56da80 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -442,6 +442,10 @@ class FormulaAuditor
if text =~ /depends_on [A-Z][\w:]+\.new$/
problem "`depends_on` can take requirement classes instead of instances"
end
+
+ if text =~ /^def (\w+).*$/
+ problem "Define method #{$1.inspect} in the class body, not at the top-level"
+ end
end
def audit