mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01:00
23 lines
542 B
Plaintext
23 lines
542 B
Plaintext
/**
|
|
* @name External libraries
|
|
* @description A list of external libraries used in the code
|
|
* @kind metric
|
|
* @metricType callable
|
|
* @id java/telemetry/external-libs
|
|
*/
|
|
|
|
import java
|
|
import ExternalAPI
|
|
|
|
from int Usages, string jarname
|
|
where
|
|
jarname = any(ExternalAPI api).jarContainer() and
|
|
Usages =
|
|
strictcount(Call c, ExternalAPI a |
|
|
c.getCallee() = a and
|
|
not c.getFile() instanceof GeneratedFile and
|
|
a.jarContainer() = jarname and
|
|
not a.isTestLibrary()
|
|
)
|
|
select jarname, Usages order by Usages desc
|