@@ -102,7 +102,9 @@ private string getACallBasedTokenFeatureComponent(
102
102
//
103
103
// would have a callee API name of `mongoose`.
104
104
featureName = "calleeApiName" and
105
- exists ( API:: Node apiNode | AccessPaths:: accessPaths ( apiNode , false , _, result ) and call = apiNode .getInducingNode ( ) )
105
+ exists ( API:: Node apiNode |
106
+ AccessPaths:: accessPaths ( apiNode , false , _, result ) and call = apiNode .getInducingNode ( )
107
+ )
106
108
)
107
109
}
108
110
@@ -190,12 +192,15 @@ private module AccessPaths {
190
192
}
191
193
192
194
/** Get the access path for the node. This includes structural information like `member`, `param`, and `functionalarg` if `includeStructuralInfo` is true. */
193
- predicate accessPaths ( API:: Node node , Boolean includeStructuralInfo , string accessPath , string apiName ) {
195
+ predicate accessPaths (
196
+ API:: Node node , Boolean includeStructuralInfo , string accessPath , string apiName
197
+ ) {
194
198
//node = API::moduleImport(result)
195
199
node = API:: moduleImport ( apiName ) and accessPath = apiName
196
200
or
197
201
exists ( API:: Node previousNode , string previousAccessPath |
198
- previousNode .getDepth ( ) < node .getDepth ( ) and accessPaths ( previousNode , includeStructuralInfo , previousAccessPath , apiName )
202
+ previousNode .getDepth ( ) < node .getDepth ( ) and
203
+ accessPaths ( previousNode , includeStructuralInfo , previousAccessPath , apiName )
199
204
|
200
205
// e.g. `new X`, `X()`
201
206
node = [ previousNode .getInstance ( ) , previousNode .getReturn ( ) ] and
@@ -222,7 +227,9 @@ private module AccessPaths {
222
227
node = previousNode .getUnknownMember ( ) or
223
228
node = previousNode .getMember ( any ( string s | isNumericString ( s ) ) )
224
229
) and
225
- if includeStructuralInfo = true then accessPath = previousAccessPath + " member" else accessPath = previousAccessPath
230
+ if includeStructuralInfo = true
231
+ then accessPath = previousAccessPath + " member"
232
+ else accessPath = previousAccessPath
226
233
or
227
234
// e.g. `x.then(y => ...)`
228
235
node = previousNode .getPromised ( ) and
@@ -247,8 +254,9 @@ private module AccessPaths {
247
254
index != "-1" and // ignore receiver
248
255
if includeStructuralInfo = true
249
256
then
250
- accessPath =
251
- previousAccessPath + " functionalarg " + index + " " + callbackName + " param " + paramName
257
+ accessPath =
258
+ previousAccessPath + " functionalarg " + index + " " + callbackName + " param " +
259
+ paramName
252
260
else accessPath = previousAccessPath + " " + index + " " + callbackName + " " + paramName
253
261
)
254
262
)
0 commit comments