Skip to content

Commit

Permalink
Merge pull request #4737 from kitbellew/4737
Browse files Browse the repository at this point in the history
Formatting: upgrade to v3.8.6
  • Loading branch information
kitbellew authored Jan 24, 2025
2 parents 08431bb + af38793 commit 9b13e8d
Show file tree
Hide file tree
Showing 8 changed files with 236 additions and 235 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ d0be16274e954a83074244df3e7f2fe35be92ac1
3b7b5616443ede7e3fe3bd9fa316a06e266c2a9b
da8534d89378be7d9b1db4032195abfea73e9619
b713da2d0fcee76fd27f6d2e6dbfacb15e2a1150
# v3.8.6
6489c56053a833ef10f4c9ab86e0974acceebc79
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.5
version=3.8.6
runner.dialect = scala213
project {
git = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,15 @@ class DynamicSuite extends FunSuite {
check("missing-version")(f => f.assertMissingVersion())

check("excluded-file") { f =>
val config = """|
|project.includeFilters = [
| ".*Spec\\.scala$"
|]
|project.excludeFilters = [
| "UserSpec\\.scala$"
|]
|"""
.stripMargin
val config =
"""|
|project.includeFilters = [
| ".*Spec\\.scala$"
|]
|project.excludeFilters = [
| "UserSpec\\.scala$"
|]
|""".stripMargin
def check(version: String): Unit = {
f.setVersion(version, "scala211", config)
f.assertNotIgnored("path/FooSpec.scala")
Expand All @@ -237,15 +237,15 @@ class DynamicSuite extends FunSuite {
}

check("ignore-exclude-filters", _.withRespectProjectFilters(false)) { f =>
val config = """|
|project.includeFilters = [
| ".*Spec\\.scala$"
|]
|project.excludeFilters = [
| "UserSpec\\.scala$"
|]
|"""
.stripMargin
val config =
"""|
|project.includeFilters = [
| ".*Spec\\.scala$"
|]
|project.excludeFilters = [
| "UserSpec\\.scala$"
|]
|""".stripMargin
def check(version: String): Unit = {
f.setVersion(version, "scala211", config)
f.assertNotIgnored("path/App.pm")
Expand Down Expand Up @@ -422,30 +422,30 @@ class DynamicSuite extends FunSuite {
checkExhaustive("continuation-indent-callSite-and-defnSite")(_ =>
"continuationIndent { callSite = 5, defnSite = 3 }",
) { (f, _) =>
val original = """|class A {
| function1(
| argument1,
| ""
| )
|
| def function2(
| argument1: Type1
| ): ReturnType
|}
| """
.stripMargin
val expected = """|class A {
| function1(
| argument1,
| ""
| )
|
| def function2(
| argument1: Type1
| ): ReturnType
|}
|"""
.stripMargin
val original =
"""|class A {
| function1(
| argument1,
| ""
| )
|
| def function2(
| argument1: Type1
| ): ReturnType
|}
| """.stripMargin
val expected =
"""|class A {
| function1(
| argument1,
| ""
| )
|
| def function2(
| argument1: Type1
| ): ReturnType
|}
|""".stripMargin
f.assertFormat(original, expected)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,31 @@ class CommunityIntellijScala_2024_2_Suite
dialects.Scala213,
3469,
excluded = "glob:**/{testdata,testData,resources}/**" :: Nil,
fileOverride = """|{
| "glob:**/sbt/sbt-impl/workspace-entities/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/structure-view/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/repl/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/tasty-reader/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/package-search-client/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/integration/textAnalysis/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/integration/features-trainer/**" {
| runner.dialect = scala33
| }
|}
|"""
.stripMargin,
fileOverride =
"""|{
| "glob:**/sbt/sbt-impl/workspace-entities/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/structure-view/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/repl/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/tasty-reader/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/package-search-client/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/integration/textAnalysis/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/integration/features-trainer/**" {
| runner.dialect = scala33
| }
|}
|""".stripMargin,
)
}

Expand All @@ -62,34 +62,34 @@ class CommunityIntellijScala_2024_3_Suite
dialects.Scala213,
3475,
excluded = "glob:**/{testdata,testData,resources}/**" :: Nil,
fileOverride = """|{
| "glob:**/sbt/sbt-impl/workspace-entities/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/structure-view/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/repl/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/tasty-reader/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/package-search-client/**" {
| runner.dialect = scala33
| }
| "glob:**/scalac-patches/scalac3-patches/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/integration/textAnalysis/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/integration/features-trainer/**" {
| runner.dialect = scala33
| }
|}
|"""
.stripMargin,
fileOverride =
"""|{
| "glob:**/sbt/sbt-impl/workspace-entities/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/structure-view/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/repl/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/tasty-reader/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/package-search-client/**" {
| runner.dialect = scala33
| }
| "glob:**/scalac-patches/scalac3-patches/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/integration/textAnalysis/**" {
| runner.dialect = scala33
| }
| "glob:**/scala/integration/features-trainer/**" {
| runner.dialect = scala33
| }
|}
|""".stripMargin,
)
}

Expand Down
102 changes: 51 additions & 51 deletions scalafmt-tests/shared/src/test/scala/org/scalafmt/CommentTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ class CommentTest extends FunSuite {
|val y = 2
|}
| """.stripMargin
val expected = """|object a {
| // inline comment
| /**
| * Y is cool
| */
| /*
| * X is cool
| */
| /*
| I have blank lines.
|
| Please preserve them.
| */
| val y = 2
|}
|"""
.stripMargin
val expected =
"""|object a {
| // inline comment
| /**
| * Y is cool
| */
| /*
| * X is cool
| */
| /*
| I have blank lines.
|
| Please preserve them.
| */
| val y = 2
|}
|""".stripMargin
val obtained = Scalafmt.format(original, javadocStyle).get
assertNoDiff(obtained, expected)
}
Expand All @@ -72,23 +72,23 @@ class CommentTest extends FunSuite {
|val y = 2
|}
| """.stripMargin
val expected = """|object a {
| // inline comment
| /**
| * Y is cool
| */
| /*
| * X is cool
| */
| /*
| I have blank lines.
|
| Please preserve them.
| */
| val y = 2
|}
|"""
.stripMargin
val expected =
"""|object a {
| // inline comment
| /**
| * Y is cool
| */
| /*
| * X is cool
| */
| /*
| I have blank lines.
|
| Please preserve them.
| */
| val y = 2
|}
|""".stripMargin
val obtained = Scalafmt.format(original, javadocStyle).get
assertNoDiff(obtained, expected)
}
Expand All @@ -112,23 +112,23 @@ class CommentTest extends FunSuite {
|val y = 2
|}
| """.stripMargin
val expected = """|object a {
| // inline comment
| /**
| * Y is cool
| */
| /*
| * X is cool
| */
| /*
| I have blank lines.
|
| Please preserve them.
| */
| val y = 2
|}
|"""
.stripMargin
val expected =
"""|object a {
| // inline comment
| /**
| * Y is cool
| */
| /*
| * X is cool
| */
| /*
| I have blank lines.
|
| Please preserve them.
| */
| val y = 2
|}
|""".stripMargin
val obtained = Scalafmt.format(original, javadocStyle).get
assertNoDiff(obtained, expected)
}
Expand Down
24 changes: 12 additions & 12 deletions scalafmt-tests/shared/src/test/scala/org/scalafmt/RangeTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ import munit.FunSuite

class RangeTest extends FunSuite {
test("range preserves indent") {
val original = """|object a {
|val x = 1
|val y = 2
|}
| """
.stripMargin
val expected = """|object a {
|val x = 1
| val y = 2
|}
| """
.stripMargin
val original =
"""|object a {
|val x = 1
|val y = 2
|}
| """.stripMargin
val expected =
"""|object a {
|val x = 1
| val y = 2
|}
| """.stripMargin
val obtained = Scalafmt
.format(original, HasTests.unitTest40, range = Set(Range(2, 2).inclusive))
.get
Expand Down
Loading

0 comments on commit 9b13e8d

Please sign in to comment.