diff options
| author | Mike McQuaid | 2016-11-02 21:50:54 -0400 |
|---|---|---|
| committer | GitHub | 2016-11-02 21:50:54 -0400 |
| commit | 2a865f085e7b900e3b09cc6df17ac1636fd55448 (patch) | |
| tree | 0a57b4139dd6d11abe515517719f4c53dea86b29 | |
| parent | 82d1269c9feaf29998d6161de9057a5e88698667 (diff) | |
| parent | f35a86ff70fbc89d03811c821689c7e6c0536899 (diff) | |
| download | brew-2a865f085e7b900e3b09cc6df17ac1636fd55448.tar.bz2 | |
Merge pull request #1424 from MikeMcQuaid/audit-more-test-system
audit: check more unscoped test calls.
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 7ae80d51b..96b9870c6 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 |
