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

Update scalafmt-core to 3.8.3 #194

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Scala Steward: Reformat with scalafmt 3.8.3
5cde0aed9209ba4f4d81bc19f2af65744d16811f
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.8.1
version = 3.8.3
runner.dialect = scala213source3
project.git = true
maxColumn = 120
Expand Down
5 changes: 3 additions & 2 deletions itest/src/custom-rule/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import mill.scalalib._
import os._

object project extends ScalaModule with ScalafixModule {
def scalaVersion = "2.12.17"
def semanticDbEnablePluginScalacOptions = super.semanticDbEnablePluginScalacOptions() ++ Seq("-P:semanticdb:synthetics:on")
def scalaVersion = "2.12.17"
def semanticDbEnablePluginScalacOptions =
super.semanticDbEnablePluginScalacOptions() ++ Seq("-P:semanticdb:synthetics:on")
def scalafixIvyDeps = Agg(ivy"org.scala-lang.modules::scala-collection-migrations:2.12.0")
}

Expand Down
4 changes: 2 additions & 2 deletions itest/src/custom-rule/project/src/Fix.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ object Tuple2ZippedSrc213 {
def zipped(xs: List[Int], ys: List[Int]): Unit = {
(xs, ys).zipped
(xs, ys).zipped
((xs, ys) zipped)
((xs, ys).zipped)
(xs, ys).zipped
(xs, ys).zipped
(xs, ys).zipped
/* a */
( /* b */ xs /* c */, /* d */ ys /* e */ ) /* f */ . /* g */ zipped /* h */
Expand Down
2 changes: 1 addition & 1 deletion itest/src/fix-2.12/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import os._
object project extends ScalaModule with ScalafixModule {
def scalaVersion = "2.12.17"
def scalacOptions = Seq("-Ywarn-unused")
def ivyDeps = Agg(ivy"org.scala-lang.modules::scala-collection-compat:2.12.0")
def ivyDeps = Agg(ivy"org.scala-lang.modules::scala-collection-compat:2.12.0")
}

def verify() =
Expand Down
13 changes: 7 additions & 6 deletions itest/src/fix-3.5/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ object project extends ScalaModule with ScalafixModule {
def verify() =
T.command {
val fixedScala = read(pwd / "project" / "src" / "Fix.scala")
val expected = """object Fix {
| // use a 3.5.x-only feature to fail if a Scala 3 LTS compiler is used
| // https://www.scala-lang.org/blog/2024/08/22/scala-3.5.0-released.html#support-for-binary-integer-literals
| def myComplexMethod: Map[Int, String] = 1.to(0B1010).map(i => i -> i.toString).toMap
|}
|""".stripMargin
val expected =
"""object Fix {
| // use a 3.5.x-only feature to fail if a Scala 3 LTS compiler is used
| // https://www.scala-lang.org/blog/2024/08/22/scala-3.5.0-released.html#support-for-binary-integer-literals
| def myComplexMethod: Map[Int, String] = 1.to(0B1010).map(i => i -> i.toString).toMap
|}
|""".stripMargin
assert(fixedScala == expected)
}
4 changes: 2 additions & 2 deletions itest/src/fix-3.5/project/src/Fix.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
object Fix {
// use a 3.5.x-only feature to fail if a Scala 3 LTS compiler is used
// https://www.scala-lang.org/blog/2024/08/22/scala-3.5.0-released.html#support-for-binary-integer-literals
// use a 3.5.x-only feature to fail if a Scala 3 LTS compiler is used
// https://www.scala-lang.org/blog/2024/08/22/scala-3.5.0-released.html#support-for-binary-integer-literals
def myComplexMethod = 1.to(0B1010).map(i => i -> i.toString).toMap
}
4 changes: 2 additions & 2 deletions itest/src/fix/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import mill.scalalib._
import os._

object project extends ScalaModule with ScalafixModule {
def scalaVersion = "2.13.12"
def scalaVersion = "2.13.12"
def scalafixScalaBinaryVersion = mill.scalalib.api.ZincWorkerUtil.scalaBinaryVersion(scalaVersion())
def scalacOptions = Seq("-Ywarn-unused")
def scalacOptions = Seq("-Ywarn-unused")
}

def verify() =
Expand Down
Loading