Skip to content

Commit f141336

Browse files
committed
C#: Fake location of methods as we want to use the defined summaries for testing purposes.
1 parent 9f611d7 commit f141336

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ class Conf extends TaintTracking::Configuration {
5353
}
5454
}
5555

56+
/**
57+
* Simulate that methods with summaries are not included in the source code.
58+
* This is relevant for dataflow analysis using summaries tagged as generated.
59+
*/
60+
private class MyMethod extends Method {
61+
override predicate fromSource() { none() }
62+
}
63+
5664
from DataFlow::PathNode source, DataFlow::PathNode sink, Conf conf
5765
where conf.hasFlowPath(source, sink)
5866
select sink, source, sink, "$@", source, source.toString()

0 commit comments

Comments
 (0)