Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Change profile name
  • Loading branch information
mmvpm committed Oct 19, 2022
commit 357035ea7303f68c1724bebbb0432e662a5b2425
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ object CodeGenerationController {
UtTestsDialogProcessor.updateIndicator(indicator, UtTestsDialogProcessor.ProgressRange.SARIF, "Start tests with coverage", 0.95)
RunConfigurationHelper.runTestsWithCoverage(model, testFilesPointers)
}
runInspectionsIfNeeded(model.project, srcClassPathToSarifReport) // TODO
proc.forceTermination()
UtTestsDialogProcessor.updateIndicator(indicator, UtTestsDialogProcessor.ProgressRange.SARIF, "Start tests with coverage", 1.0)
runInspectionsIfNeeded(model.project, srcClassPathToSarifReport)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class UnitTestBotInspectionContext(
*/
override fun getCurrentProfile(): InspectionProfileImpl {
val supplier = InspectionToolsSupplier.Simple(listOf(globalInspectionToolWrapper))
return InspectionProfileImpl("UnitTestBotProfile", supplier, BASE_PROFILE)
return InspectionProfileImpl("UnitTestBot", supplier, BASE_PROFILE)
}

override fun close(noSuspiciousCodeFound: Boolean) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,18 @@ object SarifReportIdea {
}
val reportFilePath = sarifReportsPath.resolve("${classFqnToPath(classFqn)}Report.sarif")

var resultSarifReport = Sarif.empty()
IntelliJApiHelper.run(IntelliJApiHelper.Target.THREAD_POOL, indicator) {
try {
val sarifReportAsJson = proc.writeSarif(reportFilePath, testSetsId, generatedTestsCode, sourceFinding)
return Sarif.fromJson(sarifReportAsJson)
resultSarifReport = Sarif.fromJson(sarifReportAsJson)
} catch (e: Exception) {
logger.error { e }
} finally {
reportsCountDown.countDown()
}
}
return resultSarifReport
}
}