Rust: improve ExtractionConsistency.ql

This commit is contained in:
Arthur Baars
2025-05-20 17:21:21 +02:00
committed by Tom Hvitved
parent 76da2e41f7
commit 81f0e4202a

View File

@@ -7,6 +7,10 @@
import codeql.rust.Diagnostics
query predicate extractionError(ExtractionError ee) { any() }
query predicate extractionError(ExtractionError ee) {
not exists(ee.getLocation()) or ee.getLocation().fromSource()
}
query predicate extractionWarning(ExtractionWarning ew) { any() }
query predicate extractionWarning(ExtractionWarning ew) {
not exists(ew.getLocation()) or ew.getLocation().fromSource()
}