mirror of
https://github.com/github/codeql.git
synced 2026-05-25 00:27:09 +02:00
msft extractor queries
This commit is contained in:
29
java/ql/src/Diagnostics/ExtractionErrorMsft.ql
Normal file
29
java/ql/src/Diagnostics/ExtractionErrorMsft.ql
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @name Extraction errors msft
|
||||
* @description A list of extraction errors for files in the source code directory.
|
||||
* @kind diagnostic
|
||||
* @id java/diagnostics/extraction-errors-msft
|
||||
*/
|
||||
|
||||
import java
|
||||
import DiagnosticsReporting
|
||||
|
||||
private predicate knownErrorsMsft(Diagnostic d, File f, string msg) {
|
||||
d.getSeverity() = [6, 7, 8] and
|
||||
f = d.getLocation().getFile()
|
||||
msg = d.getMessage()
|
||||
}
|
||||
|
||||
private predicate unknownErrorsMsft(Diagnostic d, File f, string msg) {
|
||||
not knownErrors(d, _, _) and
|
||||
d.getSeverity() > 3 and
|
||||
d.getLocation().getFile() = f and
|
||||
exists(f.getRelativePath()) and
|
||||
msg = "Unknown error"
|
||||
}
|
||||
|
||||
from Diagnostic d, File f, string msg
|
||||
where
|
||||
knownErrorsMsft(Diagnostic d, File f, string msg) or
|
||||
unknownErrorsMsft(Diagnostic d, File f, string msg)
|
||||
select f, msg
|
||||
Reference in New Issue
Block a user