mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
C++: Rename diagnostic queries.
This commit is contained in:
16
cpp/ql/src/Diagnostics/ExtractionErrors.ql
Normal file
16
cpp/ql/src/Diagnostics/ExtractionErrors.ql
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @name Extraction errors
|
||||
* @description List all extraction errors for files in the source code directory.
|
||||
* @kind diagnostic
|
||||
* @id cpp/diagnostics/extraction-errors
|
||||
*/
|
||||
|
||||
import cpp
|
||||
import ExtractionErrors
|
||||
|
||||
from ExtractionError error
|
||||
where
|
||||
error instanceof ExtractionUnknownError or
|
||||
exists(error.getFile().getRelativePath())
|
||||
select error, "Extraction failed in " + error.getFile() + " with error " + error.getErrorMessage(),
|
||||
error.getSeverity()
|
||||
@@ -12,12 +12,12 @@ import cpp
|
||||
* Thus, if the extractor emitted at least one diagnostic of severity discretionary
|
||||
* error (or higher), it *also* emits a simple "There was an error during this compilation"
|
||||
* error diagnostic, without location information.
|
||||
* In the common case, this means that a file with one (or more) errors also gets
|
||||
* In the common case, this means that a compilation during which one or more errors happened also gets
|
||||
* the catch-all diagnostic.
|
||||
* This diagnostic has the empty string as file path.
|
||||
* We filter out these useless diagnostics if there is at least one error-level diagnostic
|
||||
* for the affected compilation in the database.
|
||||
* Otherwise, we show it to, to indicate that something went wrong, and we
|
||||
* Otherwise, we show it to indicate that something went wrong and that we
|
||||
* don't know what exactly happened.
|
||||
*/
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* @name Failed extractions
|
||||
* @description List all files in the source code directory with extraction errors.
|
||||
* @kind diagnostic
|
||||
* @id cpp/diagnostics/failed-extractions
|
||||
*/
|
||||
|
||||
import cpp
|
||||
import FailedExtractions
|
||||
|
||||
from ExtractionError error
|
||||
where
|
||||
error instanceof ExtractionUnknownError or
|
||||
exists(error.getFile().getRelativePath())
|
||||
select error, "Extracting failed in " + error.getFile() + " with error " + error.getErrorMessage(),
|
||||
error.getSeverity()
|
||||
@@ -1,12 +1,12 @@
|
||||
/**
|
||||
* @name Successfully extracted files
|
||||
* @description Lists all files in the source code directory that were extracted without encountering an error.
|
||||
* @description Lists all files in the source code directory that were extracted without encountering an error in the file.
|
||||
* @kind diagnostic
|
||||
* @id cpp/diagnostics/successfully-extracted-files
|
||||
*/
|
||||
|
||||
import cpp
|
||||
import FailedExtractions
|
||||
import ExtractionErrors
|
||||
|
||||
from File f
|
||||
where
|
||||
Reference in New Issue
Block a user