Skip to content

Commit fc3c776

Browse files
egregius313jcogs33
andauthored
Permit CodeQL's own tests
Removing `%/test/%` accidentally removed our own test cases. Co-authored-by: Jami <[email protected]>
1 parent 83d5cde commit fc3c776

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ private J::Method superImpl(J::Method m) {
2727
}
2828

2929
private predicate isInTestFile(J::File file) {
30-
file.getAbsolutePath().matches(["%/test/%", "%/guava-tests/%", "%/guava-testlib/%"])
30+
file.getAbsolutePath().matches(["%/test/%", "%/guava-tests/%", "%/guava-testlib/%"]) and
31+
not file.getAbsolutePath().matches("%/ql/test/%") // allows our test cases to work
3132
}
3233

3334
private predicate isJdkInternal(J::CompilationUnit cu) {

0 commit comments

Comments
 (0)