aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 d252909d0..4357cc098 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -182,6 +182,10 @@ class FormulaAuditor
problem "'__END__' was found, but 'DATA' is not used"
end
+ if text =~ /inreplace [^\n]* do [^\n]*\n[^\n]*\.gsub![^\n]*\n\ *end/m
+ problem "'inreplace ... do' was used for a single substitution (use the non-block form instead)."
+ end
+
unless text.has_trailing_newline?
problem "File should end with a newline"
end