diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 7ae80d51ba..96b9870c65 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -740,8 +740,10 @@ class FormulaAuditor bin_names += dir.children.map(&:basename).map(&:to_s) end bin_names.each do |name| - if text =~ /test do.*system\s+['"]#{name}/m - problem %(fully scope test system calls e.g. system "\#{bin}/#{name}") + ["system", "shell_output", "pipe_output"].each do |cmd| + if text =~ /(def test|test do).*#{cmd}[\(\s]+['"]#{name}[\s'"]/m + problem %(fully scope test #{cmd} calls e.g. #{cmd} "\#{bin}/#{name}") + end end end