@@ -219,8 +219,8 @@ class FossId internal constructor(
219
219
220
220
// A list of all scans created in an ORT run, to be able to delete them in case of error.
221
221
// The reasoning is that either all these scans are successful, either none is created at all (clean slate).
222
- // A use case is that an ORT run is created regularly e.g. nightly, and we want to have exactly the same amount
223
- // of scans for each package .
222
+ // A use case is that an ORT run is created regularly, e.g. nightly, and exactly the same amount of scans for each
223
+ // package is wanted .
224
224
private val createdScans = mutableSetOf<String >()
225
225
226
226
private val service = runBlocking { FossIdRestService .create(config.serverUrl) }
@@ -433,8 +433,8 @@ class FossId internal constructor(
433
433
): List <Scan > {
434
434
val scans = filter {
435
435
val isArchived = it.isArchived == true
436
- // The scans in the server contain the url with the credentials, so we have to remove it for the
437
- // comparison. If we don't, the scans won't be matched if the password changes!
436
+ // The scans in the server contain the URL with credentials, so these have to be removed for the comparison.
437
+ // Otherwise scans would not be matched if the password changed.
438
438
val urlWithoutCredentials = it.gitRepoUrl?.replaceCredentialsInUri()
439
439
! isArchived && urlWithoutCredentials == url
440
440
}.sortedByDescending { it.id }
@@ -530,7 +530,7 @@ class FossId internal constructor(
530
530
val mappedUrl = urlProvider.getUrl(urlWithoutCredentials)
531
531
val mappedUrlWithoutCredentials = mappedUrl.replaceCredentialsInUri()
532
532
533
- // we ignore the revision because we want to do a delta scan
533
+ // Ignore the revision for delta scans.
534
534
val recentScans = scans.recentScansForRepository(
535
535
mappedUrlWithoutCredentials,
536
536
projectRevision = projectRevision,
@@ -755,9 +755,9 @@ class FossId internal constructor(
755
755
DownloadStatus .FAILED -> error(" Could not download scan: ${response.message} ." )
756
756
757
757
else -> {
758
- // There is a bug with the FossID server version < 20.2: Sometimes the download is complete, but it
759
- // stays in state "NOT FINISHED". Therefore, we check the output of the Git fetch to find out
760
- // whether the download is actually done .
758
+ // There is a bug in FossID server version < 20.2: Sometimes the download is complete, but it stays
759
+ // in "NOT FINISHED" state . Therefore, check the output of the Git fetch command to find out whether
760
+ // the download has actually finished .
761
761
val message = response.message
762
762
val currentVersion = checkNotNull(Semver .coerce(version))
763
763
val minVersion = checkNotNull(Semver .coerce(" 20.2" ))
0 commit comments