Shared: Match line information on Alert and Sink locations.

This commit is contained in:
Michael Nebel
2025-04-23 12:35:17 +02:00
parent 008dd3f4e3
commit 617f4729d8

View File

@@ -774,8 +774,10 @@ module TestPostProcessing {
*/
private string getSinkTag(int row) {
getQueryKind() = "path-problem" and
exists(string loc | queryResults(mainResultSet(), row, 4, loc) |
if queryResults(mainResultSet(), row, 0, loc) then result = "Alert" else result = "Sink"
exists(TestLocation sinkLoc, TestLocation selectLoc |
mainQueryResult(row, 0, selectLoc) and
mainQueryResult(row, 4, sinkLoc) and
if sameLineInfo(selectLoc, sinkLoc) then result = "Alert" else result = "Sink"
)
}