Skip to content

Commit 429decd

Browse files
author
james
committed
tweak sojme text
1 parent ad2850d commit 429decd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/codeql/writing-codeql-queries/debugging-a-data-flow-query-using-partial-flow.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Debugging data-flow queries using partial flow
55

66
If a data-flow query unexpectedly produces no results, you can use partial flow to debug the problem.
77

8+
In CodeQL, you can use :ref:`data flow analysis <about-data-flow-analysis>` to compute the possible values that a variable can hold at various points in a program.
89
A typical data-flow query looks like this:
910

1011
.. code-block:: ql
@@ -31,10 +32,13 @@ Or slightly simpler without path explanations:
3132
where config.hasPath(source, sink)
3233
select sink, "Sink is reached from $@.", source.getNode(), "here"
3334
35+
If a data-flow query that you have written does not produce any results when you expect it to, there may be a problem with your query.
36+
You can try to debug the potential problem by following the steps described below.
37+
3438
Checking sources and sinks
3539
--------------------------
3640

37-
As a first step, make sure that the source and sink definitions contain what you expect. If one of these is empty then there can never be any data flow. The easiest way to verify this is using quick evaluation: Select the text ``node instanceof MySource``, right-click, and choose "CodeQL: Quick Evaluation". This will evaluate the highlighted text, which in this case means the set of sources.
41+
As a first step, make sure that the source and sink definitions contain what you expect. If one of these is empty then there can never be any data flow. The easiest way to verify this is using quick evaluation in CodeQL for VS Code: Select the text ``node instanceof MySource``, right-click, and choose "CodeQL: Quick Evaluation". This will evaluate the highlighted text, which in this case means the set of sources.
3842

3943
If both source and sink definitions look good then we will need to look for missing flow steps.
4044

0 commit comments

Comments
 (0)