Skip to content

Commit e8498b8

Browse files
authored
Merge pull request github#5430 from RasmusWL/improve-path-docs
Approved by shati-patel, yoff
2 parents 09a49e4 + d426f1e commit e8498b8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/codeql/writing-codeql-queries/creating-path-queries.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,20 @@ You should use the following template:
5555
*/
5656
5757
import <language>
58+
// For some languages (Java/C++/Python) you need to explicitly import the data flow library, such as
59+
// import semmle.code.java.dataflow.DataFlow
5860
import DataFlow::PathGraph
5961
...
6062
61-
from Configuration config, DataFlow::PathNode source, DataFlow::PathNode sink
63+
from MyConfiguration config, DataFlow::PathNode source, DataFlow::PathNode sink
6264
where config.hasFlowPath(source, sink)
6365
select sink.getNode(), source, sink, "<message>"
6466
6567
Where:
6668

6769
- ``DataFlow::Pathgraph`` is the path graph module you need to import from the standard CodeQL libraries.
6870
- ``source`` and ``sink`` are nodes on the `path graph <https://en.wikipedia.org/wiki/Path_graph>`__, and ``DataFlow::PathNode`` is their type.
69-
- ``Configuration`` is a class containing the predicates which define how data may flow between the ``source`` and the ``sink``.
71+
- ``MyConfiguration`` is a class containing the predicates which define how data may flow between the ``source`` and the ``sink``.
7072

7173

7274
The following sections describe the main requirements for a valid path query.

0 commit comments

Comments
 (0)