mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01: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.
|
* Gets information about the external API in the form expected by the CSV modeling framework.
|
||||||
*/
|
*/
|
||||||
string asCsv(ExternalAPI api) {
|
string asHumanReadbleString(ExternalAPI api) {
|
||||||
result =
|
result =
|
||||||
api.getDeclaringType().getPackage() + ";?;" + api.getDeclaringType().getSourceDeclaration() +
|
api.getDeclaringType().getPackage() + "." + api.getDeclaringType().getSourceDeclaration() +
|
||||||
";" + api.getName() + ";" + paramsString(api)
|
"#" + api.getName() + paramsString(api)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Holds if this API is not yet supported by existing CodeQL libraries */
|
/** Holds if this API is not yet supported by existing CodeQL libraries */
|
||||||
|
|||||||
@@ -20,4 +20,4 @@ where
|
|||||||
c.getCallee().getSourceDeclaration() = api and
|
c.getCallee().getSourceDeclaration() = api and
|
||||||
not c.getFile() instanceof GeneratedFile
|
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
|
c.getCallee().getSourceDeclaration() = api and
|
||||||
not c.getFile() instanceof GeneratedFile
|
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
|
c.getCallee().getSourceDeclaration() = api and
|
||||||
not c.getFile() instanceof GeneratedFile
|
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
|
c.getCallee().getSourceDeclaration() = api and
|
||||||
not c.getFile() instanceof GeneratedFile
|
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.io.FileWriter#FileWriter(File) | 1 |
|
||||||
| java.net;?;URL;openStream;() | 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#append(String) | 1 |
|
||||||
| java.lang;?;StringBuilder;toString;() | 1 |
|
| java.lang.StringBuilder#toString() | 1 |
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
| java.io;?;PrintStream;println;(Object) | 3 |
|
| java.io.PrintStream#println(Object) | 3 |
|
||||||
| java.lang;?;Object;Object;() | 2 |
|
| java.lang.Object#Object() | 2 |
|
||||||
| java.lang;?;String;length;() | 1 |
|
| java.lang.String#length() | 1 |
|
||||||
| java.time;?;Duration;ofMillis;(long) | 1 |
|
| java.time.Duration#ofMillis(long) | 1 |
|
||||||
|
|||||||
Reference in New Issue
Block a user