Skip to content
Permalink
Browse files

Analyzer: Use a destructing declaration for clarity

As we are only using the map entry's value, we can use a destructing
declaration make the code shorter here.

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch-si.com>
  • Loading branch information...
sschuberth committed Sep 10, 2019
1 parent db810a9 commit 85c83cf86fe60ff7815c552b3ab39b897590a147
Showing with 4 additions and 4 deletions.
  1. +4 −4 analyzer/src/main/kotlin/Analyzer.kt
@@ -116,11 +116,11 @@ class Analyzer(private val config: AnalyzerConfiguration) {

val curatedResults = packageCurationsFile?.let {
val provider = FilePackageCurationProvider(it)
results.mapValues { entry ->
results.mapValues { (_, result) ->
ProjectAnalyzerResult(
project = entry.value.project,
errors = entry.value.errors,
packages = entry.value.packages.map { curatedPackage ->
project = result.project,
errors = result.errors,
packages = result.packages.map { curatedPackage ->
val curations = provider.getCurationsFor(curatedPackage.pkg.id)
curations.fold(curatedPackage) { cur, packageCuration ->
log.debug {

0 comments on commit 85c83cf

Please sign in to comment.
You can’t perform that action at this time.