Skip to content

Commit

Permalink
refactor(ScanSummary): Inline two variables
Browse files Browse the repository at this point in the history
Make the code consistent with the function below.

Signed-off-by: Frank Viernau <[email protected]>
  • Loading branch information
fviernau committed May 16, 2023
1 parent 26ae811 commit e957db5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions model/src/main/kotlin/ScanSummary.kt
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,9 @@ data class ScanSummary(

fun TextLocation.matchesPath() = this.path.startsWith("$path/") || this.path in applicableLicenseFiles

val licenseFindings = licenseFindings.filterTo(mutableSetOf()) { it.location.matchesPath() }
val copyrightFindings = copyrightFindings.filterTo(mutableSetOf()) { it.location.matchesPath() }

return copy(
licenseFindings = licenseFindings,
copyrightFindings = copyrightFindings
licenseFindings = licenseFindings.filterTo(mutableSetOf()) { it.location.matchesPath() },
copyrightFindings = copyrightFindings.filterTo(mutableSetOf()) { it.location.matchesPath() }
)
}

Expand Down

0 comments on commit e957db5

Please sign in to comment.