mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Add diagnostic query to get correctly extracted files
This commit is contained in:
14
csharp/ql/src/Diagnostics/DiagnosticNoExtractionErrors.ql
Normal file
14
csharp/ql/src/Diagnostics/DiagnosticNoExtractionErrors.ql
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @name Successfully extracted files
|
||||
* @description A list of all files in the source code directory that were extracted
|
||||
* without encountering an extraction error in the file.
|
||||
* @kind diagnostic
|
||||
* @id cs/diagnostics/successfully-extracted-files
|
||||
*/
|
||||
|
||||
import csharp
|
||||
import semmle.code.csharp.commons.Diagnostics
|
||||
|
||||
from File file
|
||||
where file.fromSource() and not exists(ExtractorError e | e.getLocation().getFile() = file)
|
||||
select file, ""
|
||||
4
csharp/ql/test/library-tests/diagnostics/A.cs
Normal file
4
csharp/ql/test/library-tests/diagnostics/A.cs
Normal file
@@ -0,0 +1,4 @@
|
||||
public class A
|
||||
{
|
||||
public void M() { }
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
| A.cs:0:0:0:0 | A.cs | |
|
||||
@@ -0,0 +1 @@
|
||||
Diagnostics/DiagnosticNoExtractionErrors.ql
|
||||
Reference in New Issue
Block a user