diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 000000000..0ac81065b --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# Scala Steward: Reformat with scalafmt 3.8.1 +5e582217ef0137a17afedde0fa7bd9236932ecad diff --git a/.scalafmt.conf b/.scalafmt.conf index 5e66e990d..541c6af28 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.8.0" +version = "3.8.1" runner.dialect = scala213source3 maxColumn = 120 align.preset = some diff --git a/modules/data/src/main/scala/scaladex/data/cleanup/NonStandardLib.scala b/modules/data/src/main/scala/scaladex/data/cleanup/NonStandardLib.scala index ff24317da..de0a78ca7 100644 --- a/modules/data/src/main/scala/scaladex/data/cleanup/NonStandardLib.scala +++ b/modules/data/src/main/scala/scaladex/data/cleanup/NonStandardLib.scala @@ -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 diff --git a/modules/server/src/main/scala/scaladex/server/service/ArtifactConverter.scala b/modules/server/src/main/scala/scaladex/server/service/ArtifactConverter.scala index 1c1911b1b..148214f8a 100644 --- a/modules/server/src/main/scala/scaladex/server/service/ArtifactConverter.scala +++ b/modules/server/src/main/scala/scaladex/server/service/ArtifactConverter.scala @@ -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 { diff --git a/modules/server/src/main/scala/scaladex/server/service/SonatypeService.scala b/modules/server/src/main/scala/scaladex/server/service/SonatypeService.scala index 8e823a8ba..1173f7215 100644 --- a/modules/server/src/main/scala/scaladex/server/service/SonatypeService.scala +++ b/modules/server/src/main/scala/scaladex/server/service/SonatypeService.scala @@ -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" @@ -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 =>