Skip to content

Commit

Permalink
chore: Set scalafix Scala 3 target dialect (DEV-3543) (#3236)
Browse files Browse the repository at this point in the history
  • Loading branch information
seakayone authored May 6, 2024
1 parent 82dc1c8 commit 1dcf47b
Show file tree
Hide file tree
Showing 319 changed files with 806 additions and 806 deletions.
2 changes: 1 addition & 1 deletion .scalafix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ OrganizeImports {
importsOrder = Ascii
preset = DEFAULT
removeUnused = false
targetDialect = Scala2
targetDialect = Scala3
}
10 changes: 5 additions & 5 deletions integration/src/test/scala/org/knora/sipi/SipiIT.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ package org.knora.sipi

import com.github.tomakehurst.wiremock.WireMockServer
import com.github.tomakehurst.wiremock.client.CountMatchingStrategy
import com.github.tomakehurst.wiremock.client.WireMock._
import com.github.tomakehurst.wiremock.client.WireMock.*
import com.github.tomakehurst.wiremock.core.WireMockConfiguration.options
import com.github.tomakehurst.wiremock.matching.RequestPatternBuilder
import com.github.tomakehurst.wiremock.matching.RequestPatternBuilder.newRequestPattern
import zio._
import zio.http._
import zio.*
import zio.http.*
import zio.json.DecoderOps
import zio.json.ast.Json
import zio.test._
import zio.test.*

import scala.util.Failure
import scala.util.Success
import scala.util.Try

import org.knora.sipi.MockDspApiServer.verify._
import org.knora.sipi.MockDspApiServer.verify.*
import org.knora.webapi.config.AppConfig
import org.knora.webapi.messages.util.KnoraSystemInstances.Users.SystemUser
import org.knora.webapi.routing.InvalidTokenCache
Expand Down
2 changes: 1 addition & 1 deletion integration/src/test/scala/org/knora/webapi/CoreSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import org.apache.pekko.testkit.TestKitBase
import org.scalatest.BeforeAndAfterAll
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import zio.*
import zio.ZIO
import zio._

import scala.concurrent.ExecutionContext
import scala.concurrent.duration.FiniteDuration
Expand Down
12 changes: 6 additions & 6 deletions integration/src/test/scala/org/knora/webapi/E2ESpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@

package org.knora.webapi

import com.typesafe.scalalogging._
import com.typesafe.scalalogging.*
import org.apache.pekko
import org.apache.pekko.http.scaladsl.client.RequestBuilding
import org.apache.pekko.http.scaladsl.model._
import org.apache.pekko.http.scaladsl.model.*
import org.apache.pekko.testkit.TestKitBase
import org.scalatest.BeforeAndAfterAll
import org.scalatest.concurrent.ScalaFutures
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import spray.json._
import zio._
import zio.json._
import spray.json.*
import zio.*
import zio.json.*

import java.nio.file.Files
import java.nio.file.Path
Expand All @@ -35,7 +35,7 @@ import org.knora.webapi.core.TestStartupUtils
import org.knora.webapi.messages.store.sipimessages.SipiUploadResponse
import org.knora.webapi.messages.store.triplestoremessages.RdfDataObject
import org.knora.webapi.messages.store.triplestoremessages.TriplestoreJsonProtocol
import org.knora.webapi.messages.util.rdf._
import org.knora.webapi.messages.util.rdf.*
import org.knora.webapi.routing.KnoraRouteData
import org.knora.webapi.routing.UnsafeZioRun
import org.knora.webapi.testservices.FileToUpload
Expand Down
8 changes: 4 additions & 4 deletions integration/src/test/scala/org/knora/webapi/E2EZSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

package org.knora.webapi

import zio._
import zio.http._
import zio.json._
import zio.*
import zio.http.*
import zio.json.*
import zio.json.ast.Json
import zio.json.ast.JsonCursor
import zio.test._
import zio.test.*

import org.knora.webapi.core.AppServer
import org.knora.webapi.core.LayersTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import com.typesafe.scalalogging.LazyLogging
import com.typesafe.scalalogging.Logger
import org.apache.pekko
import org.apache.pekko.http.scaladsl.client.RequestBuilding
import org.apache.pekko.http.scaladsl.model._
import org.apache.pekko.http.scaladsl.model.*
import org.apache.pekko.testkit.TestKitBase
import org.scalatest.BeforeAndAfterAll
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import spray.json._
import zio._
import spray.json.*
import zio.*

import java.util.concurrent.TimeUnit
import scala.concurrent.Await
Expand All @@ -28,7 +28,7 @@ import org.knora.webapi.core.AppRouter
import org.knora.webapi.core.AppServer
import org.knora.webapi.core.LayersTest.DefaultTestEnvironmentWithSipi
import org.knora.webapi.core.TestStartupUtils
import org.knora.webapi.messages.store.sipimessages._
import org.knora.webapi.messages.store.sipimessages.*
import org.knora.webapi.messages.store.triplestoremessages.RdfDataObject
import org.knora.webapi.messages.store.triplestoremessages.TriplestoreJsonProtocol
import org.knora.webapi.messages.util.rdf.JsonLDDocument
Expand Down
4 changes: 2 additions & 2 deletions integration/src/test/scala/org/knora/webapi/R2RSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import org.apache.pekko.http.scaladsl.testkit.ScalatestRouteTest
import org.scalatest.BeforeAndAfterAll
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import zio._
import zio.*

import java.nio.file.Files
import java.nio.file.Path
Expand All @@ -28,7 +28,7 @@ import org.knora.webapi.config.AppConfig
import org.knora.webapi.core.AppServer
import org.knora.webapi.core.TestStartupUtils
import org.knora.webapi.messages.store.triplestoremessages.RdfDataObject
import org.knora.webapi.messages.util.rdf._
import org.knora.webapi.messages.util.rdf.*
import org.knora.webapi.routing.KnoraRouteData
import org.knora.webapi.routing.UnsafeZioRun
import org.knora.webapi.util.FileUtil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
package org.knora.webapi.config

import com.typesafe.config.ConfigFactory
import zio._
import zio.config._
import zio.*
import zio.config.*
import zio.config.typesafe.TypesafeConfigProvider

import org.knora.webapi.config.AppConfig.AppConfigurations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

package org.knora.webapi.config

import zio._
import zio.test._
import zio.*
import zio.test.*

import org.knora.webapi.testcontainers.DspIngestTestContainer
import org.knora.webapi.testcontainers.FusekiTestContainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
package org.knora.webapi.core

import org.apache.pekko.actor.ActorSystem
import zio._
import zio.*

object ActorSystemTest {
def layer(sys: ActorSystem): ZLayer[Any, Nothing, ActorSystem] = ZLayer.succeed(sys)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
package org.knora.webapi.core

import org.apache.pekko
import zio._
import zio.*

import org.knora.sipi.SipiServiceTestDelegator
import org.knora.sipi.WhichSipiService
Expand All @@ -15,7 +15,7 @@ import org.knora.webapi.config.AppConfig.AppConfigurationsTest
import org.knora.webapi.config.AppConfigForTestContainers
import org.knora.webapi.config.JwtConfig
import org.knora.webapi.messages.StringFormatter
import org.knora.webapi.messages.util._
import org.knora.webapi.messages.util.*
import org.knora.webapi.messages.util.search.QueryTraverser
import org.knora.webapi.messages.util.search.gravsearch.prequery.InferenceOptimizationService
import org.knora.webapi.messages.util.search.gravsearch.transformers.ConstructTransformer
Expand All @@ -24,22 +24,22 @@ import org.knora.webapi.messages.util.search.gravsearch.types.GravsearchTypeInsp
import org.knora.webapi.messages.util.standoff.StandoffTagUtilV2
import org.knora.webapi.messages.util.standoff.StandoffTagUtilV2Live
import org.knora.webapi.responders.IriService
import org.knora.webapi.responders.admin._
import org.knora.webapi.responders.v2._
import org.knora.webapi.responders.admin.*
import org.knora.webapi.responders.v2.*
import org.knora.webapi.responders.v2.ontology.CardinalityHandler
import org.knora.webapi.responders.v2.ontology.OntologyHelpers
import org.knora.webapi.responders.v2.ontology.OntologyHelpersLive
import org.knora.webapi.routing._
import org.knora.webapi.routing.*
import org.knora.webapi.slice.admin.AdminModule
import org.knora.webapi.slice.admin.api.*
import org.knora.webapi.slice.admin.api.AdminApiModule
import org.knora.webapi.slice.admin.api._
import org.knora.webapi.slice.admin.api.service.GroupRestService
import org.knora.webapi.slice.admin.api.service.PermissionRestService
import org.knora.webapi.slice.admin.api.service.ProjectRestService
import org.knora.webapi.slice.admin.api.service.UserRestService
import org.knora.webapi.slice.admin.domain.service.*
import org.knora.webapi.slice.admin.domain.service.ProjectExportStorageService
import org.knora.webapi.slice.admin.domain.service._
import org.knora.webapi.slice.common.api._
import org.knora.webapi.slice.common.api.*
import org.knora.webapi.slice.common.repo.service.PredicateObjectMapper
import org.knora.webapi.slice.infrastructure.JwtService
import org.knora.webapi.slice.infrastructure.JwtServiceLive
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
package org.knora.webapi.core

import com.typesafe.scalalogging.LazyLogging
import zio._
import zio.*

import org.knora.webapi.messages.store.triplestoremessages.RdfDataObject
import org.knora.webapi.messages.util.KnoraSystemInstances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import scala.concurrent.duration.NANOSECONDS
import org.knora.webapi.E2ESpec
import org.knora.webapi.messages.store.triplestoremessages.RdfDataObject

import pekko.http.scaladsl.model.HttpMethods._
import pekko.http.scaladsl.model.HttpMethods.*
import pekko.http.scaladsl.model.HttpResponse
import pekko.http.scaladsl.model.StatusCodes
import pekko.http.scaladsl.model.headers._
import pekko.http.scaladsl.model.headers.*
import pekko.http.scaladsl.testkit.RouteTestTimeout

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ package org.knora.webapi.e2e

import org.apache.pekko

import dsp.errors._
import org.knora.webapi._
import dsp.errors.*
import org.knora.webapi.*
import org.knora.webapi.http.handler

import pekko.http.scaladsl.model._
import pekko.http.scaladsl.server.Directives._
import pekko.http.scaladsl.model.*
import pekko.http.scaladsl.server.Directives.*
import pekko.http.scaladsl.server.Route

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import org.knora.webapi.E2ESpec
import org.knora.webapi.core.State
import org.knora.webapi.core.domain.AppState

import pekko.http.scaladsl.model._
import pekko.http.scaladsl.model.*
import pekko.http.scaladsl.testkit.RouteTestTimeout

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import scala.collection.mutable

import dsp.errors.AssertionException
import dsp.errors.BadRequestException
import org.knora.webapi._
import org.knora.webapi.messages.IriConversions._
import org.knora.webapi.*
import org.knora.webapi.messages.IriConversions.*
import org.knora.webapi.messages.OntologyConstants
import org.knora.webapi.messages.SmartIri
import org.knora.webapi.messages.StringFormatter
import org.knora.webapi.messages.util._
import org.knora.webapi.messages.util.rdf._
import org.knora.webapi.messages.v2.responder.ontologymessages._
import org.knora.webapi.messages.util.*
import org.knora.webapi.messages.util.rdf.*
import org.knora.webapi.messages.v2.responder.ontologymessages.*
import org.knora.webapi.slice.ontology.domain.model.Cardinality.AtLeastOne
import org.knora.webapi.slice.ontology.domain.model.Cardinality.ExactlyOne
import org.knora.webapi.slice.ontology.domain.model.Cardinality.ZeroOrOne
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import scala.concurrent.duration.NANOSECONDS

import dsp.errors.AssertionException
import org.knora.webapi.E2ESpec
import org.knora.webapi.messages.IriConversions._
import org.knora.webapi.messages.IriConversions.*
import org.knora.webapi.messages.StringFormatter
import org.knora.webapi.util.FileUtil

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

package org.knora.webapi.e2e.admin

import org.apache.pekko.http.scaladsl.model._
import org.apache.pekko.http.scaladsl.model.*
import org.apache.pekko.http.scaladsl.model.headers.BasicHttpCredentials
import zio.ZIO

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ import org.apache.pekko
import org.apache.pekko.http.scaladsl.marshallers.sprayjson.SprayJsonSupport

import scala.concurrent.Await
import scala.concurrent.duration._
import scala.concurrent.duration.*

import org.knora.webapi.E2ESpec
import org.knora.webapi.messages.admin.responder.IntegrationTestAdminJsonProtocol._
import org.knora.webapi.messages.admin.responder.IntegrationTestAdminJsonProtocol.*
import org.knora.webapi.messages.store.triplestoremessages.StringLiteralV2
import org.knora.webapi.sharedtestdata.SharedTestDataADM
import org.knora.webapi.slice.admin.domain.model.Group
import org.knora.webapi.util.AkkaHttpUtils
import org.knora.webapi.util.MutableTestIri

import pekko.http.scaladsl.model._
import pekko.http.scaladsl.model.headers._
import pekko.http.scaladsl.model.*
import pekko.http.scaladsl.model.headers.*
import pekko.http.scaladsl.testkit.RouteTestTimeout
import pekko.http.scaladsl.unmarshalling.Unmarshal

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
package org.knora.webapi.e2e.admin

import org.apache.pekko.http.scaladsl.marshallers.sprayjson.SprayJsonSupport
import org.apache.pekko.http.scaladsl.model._
import org.apache.pekko.http.scaladsl.model.*
import org.apache.pekko.http.scaladsl.model.headers.BasicHttpCredentials
import spray.json._
import spray.json.*
import zio.durationInt

import java.net.URLEncoder

import org.knora.webapi.E2ESpec
import org.knora.webapi.messages.admin.responder.IntegrationTestAdminJsonProtocol._
import org.knora.webapi.messages.admin.responder.IntegrationTestAdminJsonProtocol.*
import org.knora.webapi.messages.admin.responder.permissionsmessages.AdministrativePermissionGetResponseADM
import org.knora.webapi.sharedtestdata.SharedOntologyTestDataADM
import org.knora.webapi.sharedtestdata.SharedTestDataADM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ import spray.json.jsonReader
import java.net.URLEncoder
import scala.concurrent.Await
import scala.concurrent.Future
import scala.concurrent.duration._
import scala.concurrent.duration.*

import org.knora.webapi.E2ESpec
import org.knora.webapi.IRI
import org.knora.webapi.messages.admin.responder.IntegrationTestAdminJsonProtocol._
import org.knora.webapi.messages.admin.responder.IntegrationTestAdminJsonProtocol.*
import org.knora.webapi.messages.store.triplestoremessages.RdfDataObject
import org.knora.webapi.messages.store.triplestoremessages.StringLiteralV2
import org.knora.webapi.messages.util.rdf.RdfModel
import org.knora.webapi.sharedtestdata.SharedTestDataADM
import org.knora.webapi.slice.admin.api.model.*
import org.knora.webapi.slice.admin.api.model.ProjectMembersGetResponseADM
import org.knora.webapi.slice.admin.api.model._
import org.knora.webapi.slice.admin.domain.model.User
import org.knora.webapi.util.AkkaHttpUtils
import org.knora.webapi.util.MutableTestIri
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import org.apache.pekko.http.scaladsl.marshallers.sprayjson.SprayJsonSupport

import java.net.URLEncoder
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.concurrent.duration.*

import org.knora.webapi.*
import org.knora.webapi.E2ESpec
import org.knora.webapi._
import org.knora.webapi.messages.admin.responder.IntegrationTestAdminJsonProtocol._
import org.knora.webapi.messages.admin.responder.IntegrationTestAdminJsonProtocol.*
import org.knora.webapi.messages.util.KnoraSystemInstances
import org.knora.webapi.sharedtestdata.SharedTestDataADM
import org.knora.webapi.sharedtestdata.SharedTestDataADM2
Expand All @@ -24,8 +24,8 @@ import org.knora.webapi.slice.admin.domain.model.User
import org.knora.webapi.util.AkkaHttpUtils
import org.knora.webapi.util.MutableTestIri

import pekko.http.scaladsl.model._
import pekko.http.scaladsl.model.headers._
import pekko.http.scaladsl.model.*
import pekko.http.scaladsl.model.headers.*
import pekko.http.scaladsl.unmarshalling.Unmarshal

/**
Expand Down
Loading

0 comments on commit 1dcf47b

Please sign in to comment.