Skip to content

Commit

Permalink
refactor(OrtResultExtension): Use `KnownProvenance.matches(KnownProve…
Browse files Browse the repository at this point in the history
…nance)`

Signed-off-by: Jens Keim <[email protected]>
  • Loading branch information
pepper-jk committed Jun 26, 2024
1 parent f1af9b5 commit 5ebfb63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/src/main/kotlin/utils/OrtResultExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fun OrtResult.createLicenseInfoResolver(
*/
fun OrtResult.getRepositoryPath(provenance: RepositoryProvenance): String {
repository.nestedRepositories.forEach { (path, nestedProvenance) ->

Check warning on line 88 in model/src/main/kotlin/utils/OrtResultExtensions.kt

View check run for this annotation

Codecov / codecov/patch

model/src/main/kotlin/utils/OrtResultExtensions.kt#L88

Added line #L88 was not covered by tests
if (nestedProvenance is RepositoryProvenance && nestedProvenance == provenance) {
if (nestedProvenance.matches(provenance)) {
return "/$path/"
}
}
Expand Down

0 comments on commit 5ebfb63

Please sign in to comment.