Skip to content

Commit 7c15527

Browse files
committed
Swift: add a query showing successfully extracted files
1 parent 282b5d4 commit 7c15527

File tree

5 files changed

+19
-0
lines changed

5 files changed

+19
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* @name Successfully extracted files
3+
* @description Lists all files in the source code directory that were extracted without encountering a problem in the file.
4+
* @kind diagnostic
5+
* @id swift/diagnostics/successfully-extracted-files
6+
* @tags successfully-extracted-files
7+
*/
8+
9+
import swift
10+
11+
from File f
12+
where
13+
not exists(CompilerError e | e.getFile() = f) and
14+
f.getBaseName().regexpMatch(".*\\.swift\\z")
15+
select f, "File successfully extracted."
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| main.swift:0:0:0:0 | main.swift | File successfully extracted. |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
diagnostics/SuccessfullyExtractedFiles.ql
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
//codeql-extractor-expected-status: 1
2+
#error("Uh oh")

swift/ql/test/query-tests/Diagnostics/main.swift

Whitespace-only changes.

0 commit comments

Comments
 (0)