diff --git a/csharp/ql/lib/change-notes/2024-01-17-csharp-successfully-extracted.md b/csharp/ql/lib/change-notes/2024-01-17-csharp-successfully-extracted.md new file mode 100644 index 00000000000..1ed6b51d6c5 --- /dev/null +++ b/csharp/ql/lib/change-notes/2024-01-17-csharp-successfully-extracted.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* The diagnostic query `cs/diagnostics/successfully-extracted-files`, and therefore the Code Scanning UI measure of scanned C# files, now considers any C# file seen during extraction, even one with some errors, to be extracted / scanned. diff --git a/csharp/ql/src/Diagnostics/DiagnosticNoExtractionErrors.ql b/csharp/ql/src/Diagnostics/ExtractedFiles.ql similarity index 65% rename from csharp/ql/src/Diagnostics/DiagnosticNoExtractionErrors.ql rename to csharp/ql/src/Diagnostics/ExtractedFiles.ql index cd387c11b4d..c1f35145abe 100644 --- a/csharp/ql/src/Diagnostics/DiagnosticNoExtractionErrors.ql +++ b/csharp/ql/src/Diagnostics/ExtractedFiles.ql @@ -1,5 +1,5 @@ /** - * @name Successfully extracted files + * @name Extracted files * @description A list of all files in the source code directory that were extracted * without encountering an extraction or compiler error in the file. * @kind diagnostic @@ -11,8 +11,5 @@ import csharp import semmle.code.csharp.commons.Diagnostics from File file -where - file.fromSource() and - not exists(ExtractorError e | e.getLocation().getFile() = file) and - not exists(CompilerError e | e.getLocation().getFile() = file) +where file.fromSource() select file, "" diff --git a/csharp/ql/test/library-tests/diagnostics/DiagnosticNoExtractorErrors.expected b/csharp/ql/test/library-tests/diagnostics/DiagnosticNoExtractorErrors.expected deleted file mode 100644 index 17e4dc54b7d..00000000000 --- a/csharp/ql/test/library-tests/diagnostics/DiagnosticNoExtractorErrors.expected +++ /dev/null @@ -1 +0,0 @@ -| A.cs:0:0:0:0 | A.cs | | diff --git a/csharp/ql/test/library-tests/diagnostics/DiagnosticNoExtractorErrors.qlref b/csharp/ql/test/library-tests/diagnostics/DiagnosticNoExtractorErrors.qlref deleted file mode 100644 index 7994e050699..00000000000 --- a/csharp/ql/test/library-tests/diagnostics/DiagnosticNoExtractorErrors.qlref +++ /dev/null @@ -1 +0,0 @@ -Diagnostics/DiagnosticNoExtractionErrors.ql diff --git a/csharp/ql/test/library-tests/diagnostics/ExtractedFiles.expected b/csharp/ql/test/library-tests/diagnostics/ExtractedFiles.expected new file mode 100644 index 00000000000..d1248e5ee31 --- /dev/null +++ b/csharp/ql/test/library-tests/diagnostics/ExtractedFiles.expected @@ -0,0 +1,2 @@ +| A.cs:0:0:0:0 | A.cs | | +| Program.cs:0:0:0:0 | Program.cs | | diff --git a/csharp/ql/test/library-tests/diagnostics/ExtractedFiles.qlref b/csharp/ql/test/library-tests/diagnostics/ExtractedFiles.qlref new file mode 100644 index 00000000000..e900e9c5314 --- /dev/null +++ b/csharp/ql/test/library-tests/diagnostics/ExtractedFiles.qlref @@ -0,0 +1 @@ +Diagnostics/ExtractedFiles.ql