diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index cb62d1a..1460be9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,7 +11,7 @@ log4jApi = "2.23.1" log4jApiKotlin = "1.4.0" logbackImpl = "1.5.6" moleculeRuntime = "2.0.0" -ort = "26.0.0" +ort = "27.0.0" richtext = "0.20.0" [plugins] diff --git a/src/main/kotlin/model/OrtApi.kt b/src/main/kotlin/model/OrtApi.kt index 3782c2f..6041af7 100644 --- a/src/main/kotlin/model/OrtApi.kt +++ b/src/main/kotlin/model/OrtApi.kt @@ -69,7 +69,7 @@ class OrtApi( } } - fun getAdvisorIssues(): Map> = result.advisor?.results?.getIssues().orEmpty() + fun getAdvisorIssues(): Map> = result.advisor?.getIssues().orEmpty() fun getAdvisorIssueStats(): IssueStatistics = getAdvisorIssues().values.flatten().toIssueStatistics(config.severeIssueThreshold) @@ -83,11 +83,11 @@ class OrtApi( fun getAdvisorStats(): AdvisorStats = result.advisor?.let { advisorRun -> - val providers = advisorRun.results.advisorResults.values.flatten().map { it.advisor.name } + val providers = advisorRun.results.values.flatten().map { it.advisor.name } AdvisorStats( adviceProviderStats = providers.associateWith { provider -> - val resultsForProvider = advisorRun.results.advisorResults + val resultsForProvider = advisorRun.results .filter { (_, results) -> results.any { it.advisor.name == provider } } .mapValues { (_, results) -> results.single { it.advisor.name == provider } } @@ -164,7 +164,7 @@ class OrtApi( fun getResolvedIssues(): List = result.analyzer?.result?.getAllIssues().orEmpty().toIssues(Tool.ANALYZER, resolutionProvider) + - result.advisor?.results?.getIssues().orEmpty().toIssues(Tool.ADVISOR, resolutionProvider) + + result.advisor?.getIssues().orEmpty().toIssues(Tool.ADVISOR, resolutionProvider) + result.scanner?.getAllIssues().orEmpty().toIssues(Tool.SCANNER, resolutionProvider) fun getResolvedLicense(id: Identifier): ResolvedLicenseInfo = licenseInfoResolver.resolveLicenseInfo(id)