diff --git a/model/src/main/kotlin/OrtResult.kt b/model/src/main/kotlin/OrtResult.kt index 634585556bfce..e74cfa4898eef 100644 --- a/model/src/main/kotlin/OrtResult.kt +++ b/model/src/main/kotlin/OrtResult.kt @@ -567,6 +567,12 @@ data class OrtResult( isPackageExcluded(id) } + /** + * Return `true` if and only if the given [issue] is excluded in scope of the given [id]. + */ + fun isExcluded(issue: Issue, id: Identifier): Boolean = + isExcluded(id) || issue in excludedAffectedPathIssuesForId[id].orEmpty() + /** * Return `true` if all dependencies on the package or project identified by the given [id] are excluded. This is * the case if all [Project]s or [Scope]s that have a dependency on this [id] are excluded.