Skip to content

Commit

Permalink
feat(ScanController): Add getters for provenance resolution issues
Browse files Browse the repository at this point in the history
Prepare for using them in an upcoming change.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau committed Jun 2, 2023
1 parent 02346ec commit 89631ce
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scanner/src/main/kotlin/ScanController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ class ScanController(
private fun getMissingProvenanceScans(scanner: ScannerWrapper, nestedProvenance: NestedProvenance) =
nestedProvenance.getProvenances().filter { hasScanResult(scanner, it) }

/**
* Return the nested provenance resolution issues associated with the given [provenance].
*/
fun getNestedProvenanceResolutionIssue(provenance: KnownProvenance): Issue? =
nestedProvenanceResolutionIssues[provenance]

/**
* Get the [NestedProvenance] for the provided [id], or null if no nested provenance for the [id] is available.
*/
Expand Down Expand Up @@ -248,6 +254,11 @@ class ScanController(
fun getPackagesForProvenanceWithoutVcsPath(provenance: KnownProvenance): Set<Identifier> =
packageProvenancesWithoutVcsPath.filter { (_, packageProvenance) -> packageProvenance == provenance }.keys

/**
* Return the package provenanceResolutionIssue associated with the given [id].
*/
fun getPackageProvenanceResolutionIssue(id: Identifier): Issue? = packageProvenanceResolutionIssues[id]

/**
* Return all [KnownProvenance]s for the [packages] with the VCS path removed.
*/
Expand Down

0 comments on commit 89631ce

Please sign in to comment.