Integrate SARIF report with Github code scanning (#3359)

* Integrate SARIF report with Github Actions

* Simplify workflow setup

* Set OriginalUriBaseIds in output report
This commit is contained in:
Chao Zhang
2021-01-11 13:03:29 -08:00
committed by GitHub
parent f39eb767d6
commit c87a0acc15
9 changed files with 89 additions and 20 deletions

View File

@@ -35,7 +35,7 @@ open class KtCompiler(
return psiFile.apply {
putUserData(LINE_SEPARATOR, lineSeparator)
val normalizedBasePath = basePath?.normalize()
val normalizedBasePath = basePath?.toAbsolutePath()?.normalize()
normalizedBasePath?.relativize(normalizedAbsolutePath)?.let { relativePath ->
putUserData(BASE_PATH, normalizedBasePath.toAbsolutePath().toString())
putUserData(RELATIVE_PATH, relativePath.toString())