Skip to content

Commit 19279a3

Browse files
committed
Rust: improve ExtractionConsistency.ql
1 parent 3aee78e commit 19279a3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

rust/ql/consistency-queries/ExtractionConsistency.ql

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
import codeql.rust.Diagnostics
99

10-
query predicate extractionError(ExtractionError ee) { any() }
10+
query predicate extractionError(ExtractionError ee) {
11+
not exists(ee.getLocation()) or ee.getLocation().fromSource()
12+
}
1113

12-
query predicate extractionWarning(ExtractionWarning ew) { any() }
14+
query predicate extractionWarning(ExtractionWarning ew) {
15+
not exists(ew.getLocation()) or ew.getLocation().fromSource()
16+
}

0 commit comments

Comments
 (0)