msft extractor queries

This commit is contained in:
Dilan Bhalla
2024-11-22 14:11:02 -08:00
parent 54d9eda50a
commit e3a04757d7
9 changed files with 155 additions and 0 deletions

View 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