Skip to content

Commit 64b9e91

Browse files
committed
Python: only show results in extracted files
1 parent 6cecd3b commit 64b9e91

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

python/ql/test/library-tests/PointsTo/new/ImpliesDataflow.expected

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,4 @@
8282
| code/t_type.py:3:1:3:16 | ControlFlowNode for ClassExpr | code/t_type.py:6:1:6:9 | ControlFlowNode for type() |
8383
| code/t_type.py:3:1:3:16 | ControlFlowNode for ClassExpr | code/t_type.py:13:5:13:13 | ControlFlowNode for type() |
8484
| code/test_package/module2.py:5:5:5:6 | ControlFlowNode for Dict | code/j_convoluted_imports.py:25:1:25:1 | ControlFlowNode for r |
85-
| file:///usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_py_abc.py:14:1:14:20 | ControlFlowNode for ClassExpr | file:///usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/io.py:72:37:72:47 | ControlFlowNode for Attribute |
86-
| file:///usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/abc.py:71:5:71:24 | ControlFlowNode for ClassExpr | file:///usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/io.py:72:37:72:47 | ControlFlowNode for Attribute |
85+
| code/v_pointsto_regressions.py:15:18:15:21 | ControlFlowNode for self | code/v_pointsto_regressions.py:19:9:19:12 | ControlFlowNode for self |

python/ql/test/library-tests/PointsTo/new/ImpliesDataflow.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ predicate hasFlow(DataFlow::Node origin, DataFlow::Node pointer) {
2828

2929
from DataFlow::Node pointer, DataFlow::Node origin
3030
where
31+
exists(pointer.getLocation().getFile().getRelativePath()) and
32+
exists(origin.getLocation().getFile().getRelativePath()) and
3133
pointsToOrigin(pointer, origin) and
3234
not hasFlow(origin, pointer)
3335
select origin, pointer

0 commit comments

Comments
 (0)