Skip to content

Commit

Permalink
Run scalafix
Browse files Browse the repository at this point in the history
  • Loading branch information
adpi2 committed Feb 12, 2024
1 parent abf2e20 commit 174436d
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 39 deletions.
2 changes: 1 addition & 1 deletion modules/data/src/main/scala/scaladex/data/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import scala.concurrent.ExecutionContext
import scala.concurrent.Future
import scala.sys.process.Process

import org.apache.pekko.actor.ActorSystem
import cats.effect._
import com.typesafe.scalalogging.LazyLogging
import doobie.hikari._
import org.apache.pekko.actor.ActorSystem
import scaladex.core.util.ScalaExtensions._
import scaladex.core.util.TimeUtils
import scaladex.data.init.Init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import scala.util.Failure
import scala.util.Success
import scala.util.Try

import com.github.pjfanning.pekkohttpcirce.FailFastCirceSupport
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.Http
import org.apache.pekko.http.scaladsl.model.HttpRequest
Expand All @@ -18,7 +19,6 @@ import org.apache.pekko.stream.scaladsl.Keep
import org.apache.pekko.stream.scaladsl.Sink
import org.apache.pekko.stream.scaladsl.Source
import org.apache.pekko.stream.scaladsl.SourceQueueWithComplete
import com.github.pjfanning.pekkohttpcirce.FailFastCirceSupport

