Skip to content

Commit b51379b

Browse files
committed
Ruby: Only model relevant files for type models
1 parent 4b5a203 commit b51379b

File tree

1 file changed

+5
-1
lines changed
  • ruby/ql/src/queries/modeling/internal

1 file changed

+5
-1
lines changed

ruby/ql/src/queries/modeling/internal/Types.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ module Types {
4848
// class Type2 < Type1
4949
// class Type2; include Type1
5050
exists(Module m1, Module m2 |
51-
m2.getAnImmediateAncestor() = m1 and not m2.isBuiltin() and not m1.isBuiltin()
51+
m2.getAnImmediateAncestor() = m1 and
52+
not m2.isBuiltin() and
53+
not m1.isBuiltin() and
54+
m1.getLocation().getFile() instanceof Util::RelevantFile and
55+
m2.getLocation().getFile() instanceof Util::RelevantFile
5256
|
5357
m1.getQualifiedName() = type1 and m2.getQualifiedName() = type2 and path = ""
5458
)

0 commit comments

Comments
 (0)