Swift: add a query showing successfully extracted files

(cherry picked from commit 7c15527300)
This commit is contained in:
Alex Denisov
2023-03-17 11:17:44 +01:00
committed by Paolo Tranquilli
parent 218ed8ad37
commit 635564531c
5 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
/**
* @name Successfully extracted files
* @description Lists all files in the source code directory that were extracted without encountering a problem in the file.
* @kind diagnostic
* @id swift/diagnostics/successfully-extracted-files
* @tags successfully-extracted-files
*/
import swift
from File f
where
not exists(CompilerError e | e.getFile() = f) and
f.getBaseName().regexpMatch(".*\\.swift\\z")
select f, "File successfully extracted."

View File

@@ -0,0 +1 @@
| main.swift:0:0:0:0 | main.swift | File successfully extracted. |

View File

@@ -0,0 +1 @@
diagnostics/SuccessfullyExtractedFiles.ql

View File

@@ -0,0 +1,2 @@
//codeql-extractor-expected-status: 1
#error("Uh oh")