提交 e69ace89 编写于 作者: J Justin Collins

Add Util.node_type?

上级 49e74ac1
......@@ -192,6 +192,11 @@ module Brakeman::Util
exp.is_a? Sexp
end
#Check if _exp_ is a Sexp and the node type matches one of the given types.
def node_type? exp, *types
exp.is_a? Sexp and types.include? exp.node_type
end
#Return file name related to given warning. Uses +warning.file+ if it exists
def file_for warning, tracker = nil
if tracker.nil?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册