From adb58e304d3267c98895e7688510cb10c122a481 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Tue, 22 Apr 2025 16:51:36 +0200 Subject: [PATCH] Swift: Make file checking in tests more strict With Swift 6.1 the extractor will start to extract files outside of the test directory. These files and their elements we do not want to see in our tests. Test forgotten in https://github.com/github/codeql/pull/19344 --- swift/ql/test/library-tests/elements/location/location.ql | 1 + 1 file changed, 1 insertion(+) diff --git a/swift/ql/test/library-tests/elements/location/location.ql b/swift/ql/test/library-tests/elements/location/location.ql index 1d0b80f6bc10..0bb91d5748a5 100644 --- a/swift/ql/test/library-tests/elements/location/location.ql +++ b/swift/ql/test/library-tests/elements/location/location.ql @@ -1,4 +1,5 @@ import swift from Location l +where exists(l.getFile().getRelativePath()) or l instanceof UnknownLocation select l