Skip to content

Commit 260d85d

Browse files
committed
feat(scancode): Add the file-level SPDX license expression to the interface
This will allow for some simplifications. Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent dbe12c9 commit 260d85d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugins/scanners/scancode/src/main/kotlin/model/FileEntry.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import org.ossreviewtoolkit.utils.spdx.toSpdxId
4242
sealed interface FileEntry {
4343
val path: String
4444
val type: String
45+
val detectedLicenseExpressionSpdx: String?
4546
val licenses: List<LicenseEntry>
4647
val copyrights: List<CopyrightEntry>
4748
val scanErrors: List<String>
@@ -70,6 +71,8 @@ sealed interface FileEntry {
7071
}
7172
}
7273

74+
override val detectedLicenseExpressionSpdx = null
75+
7376
override val scanCodeKeyToSpdxIdMappings by lazy {
7477
licenses.map { license ->
7578
license.key to getSpdxId(license.spdxLicenseKey, license.key)
@@ -82,7 +85,7 @@ sealed interface FileEntry {
8285
override val path: String,
8386
override val type: String,
8487
val detectedLicenseExpression: String? = null, // This might be explicitly set to null in JSON.
85-
val detectedLicenseExpressionSpdx: String? = null, // This might be explicitly set to null in JSON.
88+
override val detectedLicenseExpressionSpdx: String? = null, // This might be explicitly set to null in JSON.
8689
val licenseDetections: List<LicenseDetection>,
8790
override val copyrights: List<CopyrightEntry>,
8891
override val scanErrors: List<String>

0 commit comments

Comments
 (0)