diff --git a/plugins/reporters/trustsource/src/main/kotlin/TrustSourceReporter.kt b/plugins/reporters/trustsource/src/main/kotlin/TrustSourceReporter.kt index c4c11364ad92e..f21c3777ef8aa 100644 --- a/plugins/reporters/trustsource/src/main/kotlin/TrustSourceReporter.kt +++ b/plugins/reporters/trustsource/src/main/kotlin/TrustSourceReporter.kt @@ -43,16 +43,12 @@ class TrustSourceReporter : Reporter { val nav = input.ortResult.dependencyNavigator val scans = input.ortResult.getProjects().map { project -> - val deps = nav.scopeNames(project) - .flatMap { traverseDeps(input, nav.directDependencies(project, it)) } - - NewScan( - module = project.id.name, - dependencies = deps - ) + val deps = nav.scopeNames(project).flatMap { traverseDeps(input, nav.directDependencies(project, it)) } + NewScan(module = project.id.name, dependencies = deps) } outputFile.outputStream().use { JSON.encodeToStream(scans, it) } + return listOf(outputFile) } } @@ -71,7 +67,6 @@ private fun traverseDeps(input: ReporterInput, deps: Sequence): val licenses = effectiveLicense?.decompose()?.map { val name = it.toString() val url = it.getLicenseUrl().orEmpty() - License(name, url) } @@ -91,7 +86,6 @@ private fun traverseDeps(input: ReporterInput, deps: Sequence): homepageUrl = pkg?.metadata?.homepageUrl.orEmpty(), description = pkg?.metadata?.description.orEmpty(), checksum = checksum.orEmpty(), - dependencies = dep.visitDependencies { traverseDeps(input, it) }, licenses = licenses.orEmpty(), pkg = depPkg