Skip to content

Commit ab1642d

Browse files
committed
JS: Rename {Shared,Impl} -> ApiGraphModels{,Specific}
1 parent 02c4966 commit ab1642d

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

javascript/ql/lib/semmle/javascript/frameworks/data/ModelsAsData.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
*/
2222

2323
private import javascript
24-
private import internal.Shared as Shared
24+
private import internal.ApiGraphModels as Shared
25+
private import internal.ApiGraphModelsSpecific as Specific
2526
import Shared::ModelInput as ModelInput
2627
import Shared::ModelOutput as ModelOutput
2728

javascript/ql/lib/semmle/javascript/frameworks/data/internal/Shared.qll renamed to javascript/ql/lib/semmle/javascript/frameworks/data/internal/ApiGraphModels.qll

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@
5656
* the type is related to the `foo` package but is not intended to match a static type.
5757
*/
5858

59-
private import Impl as Impl
59+
private import ApiGraphModelsSpecific as Specific
6060
import AccessPathSyntax
6161

62-
private class Unit = Impl::Unit;
62+
private class Unit = Specific::Unit;
6363

64-
private module API = Impl::API;
64+
private module API = Specific::API;
6565

6666
/** Module containing hooks for providing input data to be interpreted as a model. */
6767
module ModelInput {
@@ -230,7 +230,7 @@ string getAPackageAlias(string package) {
230230
* Holds if CSV rows involving `package` might be relevant for the analysis of this database.
231231
*/
232232
private predicate isRelevantPackage(string package) {
233-
Impl::isPackageUsed(package)
233+
Specific::isPackageUsed(package)
234234
or
235235
exists(string other |
236236
isRelevantPackage(other) and
@@ -282,7 +282,7 @@ private API::Node getSuccessorFromNode(API::Node node, AccessPathToken token) {
282282
result = node.getReturn()
283283
or
284284
// Language-specific tokens
285-
result = Impl::getExtraSuccessorFromNode(node, token)
285+
result = Specific::getExtraSuccessorFromNode(node, token)
286286
}
287287

288288
/**
@@ -303,7 +303,7 @@ private API::Node getSuccessorFromInvoke(API::InvokeNode invoke, AccessPathToken
303303
result = invoke.getReturn()
304304
or
305305
// Language-specific tokens
306-
result = Impl::getExtraSuccessorFromInvoke(invoke, token)
306+
result = Specific::getExtraSuccessorFromInvoke(invoke, token)
307307
}
308308

309309
/**
@@ -314,7 +314,7 @@ private predicate invocationMatchesCallSiteFilter(API::InvokeNode invoke, Access
314314
token.getName() = "WithArity" and
315315
invoke.getNumArgument() = getAnIntFromStringUnbounded(token.getAnArgument())
316316
or
317-
Impl::invocationMatchesExtraCallSiteFilter(invoke, token)
317+
Specific::invocationMatchesExtraCallSiteFilter(invoke, token)
318318
}
319319

320320
/**
@@ -335,7 +335,7 @@ API::Node getNodeFromPath(string package, string type, AccessPath path, int n) {
335335
)
336336
or
337337
// Language-specific cases, such as handling of global variables
338-
result = Impl::getExtraNodeFromPath(package, type, path, n)
338+
result = Specific::getExtraNodeFromPath(package, type, path, n)
339339
)
340340
or
341341
result = getSuccessorFromNode(getNodeFromPath(package, type, path, n - 1), path.getToken(n - 1))

javascript/ql/lib/semmle/javascript/frameworks/data/internal/Impl.qll renamed to javascript/ql/lib/semmle/javascript/frameworks/data/internal/ApiGraphModelsSpecific.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Contains the language-specific part of the models-as-data implementation found in `Shared.qll`.
2+
* Contains the language-specific part of the models-as-data implementation found in `ApiGraphModels.qll`.
33
*
44
* It must export the following members:
55
* ```codeql
@@ -15,7 +15,7 @@
1515

1616
private import javascript as js
1717
private import js::DataFlow as DataFlow
18-
private import Shared
18+
private import ApiGraphModels
1919

2020
class Unit = js::Unit;
2121

0 commit comments

Comments
 (0)