Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: oss-review-toolkit/ort
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3a0497ba12fd28ae622ce9cd4a6f7f895c888bcb
Choose a base ref
..
head repository: oss-review-toolkit/ort
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bdb640141ed682062bbb8a3c2a2b16db00b4974c
Choose a head ref
Showing with 4 additions and 4 deletions.
  1. +4 −4 scanner/src/main/kotlin/Scanner.kt
8 changes: 4 additions & 4 deletions scanner/src/main/kotlin/Scanner.kt
Original file line number Diff line number Diff line change
@@ -225,11 +225,11 @@ class Scanner(
} else {
fileEntry.path
}
}.toSet().let { fileEntryFindings ->
(fileEntryFindings subtract licenseFiles).mapTo(mutableSetOf()) {
LicenseFinding(license = "NONE", location = TextLocation(fileEntryFindings, 1))
}.toSet().let { fileEntryLicenses ->
(fileEntryLicenses subtract licenseFiles).mapTo(mutableSetOf()) { newFinding ->
LicenseFinding(license = "NONE", location = TextLocation(newFinding, 1))
}.let {
val allFindings = scanResult.summary.licenseFindings union fileEntryFindings
val allFindings = scanResult.summary.licenseFindings union it
scanResult.summary.copy(licenseFindings = allFindings)
}
}