Use readble format for APIs

This commit is contained in:
Benjamin Muskalla
2021-09-03 11:53:18 +02:00
parent 4b02e266fd
commit 9ed14b438e
9 changed files with 16 additions and 16 deletions

View File

@@ -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 */

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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