Skip to content

Commit 81f0e42

Browse files
aibaarshvitved
authored andcommitted
Rust: improve ExtractionConsistency.ql
1 parent 76da2e4 commit 81f0e42

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)