Merge pull request #1424 from MikeMcQuaid/audit-more-test-system
audit: check more unscoped test calls.
This commit is contained in:
commit
2a865f085e
@ -740,8 +740,10 @@ class FormulaAuditor
|
|||||||
bin_names += dir.children.map(&:basename).map(&:to_s)
|
bin_names += dir.children.map(&:basename).map(&:to_s)
|
||||||
end
|
end
|
||||||
bin_names.each do |name|
|
bin_names.each do |name|
|
||||||
if text =~ /test do.*system\s+['"]#{name}/m
|
["system", "shell_output", "pipe_output"].each do |cmd|
|
||||||
problem %(fully scope test system calls e.g. system "\#{bin}/#{name}")
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user