mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
Use readble format for APIs
This commit is contained in:
@@ -16,10 +16,10 @@ class ExternalAPI extends Callable {
|
||||
/**
|
||||
* Gets information about the external API in the form expected by the CSV modeling framework.
|
||||
*/
|
||||
string asCsv(ExternalAPI api) {
|
||||
string asHumanReadbleString(ExternalAPI api) {
|
||||
result =
|
||||
api.getDeclaringType().getPackage() + ";?;" + api.getDeclaringType().getSourceDeclaration() +
|
||||
";" + api.getName() + ";" + paramsString(api)
|
||||
api.getDeclaringType().getPackage() + "." + api.getDeclaringType().getSourceDeclaration() +
|
||||
"#" + api.getName() + paramsString(api)
|
||||
}
|
||||
|
||||
/** Holds if this API is not yet supported by existing CodeQL libraries */
|
||||
|
||||
@@ -20,4 +20,4 @@ where
|
||||
c.getCallee().getSourceDeclaration() = api and
|
||||
not c.getFile() instanceof GeneratedFile
|
||||
)
|
||||
select api.asCsv(api) as csv, usages order by usages desc
|
||||
select api.asHumanReadbleString(api) as apiname, usages order by usages desc
|
||||
|
||||
@@ -20,4 +20,4 @@ where
|
||||
c.getCallee().getSourceDeclaration() = api and
|
||||
not c.getFile() instanceof GeneratedFile
|
||||
)
|
||||
select api.asCsv(api) as csv, usages order by usages desc
|
||||
select api.asHumanReadbleString(api) as apiname, usages order by usages desc
|
||||
|
||||
@@ -20,4 +20,4 @@ where
|
||||
c.getCallee().getSourceDeclaration() = api and
|
||||
not c.getFile() instanceof GeneratedFile
|
||||
)
|
||||
select api.asCsv(api) as csv, usages order by usages desc
|
||||
select api.asHumanReadbleString(api) as apiname, usages order by usages desc
|
||||
|
||||
@@ -20,4 +20,4 @@ where
|
||||
c.getCallee().getSourceDeclaration() = api and
|
||||
not c.getFile() instanceof GeneratedFile
|
||||
)
|
||||
select api.asCsv(api) as csv, usages order by usages desc
|
||||
select api.asHumanReadbleString(api) as apiname, usages order by usages desc
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
| java.io;?;FileWriter;FileWriter;(File) | 1 |
|
||||
| java.net;?;URL;openStream;() | 1 |
|
||||
| java.io.FileWriter#FileWriter(File) | 1 |
|
||||
| java.net.URL#openStream() | 1 |
|
||||
|
||||
@@ -1 +1 @@
|
||||
| java.net;?;URLConnection;getInputStream;() | 1 |
|
||||
| java.net.URLConnection#getInputStream() | 1 |
|
||||
@@ -1,2 +1,2 @@
|
||||
| java.lang;?;StringBuilder;append;(String) | 1 |
|
||||
| java.lang;?;StringBuilder;toString;() | 1 |
|
||||
| java.lang.StringBuilder#append(String) | 1 |
|
||||
| java.lang.StringBuilder#toString() | 1 |
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
| java.io;?;PrintStream;println;(Object) | 3 |
|
||||
| java.lang;?;Object;Object;() | 2 |
|
||||
| java.lang;?;String;length;() | 1 |
|
||||
| java.time;?;Duration;ofMillis;(long) | 1 |
|
||||
| java.io.PrintStream#println(Object) | 3 |
|
||||
| java.lang.Object#Object() | 2 |
|
||||
| java.lang.String#length() | 1 |
|
||||
| java.time.Duration#ofMillis(long) | 1 |
|
||||
|
||||
Reference in New Issue
Block a user