Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class GradleProjectWrapper(
val sarifReportFile: File by lazy {
Paths.get(
generatedSarifDirectory.path,
"${project.name}-utbot.sarif"
"${project.name}Report.sarif"
).toFile().apply {
createNewFileWithParentDirectories()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ class SourceSetWrapper(

/**
* Creates and returns a file for a future SARIF report.
* For example, ".../main/com/qwerty/Main-utbot.sarif".
* For example, ".../main/com/qwerty/MainReport.sarif".
*/
private fun createSarifReportFile(classFqn: String): File {
val relativePath = "${sourceSet.name}/${classFqnToPath(classFqn)}-utbot.sarif"
val relativePath = "${sourceSet.name}/${classFqnToPath(classFqn)}Report.sarif"
val absolutePath = Paths.get(parentProject.generatedSarifDirectory.path, relativePath)
return absolutePath.toFile().apply { createNewFileWithParentDirectories() }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ object TestGenerator {
.toList()

val mergedReport = SarifReport.mergeReports(sarifReports)
val mergedReportPath = sarifReportsPath.resolve("${model.project.name}-utbot-merged.sarif")
val mergedReportPath = sarifReportsPath.resolve("${model.project.name}Report.sarif")
mergedReportPath.toFile().writeText(mergedReport)

// notifying the user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object SarifReportIdea {
// building the path to the report file
val classFqn = testCases.firstOrNull()?.method?.clazz?.qualifiedName ?: return
val sarifReportsPath = model.testModule.getOrCreateSarifReportsPath(model.testSourceRoot)
val reportFilePath = sarifReportsPath.resolve("${classFqnToPath(classFqn)}-utbot.sarif")
val reportFilePath = sarifReportsPath.resolve("${classFqnToPath(classFqn)}Report.sarif")

// creating report related directory
VfsUtil.createDirectoryIfMissing(reportFilePath.parent.toString())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ fun Module.getOrCreateTestResourcesPath(testSourceRoot: VirtualFile?): Path {
*/
fun Module.getOrCreateSarifReportsPath(testSourceRoot: VirtualFile?): Path {
val testResourcesPath = this.getOrCreateTestResourcesPath(testSourceRoot)
return "$testResourcesPath/sarif/".toPath()
return "$testResourcesPath/utbot-sarif-report/".toPath()
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class MavenProjectWrapper(
val sarifReportFile: File by lazy {
Paths.get(
generatedSarifDirectory.path,
"${mavenProject.name}-utbot.sarif"
"${mavenProject.name}Report.sarif"
).toFile().apply {
createNewFileWithParentDirectories()
}
Expand Down Expand Up @@ -131,10 +131,10 @@ class MavenProjectWrapper(

/**
* Creates and returns a file for a future SARIF report.
* For example, ".../main/com/qwerty/Main-utbot.sarif".
* For example, ".../main/com/qwerty/MainReport.sarif".
*/
private fun createSarifReportFile(classFqn: String): File {
val relativePath = "${PathUtil.classFqnToPath(classFqn)}-utbot.sarif"
val relativePath = "${PathUtil.classFqnToPath(classFqn)}Report.sarif"
val absolutePath = Paths.get(generatedSarifDirectory.path, relativePath)
return absolutePath.toFile().apply { createNewFileWithParentDirectories() }
}
Expand Down