Skip to content

Commit

Permalink
Reformat with scalafmt 3.8.1
Browse files Browse the repository at this point in the history
Executed command: scalafmt --non-interactive
  • Loading branch information
scala-center-steward[bot] committed Apr 1, 2024
1 parent 2c0db86 commit 5e58221
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ case class NonStandardLib(
sealed trait BinaryVersionLookup

object BinaryVersionLookup {

/**
* The version is encoded in the pom file
* dependency on org.scala-lang:scala-library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ class ArtifactConverter(paths: DataPaths) extends LazyLogging {
*/
private def extractMeta(pom: ArtifactModel): Option[ArtifactMeta] = {
val nonStandardLookup =
nonStandardLibs.find(lib =>
lib.groupId == pom.groupId && lib.artifactId == pom.artifactId
)
nonStandardLibs
.find(lib => lib.groupId == pom.groupId && lib.artifactId == pom.artifactId)
.map(_.lookup)

val artifactMetaOption = nonStandardLookup match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SonatypeService(
result <- nonStandardLibs.mapSync { lib =>
val groupId = Artifact.GroupId(lib.groupId)
// get should not throw: it is a fixed set of artifactIds
val artifactId = Artifact.ArtifactId.parse(lib.artifactId).get
val artifactId = Artifact.ArtifactId.parse(lib.artifactId).get
findAndIndexMissingArtifacts(groupId, artifactId, mavenReferenceFromDatabase.toSet)
}
} yield s"Inserted ${result.sum} missing poms"
Expand All @@ -47,7 +47,11 @@ class SonatypeService(
result <- findAndIndexMissingArtifacts(groupId, artifactNameOpt, mavenReferenceFromDatabase.toSet)
} yield s"Inserted ${result} poms"

private def findAndIndexMissingArtifacts(groupId: GroupId, artifactNameOpt: Option[Artifact.Name], knownRefs: Set[MavenReference]): Future[Int] =
private def findAndIndexMissingArtifacts(
groupId: GroupId,
artifactNameOpt: Option[Artifact.Name],
knownRefs: Set[MavenReference]
): Future[Int] =
for {
artifactIds <- sonatypeService.getAllArtifactIds(groupId)
scalaArtifactIds = artifactIds.filter(artifact =>
Expand Down

0 comments on commit 5e58221

Please sign in to comment.