File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * @name Usage of supported APIs coming from external libraries
3
+ * @description A list of supported 3rd party APIs used in the codebase. Excludes test and generated code.
4
+ * @kind metric
5
+ * @tags summary telemetry
6
+ * @id java/telemetry/supported-external-api
7
+ */
8
+
9
+ import java
10
+ import semmle.code.java.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl
11
+ import semmle.code.java.dataflow.internal.NegativeSummary
12
+ import ExternalApi
13
+
14
+ private predicate relevant ( ExternalApi api ) {
15
+ not api .isUninteresting ( ) and
16
+ (
17
+ api .isSupported ( ) or
18
+ api = any ( FlowSummaryImpl:: Public:: NegativeSummarizedCallable nsc ) .asCallable ( )
19
+ )
20
+ }
21
+
22
+ from string apiName , int usages
23
+ where Results< relevant / 1 > :: restrict ( apiName , usages )
24
+ select apiName , usages order by usages desc
You can’t perform that action at this time.
0 commit comments