mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +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.
|
||||
*/
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user