Use _ for exists-variable that is only used once

This commit is contained in:
Owen Mansel-Chan
2023-02-17 16:44:41 +00:00
parent 607e2817e5
commit 34bca0612b

View File

@@ -8,10 +8,10 @@ class SqlTest extends InlineExpectationsTest {
override predicate hasActualResult(Location location, string element, string tag, string value) {
tag = "query" and
exists(SQL::Query q, SQL::QueryString qs, int qsLine | qs = q.getAQueryString() |
exists(SQL::Query q, SQL::QueryString qs | qs = q.getAQueryString() |
q.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
qs.hasLocationInfo(_, qsLine, _, _, _) and
qs.hasLocationInfo(_, _, _, _, _) and
element = q.toString() and
value = qs.toString()
)