abstract class CommonAkkaHttpClient(implicit system: ActorSystem) extends FailFastCirceSupport {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import scala.concurrent.Promise
import scala.concurrent.duration.DurationInt
import scala.util.Try

import cats.implicits.toTraverseOps
import com.typesafe.scalalogging.LazyLogging
import io.circe.Json
import io.circe.syntax._
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.Http
import org.apache.pekko.http.scaladsl.model.ContentTypes
Expand All @@ -24,10 +28,6 @@ import org.apache.pekko.http.scaladsl.settings.ConnectionPoolSettings
import org.apache.pekko.http.scaladsl.unmarshalling.Unmarshal
import org.apache.pekko.stream.scaladsl.Flow
import org.apache.pekko.util.ByteString
import cats.implicits.toTraverseOps
import com.typesafe.scalalogging.LazyLogging
import io.circe.Json
import io.circe.syntax._
import scaladex.core.model.GithubCommitActivity
import scaladex.core.model.GithubInfo
import scaladex.core.model.GithubResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import scala.concurrent.Promise
import scala.util.Try
import scala.util.control.NonFatal

import com.typesafe.scalalogging.LazyLogging
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.Http
import org.apache.pekko.http.scaladsl.model
Expand All @@ -20,7 +21,6 @@ import org.apache.pekko.http.scaladsl.settings.ConnectionPoolSettings
import org.apache.pekko.http.scaladsl.unmarshalling.Unmarshaller
import org.apache.pekko.stream.scaladsl.Flow
import org.apache.pekko.util.ByteString
import com.typesafe.scalalogging.LazyLogging
import scaladex.core.model.Artifact
import scaladex.core.model.Artifact.MavenReference
import scaladex.core.model.SbtPlugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ package scaladex.server
import scala.collection.concurrent.TrieMap
import scala.concurrent.Future

import com.github.pjfanning.pekkohttpcirce.FailFastCirceSupport
import com.typesafe.scalalogging.LazyLogging
import io.circe.Json
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl._
import org.apache.pekko.http.scaladsl.model.HttpMethods.POST
import org.apache.pekko.http.scaladsl.model.Uri._
import org.apache.pekko.http.scaladsl.model._
import org.apache.pekko.http.scaladsl.model.headers._
import org.apache.pekko.http.scaladsl.unmarshalling.Unmarshal
import com.typesafe.scalalogging.LazyLogging
import com.github.pjfanning.pekkohttpcirce.FailFastCirceSupport
import io.circe.Json
import scaladex.core.model.GithubResponse
import scaladex.core.model.UserInfo
import scaladex.core.model.UserState
Expand Down
8 changes: 4 additions & 4 deletions modules/server/src/main/scala/scaladex/server/Server.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import scala.util.Failure
import scala.util.Success
import scala.util.control.NonFatal

import cats.effect.ContextShift
import cats.effect.IO
import com.typesafe.scalalogging.LazyLogging
import doobie.util.ExecutionContexts
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl._
import org.apache.pekko.http.scaladsl.model.StatusCodes
import org.apache.pekko.http.scaladsl.server.Directives._
import org.apache.pekko.http.scaladsl.server._
import cats.effect.ContextShift
import cats.effect.IO
import com.typesafe.scalalogging.LazyLogging
import doobie.util.ExecutionContexts
import scaladex.core.service.WebDatabase
import scaladex.data.util.PidLock
import scaladex.infra.DataPaths
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package scaladex.server.route
import scala.concurrent.ExecutionContext
import scala.util.Success

import com.typesafe.scalalogging.LazyLogging
import org.apache.pekko.http.scaladsl.model.StatusCodes
import org.apache.pekko.http.scaladsl.model._
import org.apache.pekko.http.scaladsl.server.Directives._
import org.apache.pekko.http.scaladsl.server.Route
import com.typesafe.scalalogging.LazyLogging
import scaladex.core.model.Env
import scaladex.core.model.UserState
import scaladex.core.service.WebDatabase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@ import java.util.UUID
import scala.util.Success
import scala.util.Try

import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.model.StatusCodes.TemporaryRedirect
import org.apache.pekko.http.scaladsl.model.Uri.Query
import org.apache.pekko.http.scaladsl.model._
import org.apache.pekko.http.scaladsl.model.headers.Referer
import org.apache.pekko.http.scaladsl.server.Directive1
import org.apache.pekko.http.scaladsl.server.Directives._
import org.apache.pekko.http.scaladsl.server.Route
import com.softwaremill.pekkohttpsession.CsrfDirectives._
import com.softwaremill.pekkohttpsession.CsrfOptions._
import com.softwaremill.pekkohttpsession.SessionConfig
Expand All @@ -23,6 +15,14 @@ import com.softwaremill.pekkohttpsession.SessionSerializer
import com.softwaremill.pekkohttpsession.SingleValueSessionSerializer
import com.softwaremill.pekkohttpsession.javadsl.InMemoryRefreshTokenStorage
import com.typesafe.scalalogging.LazyLogging
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.model.StatusCodes.TemporaryRedirect
import org.apache.pekko.http.scaladsl.model.Uri.Query
import org.apache.pekko.http.scaladsl.model._
import org.apache.pekko.http.scaladsl.model.headers.Referer
import org.apache.pekko.http.scaladsl.server.Directive1
import org.apache.pekko.http.scaladsl.server.Directives._
import org.apache.pekko.http.scaladsl.server.Route
import scaladex.core.model.UserState
import scaladex.core.service.GithubAuth
import scaladex.core.service.WebDatabase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import scala.concurrent.Future
import scala.util.Failure
import scala.util.Success

import com.typesafe.scalalogging.LazyLogging
import org.apache.pekko.http.scaladsl.model.Uri._
import org.apache.pekko.http.scaladsl.model._
import org.apache.pekko.http.scaladsl.server.Directives._
import org.apache.pekko.http.scaladsl.server._
import com.typesafe.scalalogging.LazyLogging
import scaladex.core.model._
import scaladex.core.service.SearchEngine
import scaladex.core.service.WebDatabase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package scaladex.server.route.api
import scala.concurrent.ExecutionContext
import scala.concurrent.Future

import endpoints4s.pekkohttp.server
import org.apache.pekko.http.cors.scaladsl.CorsDirectives.cors
import org.apache.pekko.http.scaladsl.server.Directives._
import org.apache.pekko.http.scaladsl.server.Route
import org.apache.pekko.http.cors.scaladsl.CorsDirectives.cors
import endpoints4s.pekkohttp.server
import scaladex.core.api.artifact.ArtifactEndpoints
import scaladex.core.api.artifact.ArtifactMetadataParams
import scaladex.core.api.artifact.ArtifactMetadataResponse
Expand All @@ -19,7 +19,6 @@ import scaladex.core.model.search.Page
import scaladex.core.model.search.Pagination
import scaladex.core.service.WebDatabase


class ArtifactApi(database: WebDatabase)(
implicit ec: ExecutionContext
) extends ArtifactEndpoints
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package scaladex.server.route.api

import org.apache.pekko.http.scaladsl.server.Route
import org.apache.pekko.http.cors.scaladsl.CorsDirectives.cors
import endpoints4s.pekkohttp.server
import endpoints4s.openapi.model.OpenApi
import endpoints4s.pekkohttp.server
import org.apache.pekko.http.cors.scaladsl.CorsDirectives.cors
import org.apache.pekko.http.scaladsl.server.Route

/**
* Akka-Http routes serving the documentation of the public HTTP API of Scaladex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package scaladex.server.route.api
import scala.concurrent.ExecutionContext
import scala.concurrent.Future

import org.apache.pekko.http.cors.scaladsl.CorsDirectives._
import org.apache.pekko.http.scaladsl.model.StatusCodes._
import org.apache.pekko.http.scaladsl.server.Directives._
import org.apache.pekko.http.scaladsl.server.Route
import org.apache.pekko.http.cors.scaladsl.CorsDirectives._
import play.api.libs.json._
import scaladex.core.model.Artifact
import scaladex.core.model.ArtifactSelection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import java.time.Instant
import scala.collection.concurrent.TrieMap
import scala.concurrent.ExecutionContext

import com.typesafe.scalalogging.LazyLogging
import org.apache.pekko.http.scaladsl.model.StatusCodes
import org.apache.pekko.http.scaladsl.model.headers._
import org.apache.pekko.http.scaladsl.server.AuthorizationFailedRejection
import org.apache.pekko.http.scaladsl.server.Directive1
import org.apache.pekko.http.scaladsl.server.Directives._
import org.apache.pekko.http.scaladsl.server.Route
import com.typesafe.scalalogging.LazyLogging
import scaladex.core.model.UserState
import scaladex.core.service.GithubAuth
import scaladex.core.util.Secret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package scaladex.server.route.api

import scala.concurrent.ExecutionContext

import org.apache.pekko.http.scaladsl.server.Route
import org.apache.pekko.http.cors.scaladsl.CorsDirectives._
import endpoints4s.pekkohttp.server
import org.apache.pekko.http.cors.scaladsl.CorsDirectives._
import org.apache.pekko.http.scaladsl.server.Route
import scaladex.core.api.AutocompletionResponse
import scaladex.core.api.SearchEndpoints
import scaladex.core.model.UserState
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package scaladex.server.service
import scala.concurrent.Future

import org.apache.pekko.actor.ActorSystem
import com.typesafe.scalalogging.LazyLogging
import org.apache.pekko.actor.ActorSystem
import scaladex.core.model.Artifact
import scaladex.core.model.Env
import scaladex.core.model.GithubResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import scala.concurrent.Future
import scala.concurrent.duration._
import scala.util.control.NonFatal

import com.typesafe.scalalogging.LazyLogging
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.actor.Cancellable
import com.typesafe.scalalogging.LazyLogging
import scaladex.core.model.UserState
import scaladex.view.Job

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import java.time.Instant
import scala.concurrent.ExecutionContext
import scala.concurrent.Future

import org.apache.pekko.actor.ActorSystem
import com.typesafe.scalalogging.LazyLogging
import org.apache.pekko.actor.ActorSystem
import scaladex.core.model.Env
import scaladex.core.model.Project
import scaladex.core.model.Sha1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import java.util.UUID

import scala.concurrent.Future

import com.typesafe.scalalogging.LazyLogging
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.model.StatusCodes
import com.typesafe.scalalogging.LazyLogging
import scaladex.core.model.GithubResponse
import scaladex.core.model.UserState
import scaladex.core.service.SchedulerDatabase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import scala.concurrent.Await
import scala.concurrent.Future
import scala.concurrent.duration.Duration

import cats.implicits.toTraverseOps
import org.apache.pekko.http.scaladsl.model.StatusCodes
import org.apache.pekko.http.scaladsl.server.Route
import cats.implicits.toTraverseOps
import org.scalatest.BeforeAndAfterEach
import play.api.libs.json.Reads
import scaladex.core.api.artifact.ArtifactMetadataResponse
Expand Down

0 comments on commit 174436d

Please sign in to comment.