diff --git a/scanner/src/main/kotlin/ScanContext.kt b/scanner/src/main/kotlin/ScanContext.kt index 4f37dd963d857..4959282410718 100644 --- a/scanner/src/main/kotlin/ScanContext.kt +++ b/scanner/src/main/kotlin/ScanContext.kt @@ -25,6 +25,7 @@ import org.ossreviewtoolkit.model.Package import org.ossreviewtoolkit.model.PackageType import org.ossreviewtoolkit.model.config.Excludes import org.ossreviewtoolkit.model.config.ScannerConfiguration +import org.ossreviewtoolkit.model.config.SnippetChoices import org.ossreviewtoolkit.utils.spdx.SpdxExpression /** @@ -60,5 +61,10 @@ data class ScanContext( * The packages known to be covered in the context of this scan. For package scanners, this is the list of packages * that have the same provenance as the reference package. */ - val coveredPackages: List = emptyList() + val coveredPackages: List = emptyList(), + + /** + * The [SnippetChoices] of the project to scan. + */ + val snippetChoices: List = emptyList() ) diff --git a/scanner/src/main/kotlin/Scanner.kt b/scanner/src/main/kotlin/Scanner.kt index 594d1543a319f..0abb797769d60 100644 --- a/scanner/src/main/kotlin/Scanner.kt +++ b/scanner/src/main/kotlin/Scanner.kt @@ -115,7 +115,8 @@ class Scanner( ortResult.labels + labels, PackageType.PROJECT, ortResult.repository.config.excludes, - scannerConfig.detectedLicenseMapping + scannerConfig.detectedLicenseMapping, + snippetChoices = ortResult.repository.config.snippetChoices ) ) @@ -127,7 +128,8 @@ class Scanner( ortResult.labels, PackageType.PACKAGE, ortResult.repository.config.excludes, - scannerConfig.detectedLicenseMapping + scannerConfig.detectedLicenseMapping, + snippetChoices = ortResult.repository.config.snippetChoices ) )