Skip to content

Commit

Permalink
docs(model): Explain why the ConfigurationResolver filters curations
Browse files Browse the repository at this point in the history
This relates to the check introduced in cf7c145.

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Mar 28, 2024
1 parent 5cca282 commit e4af83c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions model/src/main/kotlin/utils/ConfigurationResolver.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ object ConfigurationResolver {
curationProvider.getCurationsFor(packages)
}

// While every provider is supposed to only return applicable curations, filter to be on the safe side and
// only embed applicable curations in the ORT result.
val (applicableCurations, nonApplicableCurations) = curations.partition { curation ->
packages.any { pkg -> curation.isApplicable(pkg.id) }
}
Expand Down

0 comments on commit e4af83c

Please sign in to comment.