Skip to content

Commit 89ce04d

Browse files
author
Benjamin Muskalla
committed
Pull usage count into where clause
1 parent 2edb32f commit 89ce04d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

java/ql/src/Telemetry/SupportedExternalSources.ql

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ import APIUsage
1111
import ExternalAPI
1212
import semmle.code.java.GeneratedFiles
1313

14-
from ExternalAPI api
14+
from ExternalAPI api, int usages
1515
where
1616
not api.isTestLibrary() and
17-
supportKind(api) = "source"
18-
select api.asCsv(api) as csv,
19-
strictcount(Call c |
20-
c.getCallee() = api and
21-
not c.getFile() instanceof GeneratedFile
22-
) as Usages order by Usages desc
17+
supportKind(api) = "source" and
18+
usages =
19+
strictcount(Call c |
20+
c.getCallee() = api and
21+
not c.getFile() instanceof GeneratedFile
22+
)
23+
select api.asCsv(api) as csv, usages order by usages desc

0 commit comments

Comments
 (0)