Skip to content

Commit 76f8d46

Browse files
authored
Merge pull request github#12851 from egregius313/egregius313/mad/add-groovy-stubs-to-isInTestFile
Java: Add `*/test/*` to model generator's list of ignored paths
2 parents 0043682 + fc3c776 commit 76f8d46

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

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

2929
private predicate isInTestFile(J::File file) {
30-
file.getAbsolutePath().matches("%src/test/%") or
31-
file.getAbsolutePath().matches("%/guava-tests/%") or
32-
file.getAbsolutePath().matches("%/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
3332
}
3433

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

0 commit comments

Comments
 (0)