Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Scala 2 syntax with -Xsource:3" warnings #3533

Merged
merged 2 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ package org.scalasteward.core.application
import better.files.File
import cats.data.Validated
import cats.effect.ExitCode
import cats.syntax.all._
import cats.syntax.all.*
import com.monovore.decline.*
import com.monovore.decline.Opts.{flag, option, options}
import com.monovore.decline._
import org.http4s.Uri
import org.http4s.syntax.literals._
import org.scalasteward.core.application.Config._
import org.http4s.syntax.literals.*
import org.scalasteward.core.application.Config.*
import org.scalasteward.core.application.ExitCodePolicy.{
SuccessIfAnyRepoSucceeds,
SuccessOnlyIfAllReposSucceed
Expand All @@ -36,8 +36,7 @@ import org.scalasteward.core.forge.github.GitHubApp
import org.scalasteward.core.git.Author
import org.scalasteward.core.util.Nel
import org.scalasteward.core.util.dateTime.renderFiniteDuration

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

object Cli {
final case class EnvVar(name: String, value: String)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package org.scalasteward.core.application
import better.files.File
import org.http4s.Uri
import org.scalasteward.core.application.Cli.EnvVar
import org.scalasteward.core.application.Config._
import org.scalasteward.core.application.Config.*
import org.scalasteward.core.data.Resolver
import org.scalasteward.core.forge.ForgeType
import org.scalasteward.core.forge.github.GitHubApp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

package org.scalasteward.core.application

import cats.effect._
import cats.effect.implicits._
import cats.syntax.all._
import cats.effect.*
import cats.effect.implicits.*
import cats.syntax.all.*
import eu.timepit.refined.types.numeric.PosInt
import org.http4s.Uri
import org.http4s.client.Client
Expand All @@ -34,20 +34,20 @@ import org.scalasteward.core.coursier.{CoursierAlg, VersionsCache}
import org.scalasteward.core.data.Repo
import org.scalasteward.core.edit.EditAlg
import org.scalasteward.core.edit.hooks.HookExecutor
import org.scalasteward.core.edit.scalafix._
import org.scalasteward.core.edit.scalafix.*
import org.scalasteward.core.edit.update.ScannerAlg
import org.scalasteward.core.forge.{ForgeApiAlg, ForgeAuthAlg, ForgeRepoAlg, ForgeSelection}
import org.scalasteward.core.git.{GenGitAlg, GitAlg}
import org.scalasteward.core.io.{FileAlg, ProcessAlg, WorkspaceAlg}
import org.scalasteward.core.nurture.{NurtureAlg, PullRequestRepository, UpdateInfoUrlFinder}
import org.scalasteward.core.persistence.{CachingKeyValueStore, JsonKeyValueStore}
import org.scalasteward.core.repocache._
import org.scalasteward.core.repocache.*
import org.scalasteward.core.repoconfig.{RepoConfigAlg, RepoConfigLoader}
import org.scalasteward.core.scalafmt.ScalafmtAlg
import org.scalasteward.core.update.artifact.{ArtifactMigrationsFinder, ArtifactMigrationsLoader}
import org.scalasteward.core.update.{FilterAlg, PruningAlg, UpdateAlg}
import org.scalasteward.core.util._
import org.scalasteward.core.util.uri._
import org.scalasteward.core.util.*
import org.scalasteward.core.util.uri.*
import org.typelevel.log4cats.Logger
import org.typelevel.log4cats.slf4j.Slf4jLogger

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.scalasteward.core.application

import cats.effect.Sync
import cats.syntax.all._
import cats.syntax.all.*
import fs2.Stream
import org.http4s.Uri
import org.scalasteward.core.data.Repo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.scalasteward.core.application

import cats.syntax.all._
import cats.syntax.all.*
import org.scalasteward.core.data.Repo

case class RunResults(results: List[Either[(Repo, Throwable), Repo]]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.scalasteward.core.application

import cats.MonadThrow
import cats.syntax.all._
import cats.syntax.all.*
import org.scalasteward.core.edit.scalafix.ScalafixCli
import org.scalasteward.core.edit.scalafix.ScalafixCli.scalafixBinary
import org.scalasteward.core.git.GitAlg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.scalasteward.core.application

import cats.effect.{ExitCode, Sync}
import cats.syntax.all._
import cats.syntax.all.*
import fs2.Stream
import org.scalasteward.core.data.Repo
import org.scalasteward.core.forge.ForgeAuthAlg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.scalasteward.core.application

import cats.effect.Sync
import cats.syntax.all._
import cats.syntax.all.*
import org.scalasteward.core.io.FileAlg
import org.scalasteward.core.repoconfig.ValidateRepoConfigAlg
import org.typelevel.log4cats.Logger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.scalasteward.core.buildtool

import cats.Monad
import cats.syntax.all._
import cats.syntax.all.*
import org.scalasteward.core.buildtool.maven.MavenAlg
import org.scalasteward.core.buildtool.mill.MillAlg
import org.scalasteward.core.buildtool.sbt.SbtAlg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ package org.scalasteward.core.buildtool.maven

import better.files.File
import cats.effect.{MonadCancelThrow, Resource}
import cats.syntax.all._
import cats.syntax.all.*
import org.scalasteward.core.application.Config
import org.scalasteward.core.buildtool.{BuildRoot, BuildToolAlg}
import org.scalasteward.core.data._
import org.scalasteward.core.data.*
import org.scalasteward.core.io.{FileAlg, ProcessAlg, WorkspaceAlg}
import org.scalasteward.core.util.Nel
import org.typelevel.log4cats.Logger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ package org.scalasteward.core.buildtool.maven

import cats.parse.Rfc5234.wsp
import cats.parse.{Parser, Parser0}
import cats.syntax.all._
import org.scalasteward.core.data._
import cats.syntax.all.*
import org.scalasteward.core.data.*

object parser {
private val colon: Parser[Char] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ package org.scalasteward.core.buildtool.mill

import better.files.File
import cats.effect.MonadCancelThrow
import cats.syntax.all._
import org.scalasteward.core.buildtool.mill.MillAlg._
import cats.syntax.all.*
import org.scalasteward.core.buildtool.mill.MillAlg.*
import org.scalasteward.core.buildtool.{BuildRoot, BuildToolAlg}
import org.scalasteward.core.data._
import org.scalasteward.core.data.*
import org.scalasteward.core.io.{FileAlg, ProcessAlg, WorkspaceAlg}
import org.scalasteward.core.util.Nel
import org.typelevel.log4cats.Logger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ package org.scalasteward.core.buildtool.mill

import cats.parse.Parser
import cats.parse.Rfc5234.sp
import cats.syntax.all._
import cats.syntax.all.*
import io.circe.{Decoder, DecodingFailure}
import org.scalasteward.core.data._
import org.scalasteward.core.data.*
import scala.util.Try

object parser {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package org.scalasteward.core.buildtool.sbt
import better.files.File
import cats.data.OptionT
import cats.effect.{Concurrent, Resource}
import cats.syntax.all._
import cats.syntax.all.*
import org.scalasteward.core.application.Config
import org.scalasteward.core.buildtool.sbt.command._
import org.scalasteward.core.buildtool.sbt.command.*
import org.scalasteward.core.buildtool.{BuildRoot, BuildToolAlg}
import org.scalasteward.core.coursier.VersionsCache
import org.scalasteward.core.data.{Dependency, Scope, Version}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.scalasteward.core.buildtool.sbt.data

import cats.Order
import cats.syntax.all._
import cats.syntax.all.*
import io.circe.{Decoder, Encoder}

final case class SbtVersion(value: String)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.scalasteward.core.buildtool.sbt.data

import cats.Order
import cats.syntax.all._
import cats.syntax.all.*
import io.circe.{Decoder, Encoder}

final case class ScalaVersion(value: String)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

package org.scalasteward.core.buildtool

import cats.syntax.all._
import cats.syntax.all.*
import org.scalasteward.core.buildtool.sbt.data.{SbtVersion, ScalaVersion}
import org.scalasteward.core.data._
import org.scalasteward.core.data.*
import org.scalasteward.core.io.FileData

package object sbt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

package org.scalasteward.core.buildtool.sbt

import cats.implicits._
import cats.implicits.*
import io.circe.Decoder
import io.circe.parser._
import org.scalasteward.core.data._
import io.circe.parser.*
import org.scalasteward.core.data.*

object parser {
private val regex = """sbt.version\s*=\s*(\S+)""".r
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.scalasteward.core.buildtool.scalacli

import cats.Monad
import cats.syntax.all._
import cats.syntax.all.*
import org.scalasteward.core.buildtool.sbt.SbtAlg
import org.scalasteward.core.buildtool.{BuildRoot, BuildToolAlg}
import org.scalasteward.core.data.Scope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@

package org.scalasteward.core.client

import cats.effect._
import cats.syntax.all._
import cats.effect.*
import cats.syntax.all.*
import eu.timepit.refined.types.numeric.PosInt
import java.net.http.HttpClient
import java.net.http.HttpClient.Builder
import org.http4s.Response
import org.http4s.client._
import org.http4s.client.*
import org.http4s.headers.`User-Agent`
import org.http4s.jdkhttpclient.JdkHttpClient
import org.typelevel.ci._
import scala.concurrent.duration._
import org.typelevel.ci.*
import scala.concurrent.duration.*

object ClientConfiguration {
type BuilderMiddleware = Builder => Builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package org.scalasteward.core.coursier

import cats.Parallel
import cats.effect.Async
import cats.implicits._
import cats.implicits.*
import coursier.cache.{CachePolicy, FileCache}
import coursier.core.{Authentication, Project}
import coursier.{Fetch, Module, ModuleName, Organization}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.scalasteward.core.coursier

import cats.Monad
import cats.syntax.all._
import cats.syntax.all.*
import org.http4s.Uri
import org.scalasteward.core.application.Config.ForgeCfg
import org.scalasteward.core.forge.ForgeRepo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.scalasteward.core.coursier

import cats.implicits._
import cats.implicits.*
import cats.{MonadThrow, Parallel}
import io.circe.generic.semiauto.deriveCodec
import io.circe.{Codec, KeyEncoder}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package org.scalasteward.core

import cats.Parallel
import cats.effect.Async
import cats.syntax.all._
import cats.syntax.all.*
import java.util.concurrent.ExecutorService
import scala.concurrent.ExecutionContext

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.scalasteward.core.data

import cats.Order
import cats.syntax.all._
import cats.syntax.all.*
import io.circe.{Decoder, Encoder}
import org.scalasteward.core.util.Nel

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package org.scalasteward.core.data

import cats.Order
import io.circe.Codec
import io.circe.generic.semiauto._
import io.circe.generic.semiauto.*
import org.scalasteward.core.buildtool.sbt.data.{SbtVersion, ScalaVersion}

final case class Dependency(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.scalasteward.core.data

import cats.Order
import cats.syntax.all._
import cats.syntax.all.*
import io.circe.{Decoder, Encoder}

final case class GroupId(value: String) extends AnyVal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ package org.scalasteward.core.data

import cats.Order
import io.circe.Codec
import io.circe.generic.semiauto._
import org.scalasteward.core.data.Resolver._
import io.circe.generic.semiauto.*
import org.scalasteward.core.data.Resolver.*

sealed trait Resolver extends Product with Serializable {
val path: String = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.scalasteward.core.data

import cats.implicits._
import cats.implicits.*
import cats.{Applicative, Eval, Order, Traverse}
import io.circe.generic.semiauto.deriveCodec
import io.circe.{Codec, Decoder, Encoder}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

package org.scalasteward.core.data

import cats.syntax.all._
import cats.syntax.all.*
import io.circe.{Codec, Decoder, Encoder}
import org.scalasteward.core.data.SemVer.Change._
import org.scalasteward.core.data.SemVer.Change.*
import scala.annotation.tailrec

final case class SemVer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
package org.scalasteward.core.data

import cats.Order
import cats.implicits._
import io.circe.generic.semiauto._
import io.circe.syntax._
import cats.implicits.*
import io.circe.generic.semiauto.*
import io.circe.syntax.*
import io.circe.{Decoder, Encoder, HCursor, Json}
import org.scalasteward.core.repoconfig.PullRequestGroup
import org.scalasteward.core.util
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.scalasteward.core.data

import cats.Order
import cats.implicits._
import cats.implicits.*
import cats.parse.{Numbers, Parser, Rfc5234}
import io.circe.{Decoder, Encoder}
import org.scalasteward.core.data.Version.startsWithDate
Expand Down
Loading
Loading