Merge pull request #19346 from jketema/swift-files-2

Swift: Make file checking in integration tests more strict
This commit is contained in:
Jeroen Ketema
2025-04-22 15:33:33 +02:00
committed by GitHub
15 changed files with 31 additions and 8 deletions

View File

@@ -1,4 +1,5 @@
import swift import swift
from File f from File f
where exists(f.getRelativePath()) or f instanceof UnknownFile
select f select f

View File

@@ -1,4 +1,5 @@
import swift import swift
from File f from File f
where exists(f.getRelativePath()) or f instanceof UnknownFile
select f select f

View File

@@ -1,4 +1,5 @@
import swift import swift
from File f from File f
where exists(f.getRelativePath()) or f instanceof UnknownFile
select f select f

View File

@@ -1,4 +1,5 @@
import swift import swift
from File f from File f
where exists(f.getRelativePath()) or f instanceof UnknownFile
select f select f

View File

@@ -1,5 +1,7 @@
import swift import swift
from ClassDecl d from ClassDecl d
where d.getLocation().getFile().getBaseName() != "Package.swift" where
d.getLocation().getFile().getBaseName() != "Package.swift" and
exists(d.getLocation().getFile().getRelativePath())
select d select d

View File

@@ -1,5 +1,7 @@
import swift import swift
from Deinitializer d from Deinitializer d
where d.getLocation().getFile().getBaseName() != "Package.swift" where
d.getLocation().getFile().getBaseName() != "Package.swift" and
exists(d.getLocation().getFile().getRelativePath())
select d select d

View File

@@ -1,5 +1,7 @@
import swift import swift
from EnumDecl d from EnumDecl d
where d.getLocation().getFile().getBaseName() != "Package.swift" where
d.getLocation().getFile().getBaseName() != "Package.swift" and
exists(d.getLocation().getFile().getRelativePath())
select d select d

View File

@@ -1,5 +1,7 @@
import codeql.swift.elements.decl.internal.AccessorOrNamedFunction import codeql.swift.elements.decl.internal.AccessorOrNamedFunction
from AccessorOrNamedFunction f from AccessorOrNamedFunction f
where f.getLocation().getFile().getBaseName() != "Package.swift" where
f.getLocation().getFile().getBaseName() != "Package.swift" and
exists(f.getLocation().getFile().getRelativePath())
select f select f

View File

@@ -1,5 +1,7 @@
import swift import swift
from Initializer d from Initializer d
where d.getLocation().getFile().getBaseName() != "Package.swift" where
d.getLocation().getFile().getBaseName() != "Package.swift" and
exists(d.getLocation().getFile().getRelativePath())
select d select d

View File

@@ -1,5 +1,7 @@
import swift import swift
from ProtocolDecl d from ProtocolDecl d
where d.getLocation().getFile().getBaseName() != "Package.swift" where
d.getLocation().getFile().getBaseName() != "Package.swift" and
exists(d.getLocation().getFile().getRelativePath())
select d select d

View File

@@ -1,5 +1,7 @@
import swift import swift
from StructDecl d from StructDecl d
where d.getLocation().getFile().getBaseName() != "Package.swift" where
d.getLocation().getFile().getBaseName() != "Package.swift" and
exists(d.getLocation().getFile().getRelativePath())
select d select d

View File

@@ -1,5 +1,7 @@
import swift import swift
from VarDecl d from VarDecl d
where d.getLocation().getFile().getBaseName() != "Package.swift" where
d.getLocation().getFile().getBaseName() != "Package.swift" and
exists(d.getLocation().getFile().getRelativePath())
select d select d

View File

@@ -1,4 +1,5 @@
import swift import swift
from File f from File f
where exists(f.getRelativePath()) or f instanceof UnknownFile
select f select f

View File

@@ -1,4 +1,5 @@
import swift import swift
from File f from File f
where exists(f.getRelativePath()) or f instanceof UnknownFile
select f select f

View File

@@ -1,4 +1,5 @@
import swift import swift
from File f from File f
where exists(f.getRelativePath()) or f instanceof UnknownFile
select f select f