Skip to content

Commit 617f472

Browse files
committed
Shared: Match line information on Alert and Sink locations.
1 parent 008dd3f commit 617f472

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

shared/util/codeql/util/test/InlineExpectationsTest.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,8 +774,10 @@ module TestPostProcessing {
774774
*/
775775
private string getSinkTag(int row) {
776776
getQueryKind() = "path-problem" and
777-
exists(string loc | queryResults(mainResultSet(), row, 4, loc) |
778-
if queryResults(mainResultSet(), row, 0, loc) then result = "Alert" else result = "Sink"
777+
exists(TestLocation sinkLoc, TestLocation selectLoc |
778+
mainQueryResult(row, 0, selectLoc) and
779+
mainQueryResult(row, 4, sinkLoc) and
780+
if sameLineInfo(selectLoc, sinkLoc) then result = "Alert" else result = "Sink"
779781
)
780782
}
781783

0 commit comments

Comments
 (0)