Pull usage count into where clause

This commit is contained in:
Benjamin Muskalla
2021-09-03 11:25:59 +02:00
parent 2edb32f344
commit 89ce04dcb9

View File

@@ -11,12 +11,13 @@ import APIUsage
import ExternalAPI
import semmle.code.java.GeneratedFiles
from ExternalAPI api
from ExternalAPI api, int usages
where
not api.isTestLibrary() and
supportKind(api) = "source"
select api.asCsv(api) as csv,
strictcount(Call c |
c.getCallee() = api and
not c.getFile() instanceof GeneratedFile
) as Usages order by Usages desc
supportKind(api) = "source" and
usages =
strictcount(Call c |
c.getCallee() = api and
not c.getFile() instanceof GeneratedFile
)
select api.asCsv(api) as csv, usages order by usages desc