Skip to content

Difference between DataFlow::Node and DataFlow::PathNode? #7429

Answered by smowton
atwilso asked this question in Q&A
Discussion options

You must be logged in to vote

Guessing you're thinking of config.hasFlow?

hasFlowPath specifies PathNodes, which are used to produce the path explanation that accompanies alerts from @kind path-problem queries. Therefore it's useful specifically in the select clause of such a query.

hasFlow on the other hand specifies plain old Nodes, which are useful for other purposes -- maybe navigating to related dataflow nodes, such as from a call node to its arguments. If you're not selecting these nodes in a path-problem query, this saves you a .getNode() to access a PathNode's underlying Node.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@atwilso
Comment options

@smowton
Comment options

@atwilso
Comment options

@intrigus-lgtm
Comment options

Answer selected by atwilso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants