diff --git a/model/src/main/kotlin/OrtResult.kt b/model/src/main/kotlin/OrtResult.kt index 4abeb5d97d1e3..2d6d2dfa24f8a 100644 --- a/model/src/main/kotlin/OrtResult.kt +++ b/model/src/main/kotlin/OrtResult.kt @@ -249,7 +249,7 @@ data class OrtResult( @JsonIgnore fun getIssues(): Map> { val analyzerIssues = analyzer?.result?.getAllIssues().orEmpty() - val scannerIssues = scanner?.getIssues().orEmpty() + val scannerIssues = scanner?.getAllIssues().orEmpty() val advisorIssues = advisor?.results?.getIssues().orEmpty() val analyzerAndScannerIssues = analyzerIssues.zipWithCollections(scannerIssues) diff --git a/model/src/main/kotlin/ScannerRun.kt b/model/src/main/kotlin/ScannerRun.kt index 1026764c0457c..17236c0d37724 100644 --- a/model/src/main/kotlin/ScannerRun.kt +++ b/model/src/main/kotlin/ScannerRun.kt @@ -257,7 +257,7 @@ data class ScannerRun( fun getFileList(id: Identifier): FileList? = fileListById[id] @JsonIgnore - fun getIssues(): Map> = + fun getAllIssues(): Map> = scanResultsById.mapValues { (_, scanResults) -> scanResults.flatMapTo(mutableSetOf()) { it.summary.issues } } diff --git a/plugins/commands/scanner/src/main/kotlin/ScannerCommand.kt b/plugins/commands/scanner/src/main/kotlin/ScannerCommand.kt index 6d08d573f2a26..9f9607db49514 100644 --- a/plugins/commands/scanner/src/main/kotlin/ScannerCommand.kt +++ b/plugins/commands/scanner/src/main/kotlin/ScannerCommand.kt @@ -153,7 +153,7 @@ class ScannerCommand : OrtCommand( echo("The scan took $duration.") val resolutionProvider = DefaultResolutionProvider.create(ortResult, resolutionsFile) - val issues = scannerRun.getIssues().flatMap { it.value } + val issues = scannerRun.getAllIssues().flatMap { it.value } SeverityStatsPrinter(terminal, resolutionProvider).stats(issues) .print().conclude(ortConfig.severeIssueThreshold, ORT_FAILURE_STATUS_CODE) }