aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/rubocops
diff options
context:
space:
mode:
authorGautham Goli2017-08-14 23:32:06 +0530
committerGautham Goli2017-08-14 23:32:06 +0530
commitd2a7314f538f919e9b09e4b27c1f86b7d3d2eda2 (patch)
treeee580c10310cc63c0e0c2947be0f95631f297cf1 /Library/Homebrew/rubocops
parent64a929184a45f530a49af7b047d5b6605b50b1f8 (diff)
downloadbrew-d2a7314f538f919e9b09e4b27c1f86b7d3d2eda2.tar.bz2
add test for env mod through system call
Diffstat (limited to 'Library/Homebrew/rubocops')
-rw-r--r--Library/Homebrew/rubocops/lines_cop.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/Library/Homebrew/rubocops/lines_cop.rb b/Library/Homebrew/rubocops/lines_cop.rb
index 6520018ac..e20fa9f8b 100644
--- a/Library/Homebrew/rubocops/lines_cop.rb
+++ b/Library/Homebrew/rubocops/lines_cop.rb
@@ -135,6 +135,7 @@ module RuboCop
problem "\"\#\{prefix}#{match[1]}\" should be \"\#{#{match[2].downcase}}\""
end
end
+
find_every_method_call_by_name(body_node, :depends_on).each do |m|
key, value = destructure_hash(parameters(m).first)
next if (key.nil? || value.nil?)
@@ -142,11 +143,11 @@ module RuboCop
problem "#{match[1]} modules should be vendored rather than use deprecated #{m.source}`"
end
- # find_every_method_call_by_name(body_node, :system).each do |m|
- # next unless match = regex_match_group(parameters(m).first, %r{(env|export)(\s+)?})
- # problem "Use ENV instead of invoking '#{match[1]}' to modify the environment"
- # end
- #
+ find_every_method_call_by_name(body_node, :system).each do |m|
+ next unless match = regex_match_group(parameters(m).first, %r{(env|export)(\s+)?})
+ problem "Use ENV instead of invoking '#{match[1]}' to modify the environment"
+ end
+
# find_every_method_call_by_name(body_node, :depends_on).each do |m|
# next unless modifier?(m)
# dep, option = hash_dep(m)