Skip to content

Commit d628dc0

Browse files
committed
Ruby: sync ApiGraphModels.qll
1 parent 8275063 commit d628dc0

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

ruby/ql/lib/codeql/ruby/frameworks/data/internal/ApiGraphModels.qll

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ module ModelInput {
149149

150150
private import ModelInput
151151

152+
/**
153+
* An empty class, except in specific tests.
154+
*
155+
* If this is non-empty, all models are parsed even if the package is not
156+
* considered relevant for the current database.
157+
*/
158+
abstract class TestAllModels extends Unit { }
159+
152160
/**
153161
* Append `;dummy` to the value of `s` to work around the fact that `string.split(delim,n)`
154162
* does not preserve empty trailing substrings.
@@ -237,7 +245,11 @@ private predicate isRelevantPackage(string package) {
237245
summaryModel(package, _, _, _, _, _) or
238246
typeModel(package, _, _, _, _)
239247
) and
240-
Specific::isPackageUsed(package)
248+
(
249+
Specific::isPackageUsed(package)
250+
or
251+
exists(TestAllModels t)
252+
)
241253
or
242254
exists(string other |
243255
isRelevantPackage(other) and

0 commit comments

Comments
 (0)