Skip to content

Commit

Permalink
(chore): fix pr comments, readability, relative imports, unmanagedSou…
Browse files Browse the repository at this point in the history
…rceDirectories
  • Loading branch information
rvacaru committed Jul 15, 2022
1 parent dd956df commit 4f1ab7d
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 21 deletions.
18 changes: 7 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,21 @@ lazy val core = projectMatrix
Seq("-P:semanticdb:synthetics:on")
else Nil
),
libraryDependencies += {
googleDiff
},
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) => List(
if (isScala3.value) {
List(
scalameta
.exclude("com.lihaoyi", "sourcecode_2.13")
.exclude("org.scala-lang.modules", "scala-collection-compat_2.13"),
googleDiff
)
case Some((2, _)) => List(
} else {
List(
scalameta,
googleDiff,
collectionCompat
)
case _ => Nil
}
},
libraryDependencies += {
Expand Down Expand Up @@ -325,11 +326,6 @@ lazy val unit = projectMatrix
}
)
.defaultAxes(VirtualAxis.jvm)
.jvmPlatform(
scalaVersions = Seq(scala3),
axisValues = Seq(TargetAxis(scala3)),
settings = Seq()
)
.jvmPlatform(
scalaVersions = Seq(scala212),
axisValues = Seq(TargetAxis(scala3)),
Expand Down
4 changes: 3 additions & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ object Dependencies {
val nailgunServer = "com.martiansoftware" % "nailgun-server" % nailgunV
val scalaXml = "org.scala-lang.modules" %% "scala-xml" % scalaXmlV
val scalaXml211 = "org.scala-lang.modules" %% "scala-xml" % scalaXml211V
val scalameta = ("org.scalameta" %% "scalameta" % scalametaV).cross(CrossVersion.for3Use2_13)
// https://github.com/scalameta/scalameta/issues/2485
val scalameta = ("org.scalameta" %% "scalameta" % scalametaV)
.cross(CrossVersion.for3Use2_13)
val scalametaTeskit = "org.scalameta" %% "testkit" % scalametaV
val scalatest = "org.scalatest" %% "scalatest" % scalatestV
val semanticdbScalacCore = "org.scalameta" % "semanticdb-scalac-core" % scalametaV cross CrossVersion.full
Expand Down
5 changes: 1 addition & 4 deletions project/ScalafixBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,7 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {
Compile / unmanagedSourceDirectories ++= {
val sourceDir = (Compile / sourceDirectory).value
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n == 13 => Seq(sourceDir / "scala-2.13")
case Some((2, n)) if n == 12 => Seq(sourceDir / "scala-2.12")
case Some((2, n)) if n == 11 => Seq(sourceDir / "scala-2.11")
case Some((3, _)) => Seq(sourceDir / "scala-3")
case Some((2, n)) if n >= 12 => Seq(sourceDir / "scala-2.12+")
case _ => Seq()
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package scalafix.util

import scala.meta.tokens.Token
import scala.meta.tokens.Tokens
import meta.classifiers.XtensionClassifiable
import scala.meta.classifiers.XtensionClassifiable

import scalafix.util.Compat._
import scala.collection.SeqView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import metaconfig.Configured
import metaconfig.Input
import metaconfig.Position
import metaconfig.internal.ConfGet
import meta.internal.inputs.XtensionInputSyntaxStructure
import scala.meta.internal.inputs.XtensionInputSyntaxStructure

object MetaconfigOps {
def traverse[T](lst: Seq[Configured[T]]): Configured[List[T]] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import scala.meta.Position
import scala.meta.inputs.Input

import scalafix.internal.util.IntervalSet
import meta.internal.inputs.XtensionInputSyntaxStructure
import scala.meta.internal.inputs.XtensionInputSyntaxStructure

object DiffDisable {
def empty: DiffDisable = EmptyDiff
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package scalafix.internal.util

import scala.meta.Lit
import scala.meta.XtensionSyntax

import org.typelevel.paiges.Doc
import scalafix.internal.v1.Types
import scalafix.v1._
import meta.XtensionSyntax

object Pretty {
import DocConstants._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package scalafix.util

import scala.meta.classifiers.Classifier
import scala.meta.classifiers.XtensionClassifiable
import scala.meta.tokens.Token
import scala.meta.tokens.Token._
import meta.classifiers.XtensionClassifiable

trait Whitespace
object Whitespace {
Expand Down

0 comments on commit 4f1ab7d

Please sign in to comment.