Skip to content
Snippets Groups Projects
Commit f35a86ff authored by Mike McQuaid's avatar Mike McQuaid
Browse files

audit: stricter test system calls check.

Ensure that the name is suffixed with whitespace or quotes.
parent 7aa26f78
No related branches found
No related tags found
No related merge requests found
......@@ -735,7 +735,7 @@ class FormulaAuditor
end
bin_names.each do |name|
["system", "shell_output", "pipe_output"].each do |cmd|
if text =~ /(def test|test do).*#{cmd}[\(\s]+['"]#{name}/m
if text =~ /(def test|test do).*#{cmd}[\(\s]+['"]#{name}[\s'"]/m
problem %(fully scope test #{cmd} calls e.g. #{cmd} "\#{bin}/#{name}")
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment