From 2ae8fc5618bd430a47043d0329c21cbfefbbabd2 Mon Sep 17 00:00:00 2001 From: Scalameta Bot Date: Mon, 17 Feb 2025 01:11:57 +0000 Subject: [PATCH 1/3] build(deps): Update scalafmt-core from 3.8.6 to 3.9.0 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 40273548dae..61ac52b55ef 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.8.6" +version = "3.9.0" runner.dialect = scala213source3 project.git = true align.preset = none From 7ee123ac8e25d1c9cf07aac590d0c26358f6b35a Mon Sep 17 00:00:00 2001 From: Scalameta Bot Date: Mon, 17 Feb 2025 01:12:16 +0000 Subject: [PATCH 2/3] Reformat with scalafmt 3.9.0 Executed command: scalafmt --non-interactive --- .../main/scala/bench/CompletionBench.scala | 2 +- .../src/main/scala/bench/HoverBench.scala | 2 +- .../src/main/scala/docs/GenericModifier.scala | 8 ++-- .../main/scala/docs/NewProjectModifier.scala | 4 +- .../scala/docs/ParentLensesModifier.scala | 8 ++-- .../main/scala/docs/ScalafixModifier.scala | 4 +- .../scala/docs/TestFrameworksModifier.scala | 2 +- .../meta/internal/metals/ClientCommands.scala | 12 ++--- .../internal/metals/UserConfiguration.scala | 14 +++--- .../meta/metals/SupportedScalaVersions.scala | 2 +- project/Welcome.scala | 4 +- .../highlight/DocumentHighlightSuite.scala | 6 +-- .../Scala3DocumentHighlightSuite.scala | 2 +- .../SyntheticsDocumentHighlightSuite.scala | 30 ++++++------- .../scala/tests/hover/HoverDocSuite.scala | 8 ++-- .../tests/hover/HoverPlaintextSuite.scala | 2 +- .../tests/hover/HoverScala3TypeSuite.scala | 12 ++--- .../scala/tests/hover/HoverTermSuite.scala | 2 +- .../scala/tests/pc/CompletionArgSuite.scala | 10 ++--- .../scala/tests/pc/CompletionCaseSuite.scala | 22 +++++----- .../scala/tests/pc/CompletionIssueSuite.scala | 4 +- .../scala/tests/pc/CompletionMatchSuite.scala | 26 +++++------ .../tests/pc/CompletionOverrideAllSuite.scala | 4 +- .../tests/pc/CompletionSbtLibSuite.scala | 2 +- .../scala/tests/pc/ExtractMethodSuite.scala | 8 ++-- .../tests/pc/InlayHintsScala3Suite.scala | 8 ++-- .../test/scala/tests/pc/InlayHintsSuite.scala | 32 +++++++------- .../scala/tests/pc/PcPrepareRenameSuite.scala | 6 +-- .../test/scala/tests/pc/PcRenameSuite.scala | 14 +++--- .../tokens/SemanticTokensScala3Suite.scala | 2 +- .../tests/tokens/SemanticTokensSuite.scala | 8 ++-- .../pc/CompletionMemberSelectSuite.scala | 12 ++--- .../scala/tests/bazel/BazelLspSuite.scala | 2 +- .../feature/CompletionCrossLspSuite.scala | 4 +- .../feature/CrossAnalyzeStacktraceSuite.scala | 12 ++--- .../tests/feature/CrossCodeLensLspSuite.scala | 12 ++--- .../tests/feature/FoldingCrossLspSuite.scala | 4 +- .../feature/ImplementationCrossLspSuite.scala | 2 +- .../feature/InlayHintsFallbackSuite.scala | 2 +- .../scala/tests/sbt/CancelCompileSuite.scala | 2 +- .../scala/tests/sbt/SbtBloopLspSuite.scala | 12 ++--- .../scala/tests/scalacli/ScalaCliSuite.scala | 8 ++-- .../main/scala/tests/BaseAmmoniteSuite.scala | 2 +- .../tests/BaseAnalyzeStacktraceSuite.scala | 4 +- .../scala/tests/BaseCodeLensLspSuite.scala | 2 +- .../main/scala/tests/BuildServerLayout.scala | 12 ++--- .../tests/debug/BaseCrossDebugSuite.scala | 22 +++++----- .../test/scala/tests/AddPackageLspSuite.scala | 6 +-- .../tests/AnalyzeStacktraceLspSuite.scala | 2 +- .../scala/tests/CallHierarchyLspSuite.scala | 4 +- .../scala/tests/CancelCompileLspSuite.scala | 4 +- .../test/scala/tests/CodeLensLspSuite.scala | 4 +- .../test/scala/tests/DefinitionLspSuite.scala | 10 ++--- .../scala/tests/DiagnosticsLspSuite.scala | 2 +- .../src/test/scala/tests/HoverLspSuite.scala | 2 +- .../scala/tests/ImplementationLspSuite.scala | 2 +- .../test/scala/tests/JavaToplevelSuite.scala | 2 +- .../test/scala/tests/NewProjectLspSuite.scala | 2 +- .../scala/tests/RenameFilesLspSuite.scala | 44 +++++++++---------- .../src/test/scala/tests/RenameLspSuite.scala | 6 +-- .../src/test/scala/tests/ReportsSuite.scala | 4 +- .../test/scala/tests/ScalaToplevelSuite.scala | 4 +- .../scala/tests/SemanticTokensLspSuite.scala | 2 +- .../classFinder/ClassBreakpointSuite.scala | 8 ++-- .../ConvertPatternMatchLspSuite.scala | 4 +- .../ConvertSingleLineCommentLspSuite.scala | 4 +- .../ConvertToNamedArgumentsLspSuite.scala | 4 +- .../codeactions/ExtractMethodLspSuite.scala | 8 ++-- .../codeactions/ExtractValueLspSuite.scala | 6 +-- .../RewriteBracesParensLspSuite.scala | 2 +- .../tests/debug/CompletionDapSuite.scala | 2 +- .../formatting/OnTypeFormattingSuite.scala | 4 +- .../tests/inlayHints/InlayHintsLspSuite.scala | 8 ++-- .../IndentWhenPastingSuite.scala | 14 +++--- .../scalafix/ScalafixProviderLspSuite.scala | 22 +++++----- .../scalafix/ScalafixRunOnlyLspSuite.scala | 6 +-- 76 files changed, 288 insertions(+), 288 deletions(-) diff --git a/metals-bench/src/main/scala/bench/CompletionBench.scala b/metals-bench/src/main/scala/bench/CompletionBench.scala index 88ab893a019..fd993d915f9 100644 --- a/metals-bench/src/main/scala/bench/CompletionBench.scala +++ b/metals-bench/src/main/scala/bench/CompletionBench.scala @@ -31,7 +31,7 @@ class CompletionBench extends PcBenchmark { "A.scala", """| |object Main{ - | def foo = "" + | def foo = "" | fo |} |""".stripMargin, diff --git a/metals-bench/src/main/scala/bench/HoverBench.scala b/metals-bench/src/main/scala/bench/HoverBench.scala index cb20e66b5aa..91205d1c53f 100644 --- a/metals-bench/src/main/scala/bench/HoverBench.scala +++ b/metals-bench/src/main/scala/bench/HoverBench.scala @@ -25,7 +25,7 @@ class HoverBench extends PcBenchmark { """|package a | |object Main extends App{ - | + | |} |""".stripMargin, "object Main extends Ap@@p", diff --git a/metals-docs/src/main/scala/docs/GenericModifier.scala b/metals-docs/src/main/scala/docs/GenericModifier.scala index 8cb972a279c..f1fb87b35cd 100644 --- a/metals-docs/src/main/scala/docs/GenericModifier.scala +++ b/metals-docs/src/main/scala/docs/GenericModifier.scala @@ -14,10 +14,10 @@ class GenericModifier extends StringModifier { | |The Metals server places logs and other files in the `.metals` directory. The |Bloop compile server places logs and compilation artifacts in the `.bloop` - |directory. The Bloop plugin that generates Bloop configuration is added in the - |`metals.sbt` file, which is added at `project/metals.sbt` as well as further - |`project` directories depending on how deep `*.sbt` files need to be supported. - |To support each `*.sbt` file Metals needs to create an additional file at + |directory. The Bloop plugin that generates Bloop configuration is added in the + |`metals.sbt` file, which is added at `project/metals.sbt` as well as further + |`project` directories depending on how deep `*.sbt` files need to be supported. + |To support each `*.sbt` file Metals needs to create an additional file at |`./project/project/metals.sbt` relative to the sbt file. |Working with Ammonite scripts will place compiled scripts into the `.ammonite` directory. |It's recommended to exclude these directories and files diff --git a/metals-docs/src/main/scala/docs/NewProjectModifier.scala b/metals-docs/src/main/scala/docs/NewProjectModifier.scala index 269db31389f..2a554ccd28e 100644 --- a/metals-docs/src/main/scala/docs/NewProjectModifier.scala +++ b/metals-docs/src/main/scala/docs/NewProjectModifier.scala @@ -29,7 +29,7 @@ class NewProjectModifier extends StringModifier { else "" s"""|## Create new project from template | - |It is possible using Metals to easily setup a new project using the exiting [giter8](https://github.com/foundweekends/giter8/wiki/giter8-templates) templates. + |It is possible using Metals to easily setup a new project using the exiting [giter8](https://github.com/foundweekends/giter8/wiki/giter8-templates) templates. |This is an equivalent to the `sbt new` command, which uses the same mechanism. |There is a great number of templates already available and it should be easy to find something for yourself. |To start the setup you can use the $newScalaProject command, which works as following: @@ -42,7 +42,7 @@ class NewProjectModifier extends StringModifier { |$chooseWindow |$fromButtons | - |If you feel like a template should be included in the default displayed ones do not hesitate to create a + |If you feel like a template should be included in the default displayed ones do not hesitate to create a |[PR](https://github.com/scalameta/metals/blob/cda5b8c2029e5f201fb8d0636e0365d796407bd9/metals/src/main/scala/scala/meta/internal/builds/NewProjectProvider.scala#L308) |or file an issue. |""".stripMargin diff --git a/metals-docs/src/main/scala/docs/ParentLensesModifier.scala b/metals-docs/src/main/scala/docs/ParentLensesModifier.scala index 3a35066e82a..1038c891033 100644 --- a/metals-docs/src/main/scala/docs/ParentLensesModifier.scala +++ b/metals-docs/src/main/scala/docs/ParentLensesModifier.scala @@ -26,19 +26,19 @@ class ParentLensesModifier extends StringModifier { s"""|## Go to parent code lenses | - |Metals has the ability to display code lenses that, when invoked, + |Metals has the ability to display code lenses that, when invoked, |will go to the parent class that contains the definition of the method or symbol. - |Unfortunately, it might cause some lag in larger code bases, + |Unfortunately, it might cause some lag in larger code bases, |which is why it is not enabled currently by default. | |To enable the feature you need to modify the setting `metals.superMethodLensesEnabled` to `true`. | - |Even without using the code lenses it's still possible to navigate the method hierarchy + |Even without using the code lenses it's still possible to navigate the method hierarchy |using two commands: | | - `$gotoToSuper` - immediately goes to the parent of the method the cursor is pointing to | - | - `$superMethodHierarchy` - displays the full method hierachy and enables to move to any parent, + | - `$superMethodHierarchy` - displays the full method hierachy and enables to move to any parent, |it is best used with the Metals Quick Pick extension. |$additionalInfo |""".stripMargin diff --git a/metals-docs/src/main/scala/docs/ScalafixModifier.scala b/metals-docs/src/main/scala/docs/ScalafixModifier.scala index 2dde4792c81..d5aa90d5bb4 100644 --- a/metals-docs/src/main/scala/docs/ScalafixModifier.scala +++ b/metals-docs/src/main/scala/docs/ScalafixModifier.scala @@ -29,9 +29,9 @@ class ScalafixModifier extends StringModifier { |command `metals.scalafix-run`.${shortcut} |This should run all the rules defined in your `.scalafix.conf` file. All built-in rules |and the [community hygiene ones](https://scalacenter.github.io/scalafix/docs/rules/community-rules.html#hygiene-rules) can - |be run without any additional settings. However, for all the other rules users need to + |be run without any additional settings. However, for all the other rules users need to |add an additional dependency in the `metals.scalafixRulesDependencies` user setting. - |Those rules need to be in form of strings such as `com.github.liancheng::organize-imports:0.6.0`, which + |Those rules need to be in form of strings such as `com.github.liancheng::organize-imports:0.6.0`, which |follows the same convention as [coursier dependencies](https://get-coursier.io/). | |A sample scalafix configuration can be seen below: diff --git a/metals-docs/src/main/scala/docs/TestFrameworksModifier.scala b/metals-docs/src/main/scala/docs/TestFrameworksModifier.scala index e8852341060..0d59a188359 100644 --- a/metals-docs/src/main/scala/docs/TestFrameworksModifier.scala +++ b/metals-docs/src/main/scala/docs/TestFrameworksModifier.scala @@ -17,7 +17,7 @@ class TestFrameworksModifier extends StringModifier { | - Junit | - MUnit | - Scalatest - | - Weaver Test + | - Weaver Test |""".stripMargin } diff --git a/metals/src/main/scala/scala/meta/internal/metals/ClientCommands.scala b/metals/src/main/scala/scala/meta/internal/metals/ClientCommands.scala index b8e0f0c50b6..13946242c95 100644 --- a/metals/src/main/scala/scala/meta/internal/metals/ClientCommands.scala +++ b/metals/src/main/scala/scala/meta/internal/metals/ClientCommands.scala @@ -185,7 +185,7 @@ object ClientCommands { val StartRunSession = new Command( "metals-run-session-start", "Start run session", - s"""|Starts a run session. The address of a new Debug Adapter can be obtained + s"""|Starts a run session. The address of a new Debug Adapter can be obtained | by using the ${ServerCommands.StartDebugAdapter.id} metals server command | with the same arguments as provided to this command. """.stripMargin, @@ -208,7 +208,7 @@ object ClientCommands { val StartDebugSession = new Command( "metals-debug-session-start", "Start debug session", - s"""|Starts a debug session. The address of a new Debug Adapter can be obtained + s"""|Starts a debug session. The address of a new Debug Adapter can be obtained | by using the ${ServerCommands.StartDebugAdapter.id} metals server command | with the same arguments as provided to this command. """.stripMargin, @@ -308,10 +308,10 @@ object ClientCommands { "Goto location", "Move the cursor focus to the provided location", """|First required parameter is LSP `Location` object with `uri` and `range` fields. - |Second parameter is optional and has signature `otherWindow: Boolean`. + |Second parameter is optional and has signature `otherWindow: Boolean`. |It gives a hint to client that if possible it would be good to open location in |another buffer/window. - |Example: + |Example: |```json |[{ | "uri": "file://path/to/Definition.scala", @@ -331,7 +331,7 @@ object ClientCommands { "Open a specified folder either in the same or new window", """Open a new window with the specified directory.""".stripMargin, """|An object with `uri` and `newWindow` fields. - |Example: + |Example: |```json |{ | "uri": "file://path/to/directory", @@ -346,7 +346,7 @@ object ClientCommands { "Copy Worksheet Output", s"""|Copy the contents of a worksheet to your local buffer. | - |Note: This command should execute the ${ServerCommands.CopyWorksheetOutput.id} + |Note: This command should execute the ${ServerCommands.CopyWorksheetOutput.id} | server command to get the output to copy into the buffer. | |Server will attempt to create code lens with this command if `copyWorksheetOutputProvider` option is set. diff --git a/metals/src/main/scala/scala/meta/internal/metals/UserConfiguration.scala b/metals/src/main/scala/scala/meta/internal/metals/UserConfiguration.scala index 815042ffb2d..e112a8d8d21 100644 --- a/metals/src/main/scala/scala/meta/internal/metals/UserConfiguration.scala +++ b/metals/src/main/scala/scala/meta/internal/metals/UserConfiguration.scala @@ -329,8 +329,8 @@ object UserConfiguration { "false", "false", "Should display implicit parameter at usage sites", - """|When this option is enabled, each method that has implicit arguments has them - |displayed either as additional decorations if they are supported by the editor or + """|When this option is enabled, each method that has implicit arguments has them + |displayed either as additional decorations if they are supported by the editor or |shown in the hover. |""".stripMargin, ), @@ -339,8 +339,8 @@ object UserConfiguration { "false", "false", "Should display implicit conversion at usage sites", - """|When this option is enabled, each place where an implicit method or class is used has it - |displayed either as additional decorations if they are supported by the editor or + """|When this option is enabled, each place where an implicit method or class is used has it + |displayed either as additional decorations if they are supported by the editor or |shown in the hover. |""".stripMargin, ), @@ -387,7 +387,7 @@ object UserConfiguration { BuildInfo.scala3, BuildInfo.scala3, "Default fallback Scala version", - """|The Scala compiler version that is used as the default or fallback in case a file + """|The Scala compiler version that is used as the default or fallback in case a file |doesn't belong to any build target or the specified Scala version isn't supported by Metals. |This applies to standalone Scala files, worksheets, and Ammonite scripts. """.stripMargin, @@ -453,8 +453,8 @@ object UserConfiguration { "off", "all", "Import build when changes detected without prompting", - """|Automatically import builds rather than prompting the user to choose. "initial" will - |only automatically import a build when a project is first opened, "all" will automate + """|Automatically import builds rather than prompting the user to choose. "initial" will + |only automatically import a build when a project is first opened, "all" will automate |build imports after subsequent changes as well.""".stripMargin, ), UserConfigurationOption( diff --git a/metals/src/main/scala/scala/meta/metals/SupportedScalaVersions.scala b/metals/src/main/scala/scala/meta/metals/SupportedScalaVersions.scala index 3714b535d4d..ba1cafb0c0b 100644 --- a/metals/src/main/scala/scala/meta/metals/SupportedScalaVersions.scala +++ b/metals/src/main/scala/scala/meta/metals/SupportedScalaVersions.scala @@ -95,7 +95,7 @@ abstract class SupportedScalaVersions { |Scala 3 versions from 3.3.4 are automatically supported by Metals. | |Any older Scala versions will no longer get bugfixes, but should still - |work properly with newest Metals. + |work properly with newest Metals. |""".stripMargin ) } catch { diff --git a/project/Welcome.scala b/project/Welcome.scala index c94a194779a..a3f0edc1c24 100644 --- a/project/Welcome.scala +++ b/project/Welcome.scala @@ -3,8 +3,8 @@ import sbtwelcome._ object Welcome { val logo = - """| _ _ - | /\/\ ___| |_ __ _| |___ + """| _ _ + | /\/\ ___| |_ __ _| |___ | / \ / _ \ __/ _` | / __| |/ /\/\ \ __/ || (_| | \__ \ |\/ \/\___|\__\__,_|_|___/ diff --git a/tests/cross/src/test/scala/tests/highlight/DocumentHighlightSuite.scala b/tests/cross/src/test/scala/tests/highlight/DocumentHighlightSuite.scala index 9ce2fb726fd..3dc0bcdd8f0 100644 --- a/tests/cross/src/test/scala/tests/highlight/DocumentHighlightSuite.scala +++ b/tests/cross/src/test/scala/tests/highlight/DocumentHighlightSuite.scala @@ -59,7 +59,7 @@ class DocumentHighlightSuite extends BaseDocumentHighlightSuite { | val x = Foo( | foo = 123, | <> = 456 - | ) + | ) | |}""".stripMargin ) @@ -74,7 +74,7 @@ class DocumentHighlightSuite extends BaseDocumentHighlightSuite { | bar = 456 | ) | val y = x.<> - | + | | |}""".stripMargin ) @@ -1001,7 +1001,7 @@ class DocumentHighlightSuite extends BaseDocumentHighlightSuite { """ |object Main { | List(1).map { - | someLongName: Int => + | someLongName: Int => | val <> = 2 | someLongName + <> | } diff --git a/tests/cross/src/test/scala/tests/highlight/Scala3DocumentHighlightSuite.scala b/tests/cross/src/test/scala/tests/highlight/Scala3DocumentHighlightSuite.scala index 0a5121112aa..e4eed6e2810 100644 --- a/tests/cross/src/test/scala/tests/highlight/Scala3DocumentHighlightSuite.scala +++ b/tests/cross/src/test/scala/tests/highlight/Scala3DocumentHighlightSuite.scala @@ -496,7 +496,7 @@ class Scala3DocumentHighlightSuite extends BaseDocumentHighlightSuite { |object B { | extension (x: Int)(using Int) | def <>: Int = ??? - | + | | given Int = 42 | val bar = 42.<> |} diff --git a/tests/cross/src/test/scala/tests/highlight/SyntheticsDocumentHighlightSuite.scala b/tests/cross/src/test/scala/tests/highlight/SyntheticsDocumentHighlightSuite.scala index 58b3d58a702..36a74d02adf 100644 --- a/tests/cross/src/test/scala/tests/highlight/SyntheticsDocumentHighlightSuite.scala +++ b/tests/cross/src/test/scala/tests/highlight/SyntheticsDocumentHighlightSuite.scala @@ -8,11 +8,11 @@ class SyntheticsDocumentHighlightSuite extends BaseDocumentHighlightSuite { "advanced1", """ |object Main { - | for { - | abc <- Option(1) + | for { + | abc <- Option(1) | one = 1 | <> = one + abc - |} yield { + |} yield { | <>.toString.toList.map(_.toChar) | } |}""".stripMargin @@ -22,11 +22,11 @@ class SyntheticsDocumentHighlightSuite extends BaseDocumentHighlightSuite { "advanced2", """ |object Main { - | for { - | abc <- Option(1) + | for { + | abc <- Option(1) | one = 1 | <> = one + abc - |} yield { + |} yield { | <>.toString.toList.map(_.toChar) | } |}""".stripMargin @@ -36,11 +36,11 @@ class SyntheticsDocumentHighlightSuite extends BaseDocumentHighlightSuite { "advanced3", """ |object Main { - | for { - | <> <- Option(1) + | for { + | <> <- Option(1) | one = 1 | add = one + <> - |} yield { + |} yield { | <>.toString.toList.map(_.toChar) | } |}""".stripMargin @@ -50,11 +50,11 @@ class SyntheticsDocumentHighlightSuite extends BaseDocumentHighlightSuite { "advanced4", """ |object Main { - | for { - | <> <- Option(1) + | for { + | <> <- Option(1) | one = 1 | add = one + <> - |} yield { + |} yield { | <>.toString.toList.map(_.toChar) | } |}""".stripMargin @@ -64,11 +64,11 @@ class SyntheticsDocumentHighlightSuite extends BaseDocumentHighlightSuite { "advanced5", """ |object Main { - | for { - | <> <- Option(1) + | for { + | <> <- Option(1) | one = 1 | add = one + <> - |} yield { + |} yield { | <>.toString.toList.map(_.toChar) | } |}""".stripMargin diff --git a/tests/cross/src/test/scala/tests/hover/HoverDocSuite.scala b/tests/cross/src/test/scala/tests/hover/HoverDocSuite.scala index fb84e6534b4..b7dab8470f6 100644 --- a/tests/cross/src/test/scala/tests/hover/HoverDocSuite.scala +++ b/tests/cross/src/test/scala/tests/hover/HoverDocSuite.scala @@ -117,7 +117,7 @@ class HoverDocSuite extends BaseHoverSuite { check( "object", """| - |/** + |/** | * Doc about object | */ |object Alpha { @@ -139,7 +139,7 @@ class HoverDocSuite extends BaseHoverSuite { check( "object1", """| - |/** + |/** | * Doc about object | */ |object Alpha { @@ -170,7 +170,7 @@ class HoverDocSuite extends BaseHoverSuite { | */ |case class Alpha(x: Int) | - |/** + |/** | * Doc about object | */ |object Alpha { @@ -201,7 +201,7 @@ class HoverDocSuite extends BaseHoverSuite { | */ |case class Alpha(x: Int) | - |/** + |/** | * Doc about object | */ |object Alpha { diff --git a/tests/cross/src/test/scala/tests/hover/HoverPlaintextSuite.scala b/tests/cross/src/test/scala/tests/hover/HoverPlaintextSuite.scala index 3d8c93e662e..2af5a1dbb0a 100644 --- a/tests/cross/src/test/scala/tests/hover/HoverPlaintextSuite.scala +++ b/tests/cross/src/test/scala/tests/hover/HoverPlaintextSuite.scala @@ -18,7 +18,7 @@ class HoverPlaintextSuite extends BaseHoverSuite { check( "basic-plaintext", """| - |/** + |/** | * Some docstring | */ |case class Alpha(x: Int) { diff --git a/tests/cross/src/test/scala/tests/hover/HoverScala3TypeSuite.scala b/tests/cross/src/test/scala/tests/hover/HoverScala3TypeSuite.scala index e4f6a81ceef..65ee236a272 100644 --- a/tests/cross/src/test/scala/tests/hover/HoverScala3TypeSuite.scala +++ b/tests/cross/src/test/scala/tests/hover/HoverScala3TypeSuite.scala @@ -121,7 +121,7 @@ class HoverScala3TypeSuite extends BaseHoverSuite { |object Foo: | extension (s: String) | def double = s + s - | def double2 = s + s + | def double2 = s + s | end extension | "".<> |end Foo @@ -454,7 +454,7 @@ class HoverScala3TypeSuite extends BaseHoverSuite { | |object Repro { | def usage[A](f: ExtensionProvider ?=> A => Any): Any = ??? - | + | | usage[Option[Int]](_.infer@@redTypeArg("str")) |} |""".stripMargin, @@ -480,7 +480,7 @@ class HoverScala3TypeSuite extends BaseHoverSuite { | |object Repro { | def usage[A](f: ExtensionProvider ?=> A => Any): Any = ??? - | + | | usage[Option[Int]](_.infer@@redTypeArg[String]("str")) |} |""".stripMargin, @@ -506,7 +506,7 @@ class HoverScala3TypeSuite extends BaseHoverSuite { | |object Repro { | def usage[A](f: ExtensionProvider ?=> A => Any): Any = ??? - | + | | usage[Option[Int]](_.typeArg[Some[Int]].value.infer@@redTypeArg("str")) |} |""".stripMargin, @@ -532,7 +532,7 @@ class HoverScala3TypeSuite extends BaseHoverSuite { | |object Repro { | def usage[A](f: ExtensionProvider ?=> A => Any): Any = ??? - | + | | usage[Option[Int]](_.typeArg[Some[Int]].value.infer@@redTypeArg[String]("str")) |} |""".stripMargin, @@ -553,7 +553,7 @@ class HoverScala3TypeSuite extends BaseHoverSuite { |object B { | extension (x: Int)(using Int) | def foo: Int = ??? - | + | | given Int = 42 | val bar = 42.fo@@o |} diff --git a/tests/cross/src/test/scala/tests/hover/HoverTermSuite.scala b/tests/cross/src/test/scala/tests/hover/HoverTermSuite.scala index aea5e9ccbfb..86c7f215d3e 100644 --- a/tests/cross/src/test/scala/tests/hover/HoverTermSuite.scala +++ b/tests/cross/src/test/scala/tests/hover/HoverTermSuite.scala @@ -724,7 +724,7 @@ class HoverTermSuite extends BaseHoverSuite { """object Obj { | trait A extends Sup { self => | type T - | def member : T + | def member : T | } | val x: A { type T = Int} = ??? | diff --git a/tests/cross/src/test/scala/tests/pc/CompletionArgSuite.scala b/tests/cross/src/test/scala/tests/pc/CompletionArgSuite.scala index abc509fb301..9bd3ee30b91 100644 --- a/tests/cross/src/test/scala/tests/pc/CompletionArgSuite.scala +++ b/tests/cross/src/test/scala/tests/pc/CompletionArgSuite.scala @@ -421,12 +421,12 @@ class CompletionArgSuite extends BaseCompletionSuite { | test($f@@) |} |""".stripMargin, - """|$$foo = + """|$$foo = |$$foo = ${1:???}, | = ${2:???} |""".stripMargin, topLines = Option(2), compat = Map( - "3" -> """|$$foo = + "3" -> """|$$foo = |$$foo = ${1:???}, $$bar = ${2:???} |""".stripMargin ) @@ -1208,7 +1208,7 @@ class CompletionArgSuite extends BaseCompletionSuite { | bbb = 123, | aa@@ | ) - |} + |} |""".stripMargin, """|aaa = : Int |""".stripMargin, @@ -1224,7 +1224,7 @@ class CompletionArgSuite extends BaseCompletionSuite { | ccc = 123, | aa@@ | ) - |} + |} |""".stripMargin, """|aaa = : Int |""".stripMargin, @@ -1240,7 +1240,7 @@ class CompletionArgSuite extends BaseCompletionSuite { | ccc = 123, | aa@@ | ) - |} + |} |""".stripMargin, """|aaa = : Int |""".stripMargin, diff --git a/tests/cross/src/test/scala/tests/pc/CompletionCaseSuite.scala b/tests/cross/src/test/scala/tests/pc/CompletionCaseSuite.scala index f5caef1f4b1..04746fa5801 100644 --- a/tests/cross/src/test/scala/tests/pc/CompletionCaseSuite.scala +++ b/tests/cross/src/test/scala/tests/pc/CompletionCaseSuite.scala @@ -570,7 +570,7 @@ class CompletionCaseSuite extends BaseCompletionSuite { |case class Foo(a: Int, b: Int) | |object A { - | + | | List(Foo(1,2)).map{ cas@@ } |}""".stripMargin, """|case Foo(a, b) => example @@ -585,7 +585,7 @@ class CompletionCaseSuite extends BaseCompletionSuite { |object A { | val x: Vector = ??? | x match { - | ca@@ + | ca@@ | } |}""".stripMargin, """|case @@ -599,7 +599,7 @@ class CompletionCaseSuite extends BaseCompletionSuite { |object A { | private enum A: | case B, C - | def testMe(a: A) = + | def testMe(a: A) = | a match | cas@@ |}""".stripMargin, @@ -637,7 +637,7 @@ class CompletionCaseSuite extends BaseCompletionSuite { | |import Activity.* | - |def energySpend(act: Activity & (Physical | Chore)): Double = + |def energySpend(act: Activity & (Physical | Chore)): Double = | act match | cas@@ | @@ -667,7 +667,7 @@ class CompletionCaseSuite extends BaseCompletionSuite { | |import Activity.* | - |def energySpend(act: Activity & Physical): Double = + |def energySpend(act: Activity & Physical): Double = | act match | cas@@ | @@ -715,7 +715,7 @@ class CompletionCaseSuite extends BaseCompletionSuite { | | enum Animal: | case Cat, Dog - | + | | val animal: Id[Animal] = ??? | | animal match @@ -736,7 +736,7 @@ class CompletionCaseSuite extends BaseCompletionSuite { | case class Cat() extends Animal | case object Dog extends Animal |} - | + | | val animal: Id[Animal] = ??? | | animal match { @@ -818,7 +818,7 @@ class CompletionCaseSuite extends BaseCompletionSuite { | |object O { | val x: Foo | Bar = ??? - | val y = List(x).map{ + | val y = List(x).map{ |\tcase Foo(a) => $$0 |\tcase Bar(b) => | } @@ -833,7 +833,7 @@ class CompletionCaseSuite extends BaseCompletionSuite { |object A { | import scala.compiletime.summonFrom | class A - | + | | inline def f: Any = summonFrom { | case x@@: A => ??? // error: ambiguous givens | } @@ -847,11 +847,11 @@ class CompletionCaseSuite extends BaseCompletionSuite { """ |object A { | import scala.compiletime.summonFrom - | + | | class A | given a1: A = new A | given a2: A = new A - | + | | inline def f: Any = summonFrom { | case x@@: A => ??? // error: ambiguous givens | } diff --git a/tests/cross/src/test/scala/tests/pc/CompletionIssueSuite.scala b/tests/cross/src/test/scala/tests/pc/CompletionIssueSuite.scala index 925ef02aa46..d2843297141 100644 --- a/tests/cross/src/test/scala/tests/pc/CompletionIssueSuite.scala +++ b/tests/cross/src/test/scala/tests/pc/CompletionIssueSuite.scala @@ -257,7 +257,7 @@ class CompletionIssueSuite extends BaseCompletionSuite { """|import scala.concurrent.Future | |object OO { - | + | | def resolveActions(codeActions: List[Int]): Future[List[Int]] = { | val afterResolved = codeActions.map { | case action if act@@ => action @@ -269,7 +269,7 @@ class CompletionIssueSuite extends BaseCompletionSuite { """|import scala.concurrent.Future | |object OO { - | + | | def resolveActions(codeActions: List[Int]): Future[List[Int]] = { | val afterResolved = codeActions.map { | case action if action => action diff --git a/tests/cross/src/test/scala/tests/pc/CompletionMatchSuite.scala b/tests/cross/src/test/scala/tests/pc/CompletionMatchSuite.scala index fa21b3218f4..5f21ce63cff 100644 --- a/tests/cross/src/test/scala/tests/pc/CompletionMatchSuite.scala +++ b/tests/cross/src/test/scala/tests/pc/CompletionMatchSuite.scala @@ -562,7 +562,7 @@ class CompletionMatchSuite extends BaseCompletionSuite { | |import Activity.* | - |def energySpend(act: Activity & (Physical | Chore)): Double = + |def energySpend(act: Activity & (Physical | Chore)): Double = | act mat@@ | |""".stripMargin, @@ -583,7 +583,7 @@ class CompletionMatchSuite extends BaseCompletionSuite { | |import Activity.* | - |def energySpend(act: Activity & (Physical | Chore)): Double = + |def energySpend(act: Activity & (Physical | Chore)): Double = | act match |\tcase Sports(time, intensity) => $$0 |\tcase Cleaning => @@ -612,7 +612,7 @@ class CompletionMatchSuite extends BaseCompletionSuite { | |import Activity.* | - |def energySpend(act: Activity & Physical): Double = + |def energySpend(act: Activity & Physical): Double = | act mat@@ | |""".stripMargin, @@ -633,10 +633,10 @@ class CompletionMatchSuite extends BaseCompletionSuite { | |import Activity.* | - |def energySpend(act: Activity & Physical): Double = + |def energySpend(act: Activity & Physical): Double = | act match |\tcase Sports(time, intensity) => $$0 - |\tcase Cleaning => + |\tcase Cleaning => | |""".stripMargin, filter = _.contains("exhaustive") @@ -696,7 +696,7 @@ class CompletionMatchSuite extends BaseCompletionSuite { checkEdit( "exhaustive-rename".tag(IgnoreScala2), s"""|package b { - | enum Color: + | enum Color: | case Red, Blue, Green |} | @@ -708,7 +708,7 @@ class CompletionMatchSuite extends BaseCompletionSuite { |} |}""".stripMargin, s"""|package b { - | enum Color: + | enum Color: | case Red, Blue, Green |} | @@ -730,7 +730,7 @@ class CompletionMatchSuite extends BaseCompletionSuite { "stale-symbols".tag(IgnoreScala211), """ |package example - | + | |object Main { | val x: ScalaTargetType = ??? | val y = x match@@ @@ -756,7 +756,7 @@ class CompletionMatchSuite extends BaseCompletionSuite { | | enum Animal: | case Cat, Dog - | + | | val animal: Id[Animal] = ??? | | animal ma@@ @@ -767,7 +767,7 @@ class CompletionMatchSuite extends BaseCompletionSuite { | | enum Animal: | case Cat, Dog - | + | | val animal: Id[Animal] = ??? | | animal match @@ -789,7 +789,7 @@ class CompletionMatchSuite extends BaseCompletionSuite { | case object Cat extends Animal | case object Dog extends Animal |} - | + | | val animal: Id[Animal] = ??? | |animal ma@@ @@ -806,7 +806,7 @@ class CompletionMatchSuite extends BaseCompletionSuite { | case object Cat extends Animal | case object Dog extends Animal |} - | + | | val animal: Id[Animal] = ??? | |animal match { @@ -828,7 +828,7 @@ class CompletionMatchSuite extends BaseCompletionSuite { | case object Cat extends Animal | case object Dog extends Animal |} - | + | | val animal: Id[Animal] = ??? | |animal match diff --git a/tests/cross/src/test/scala/tests/pc/CompletionOverrideAllSuite.scala b/tests/cross/src/test/scala/tests/pc/CompletionOverrideAllSuite.scala index d0cc0a00250..1d3444449c2 100644 --- a/tests/cross/src/test/scala/tests/pc/CompletionOverrideAllSuite.scala +++ b/tests/cross/src/test/scala/tests/pc/CompletionOverrideAllSuite.scala @@ -381,7 +381,7 @@ class CompletionOverrideAllSuite extends BaseCompletionSuite { |import java.io.Externalizable | |object Main extends Externalizable { - | def@@ + | def@@ |} |""".stripMargin, """|package example @@ -394,7 +394,7 @@ class CompletionOverrideAllSuite extends BaseCompletionSuite { | def writeExternal(out: ObjectOutput): Unit = ${0:???} | | def readExternal(in: ObjectInput): Unit = ${0:???} - | + | |} |""".stripMargin, filter = _.contains("Implement") diff --git a/tests/cross/src/test/scala/tests/pc/CompletionSbtLibSuite.scala b/tests/cross/src/test/scala/tests/pc/CompletionSbtLibSuite.scala index 5d5606cb141..65c9dfea48f 100644 --- a/tests/cross/src/test/scala/tests/pc/CompletionSbtLibSuite.scala +++ b/tests/cross/src/test/scala/tests/pc/CompletionSbtLibSuite.scala @@ -9,7 +9,7 @@ class CompletionSbtLibSuite extends BaseCompletionSuite { check( "source", - """|val dependency = "io.cir@@" % + """|val dependency = "io.cir@@" % |""".stripMargin, """|io.circe |io.circul diff --git a/tests/cross/src/test/scala/tests/pc/ExtractMethodSuite.scala b/tests/cross/src/test/scala/tests/pc/ExtractMethodSuite.scala index 87c88a6f71c..51c487b1c59 100644 --- a/tests/cross/src/test/scala/tests/pc/ExtractMethodSuite.scala +++ b/tests/cross/src/test/scala/tests/pc/ExtractMethodSuite.scala @@ -74,7 +74,7 @@ class ExtractMethodSuite extends BaseExtractMethodSuite { |} | |object A{ - | + | | def newMethod(): String = { | val s: Simple = ??? | s.well("") @@ -89,7 +89,7 @@ class ExtractMethodSuite extends BaseExtractMethodSuite { |} | |object A{ - | + | | def newMethod(): String = | val s: Simple = ??? | s.well("") @@ -158,7 +158,7 @@ class ExtractMethodSuite extends BaseExtractMethodSuite { s"""|object A{ | val c = 3 | def method(i: Int, j: Int) = i + 1 - | @@val a = { + | @@val a = { | val c = 5 | val b = 4 | <<123 + method(c, b) + method(b,c)>> @@ -170,7 +170,7 @@ class ExtractMethodSuite extends BaseExtractMethodSuite { | def newMethod(b: Int, c: Int): Int = | 123 + method(c, b) + method(b,c) | - | val a = { + | val a = { | val c = 5 | val b = 4 | newMethod(b, c) diff --git a/tests/cross/src/test/scala/tests/pc/InlayHintsScala3Suite.scala b/tests/cross/src/test/scala/tests/pc/InlayHintsScala3Suite.scala index 390d3c16d78..c4a440bca04 100644 --- a/tests/cross/src/test/scala/tests/pc/InlayHintsScala3Suite.scala +++ b/tests/cross/src/test/scala/tests/pc/InlayHintsScala3Suite.scala @@ -228,7 +228,7 @@ class InlayHintsScala3Suite extends BaseInlayHintsSuite { | def matchTypeImpl[T: Type](param1: Expr[T])(using Quotes) = | import quotes.reflect.* | Type.of[T] match - | case '[f] => + | case '[f] => | val fr = TypeRepr.of[T] |""".stripMargin, """|package example @@ -237,7 +237,7 @@ class InlayHintsScala3Suite extends BaseInlayHintsSuite { | def matchTypeImpl[T: Type](param1: Expr[T])(using Quotes)/*: Unit<>*/ = | import quotes.reflect.* | Type.of[T] match - | case '[f] => + | case '[f] => | val fr/*: TypeRepr<>*/ = TypeRepr.of[T]/*(using evidence$1<<(3:21)>>)*/ |""".stripMargin ) @@ -247,14 +247,14 @@ class InlayHintsScala3Suite extends BaseInlayHintsSuite { """|package example |import scala.quoted.* |object O: - | def rec[A : Type](using Quotes): List[String] = + | def rec[A : Type](using Quotes): List[String] = | Type.of[A] match | case '[field *: fields] => ??? |""".stripMargin, """|package example |import scala.quoted.* |object O: - | def rec[A : Type](using Quotes): List[String] = + | def rec[A : Type](using Quotes): List[String] = | Type.of[A] match | case '[field *: fields] => ??? |""".stripMargin diff --git a/tests/cross/src/test/scala/tests/pc/InlayHintsSuite.scala b/tests/cross/src/test/scala/tests/pc/InlayHintsSuite.scala index e151c0a1d20..ab3ad3e4e7a 100644 --- a/tests/cross/src/test/scala/tests/pc/InlayHintsSuite.scala +++ b/tests/cross/src/test/scala/tests/pc/InlayHintsSuite.scala @@ -436,15 +436,15 @@ class InlayHintsSuite extends BaseInlayHintsSuite { "partial-fun".tag(IgnoreScalaVersion.forLessThan("2.13.0")), """|object Main { | List(1).collect { case x => x } - | val x: PartialFunction[Int, Int] = { - | case 1 => 2 + | val x: PartialFunction[Int, Int] = { + | case 1 => 2 | } |} |""".stripMargin, """|object Main { | List/*[Int<>]*/(1).collect/*[Int<>]*/ { case x => x } - | val x: PartialFunction[Int, Int] = { - | case 1 => 2 + | val x: PartialFunction[Int, Int] = { + | case 1 => 2 | } |} |""".stripMargin @@ -719,11 +719,11 @@ class InlayHintsSuite extends BaseInlayHintsSuite { |object O { | val head :: tail = List(1) | List(1) match { - | case head :: next => + | case head :: next => | case Nil => | } | Option(Option(1)) match { - | case Some(Some(value)) => + | case Some(Some(value)) => | case None => | } | val (local, _) = ("", 1.0) @@ -740,11 +740,11 @@ class InlayHintsSuite extends BaseInlayHintsSuite { |object O { | val head :: tail = List/*[Int<>]*/(1) | List/*[Int<>]*/(1) match { - | case head :: next => + | case head :: next => | case Nil => | } | Option/*[Option<>[Int<>]]*/(Option/*[Int<>]*/(1)) match { - | case Some(Some(value)) => + | case Some(Some(value)) => | case None => | } | val (local, _) = ("", 1.0) @@ -763,11 +763,11 @@ class InlayHintsSuite extends BaseInlayHintsSuite { |object O { | val head :: tail = List/*[Int<>]*/(1) | List/*[Int<>]*/(1) match { - | case head :: next => + | case head :: next => | case Nil => | } | Option/*[Option<>[Int<>]]*/(Option/*[Int<>]*/(1)) match { - | case Some(Some(value)) => + | case Some(Some(value)) => | case None => | } | val (local, _) = ("", 1.0) @@ -789,11 +789,11 @@ class InlayHintsSuite extends BaseInlayHintsSuite { |object O { | val head :: tail = List(1) | List(1) match { - | case head :: next => + | case head :: next => | case Nil => | } | Option(Option(1)) match { - | case Some(Some(value)) => + | case Some(Some(value)) => | case None => | } | val (local, _) = ("", 1.0) @@ -810,11 +810,11 @@ class InlayHintsSuite extends BaseInlayHintsSuite { |object O { | val head/*: Int<>*/ :: tail/*: List<>[Int<>]*/ = List/*[Int<>]*/(1) | List/*[Int<>]*/(1) match { - | case head/*: Int<>*/ :: next/*: List<>[Int<>]*/ => + | case head/*: Int<>*/ :: next/*: List<>[Int<>]*/ => | case Nil => | } | Option/*[Option<>[Int<>]]*/(Option/*[Int<>]*/(1)) match { - | case Some(Some(value/*: Int<>*/)) => + | case Some(Some(value/*: Int<>*/)) => | case None => | } | val (local/*: String<>*/, _) = ("", 1.0) @@ -833,11 +833,11 @@ class InlayHintsSuite extends BaseInlayHintsSuite { |object O { | val head/*: Int<>*/ :: tail/*: List<>[Int<>]*/ = List/*[Int<>]*/(1) | List/*[Int<>]*/(1) match { - | case head/*: Int<>*/ :: next/*: List<>[Int<>]*/ => + | case head/*: Int<>*/ :: next/*: List<>[Int<>]*/ => | case Nil => | } | Option/*[Option<>[Int<>]]*/(Option/*[Int<>]*/(1)) match { - | case Some(Some(value/*: Int<>*/)) => + | case Some(Some(value/*: Int<>*/)) => | case None => | } | val (local/*: String<>*/, _) = ("", 1.0) diff --git a/tests/cross/src/test/scala/tests/pc/PcPrepareRenameSuite.scala b/tests/cross/src/test/scala/tests/pc/PcPrepareRenameSuite.scala index 20bfffb5ee4..b90fd831b37 100644 --- a/tests/cross/src/test/scala/tests/pc/PcPrepareRenameSuite.scala +++ b/tests/cross/src/test/scala/tests/pc/PcPrepareRenameSuite.scala @@ -27,8 +27,8 @@ class PcPrepareRenameSuite extends BasePcRenameSuite { | |object Renaming { | def m() = { - | import scala.util.{Try => StdLibTry} - | def foo(n: Int): StdLib@@Try[Int] = + | import scala.util.{Try => StdLibTry} + | def foo(n: Int): StdLib@@Try[Int] = | StdLibTryprepare(n) | } |} @@ -166,7 +166,7 @@ class PcPrepareRenameSuite extends BasePcRenameSuite { prepare( "colon-bad", - """|package a + """|package a |object Main{ | def m() = { | class User{ diff --git a/tests/cross/src/test/scala/tests/pc/PcRenameSuite.scala b/tests/cross/src/test/scala/tests/pc/PcRenameSuite.scala index 2c707f68edb..890c76d5e88 100644 --- a/tests/cross/src/test/scala/tests/pc/PcRenameSuite.scala +++ b/tests/cross/src/test/scala/tests/pc/PcRenameSuite.scala @@ -24,7 +24,7 @@ class PcRenameSuite extends BasePcRenameSuite { check( "basic", """|val <> = 123 - |<<@@a>> + 1 + |<<@@a>> + 1 |""".stripMargin ) @@ -35,7 +35,7 @@ class PcRenameSuite extends BasePcRenameSuite { | val <> = 123 | <<@@a>> + 1 | } - |} + |} |""".stripMargin, wrap = false ) @@ -48,7 +48,7 @@ class PcRenameSuite extends BasePcRenameSuite { | A(123) | A.apply(123) | } - |} + |} |""".stripMargin, wrap = false ) @@ -61,7 +61,7 @@ class PcRenameSuite extends BasePcRenameSuite { | A(123) | A.apply(123) | } - |} + |} |""".stripMargin, wrap = false ) @@ -478,7 +478,7 @@ class PcRenameSuite extends BasePcRenameSuite { | val <<`to-Rename`>> = 123 |} |object B{ - | val toRename = + | val toRename = | List( | A.<<`to-R@@ename`>>, | A.<<`to-Rename`>>, @@ -522,7 +522,7 @@ class PcRenameSuite extends BasePcRenameSuite { | def <>(f: Int => Int): Bar = Bar(x.map(f)) |} | - |val f = + |val f = | for { | b <- Bar(List(1,2,3)) | } yield b @@ -548,7 +548,7 @@ class PcRenameSuite extends BasePcRenameSuite { check( "end-marker-wrong".tag(IgnoreScala2), """|def <> = - | def bar = + | def bar = | ??? | end bar""".stripMargin ) diff --git a/tests/cross/src/test/scala/tests/tokens/SemanticTokensScala3Suite.scala b/tests/cross/src/test/scala/tests/tokens/SemanticTokensScala3Suite.scala index a42493a0986..9e0f38ccda5 100644 --- a/tests/cross/src/test/scala/tests/tokens/SemanticTokensScala3Suite.scala +++ b/tests/cross/src/test/scala/tests/tokens/SemanticTokensScala3Suite.scala @@ -188,7 +188,7 @@ class SemanticTokensScala3Suite extends BaseSemanticTokensSuite { |object <>/*class*/ { | extension (<>/*parameter,declaration,readonly*/: <>/*class,abstract*/)(using <>/*class,abstract*/) | def <>/*method,definition*/: <>/*class,abstract*/ = <>/*method*/ - | + | | given <>/*class,abstract*/ = 42 | val <>/*variable,definition,readonly*/ = 42.<>/*method*/ |} diff --git a/tests/cross/src/test/scala/tests/tokens/SemanticTokensSuite.scala b/tests/cross/src/test/scala/tests/tokens/SemanticTokensSuite.scala index e7f68679838..97acc3853e1 100644 --- a/tests/cross/src/test/scala/tests/tokens/SemanticTokensSuite.scala +++ b/tests/cross/src/test/scala/tests/tokens/SemanticTokensSuite.scala @@ -222,7 +222,7 @@ class SemanticTokensSuite extends BaseSemanticTokensSuite { check( "anonymous-class", - s"""|package <>/*namespace*/ + s"""|package <>/*namespace*/ |object <>/*class*/ { | trait <>/*interface,abstract*/[<>/*typeParameter,declaration,abstract*/] { | def <>/*method,declaration,abstract*/(<>/*parameter,declaration,readonly*/: <>/*typeParameter,abstract*/): <>/*class,abstract*/ @@ -237,7 +237,7 @@ class SemanticTokensSuite extends BaseSemanticTokensSuite { |}""".stripMargin, // In Scala 3 methods in `trait` are not abstract compat = Map( - "3" -> s"""|package <>/*namespace*/ + "3" -> s"""|package <>/*namespace*/ |object <>/*class*/ { | trait <>/*interface,abstract*/[<>/*typeParameter,definition,abstract*/] { | def <>/*method,declaration*/(<>/*parameter,declaration,readonly*/: <>/*typeParameter,abstract*/): <>/*class,abstract*/ @@ -270,12 +270,12 @@ class SemanticTokensSuite extends BaseSemanticTokensSuite { s"""|package <>/*namespace*/ | |class <>/*class*/ { - | + | | val <>/*variable,definition,readonly*/ = <>/*variable,readonly*/ match { | case <>/*class*/(<>/*class*/(<>/*variable,definition,readonly*/)) => <>/*variable,readonly*/ | case <>/*class*/(<>/*variable,definition,readonly*/) => <>/*variable,readonly*/ - | case <>/*variable,definition,readonly*/ => + | case <>/*variable,definition,readonly*/ => | } |}""".stripMargin ) diff --git a/tests/javapc/src/test/scala/pc/CompletionMemberSelectSuite.scala b/tests/javapc/src/test/scala/pc/CompletionMemberSelectSuite.scala index e1716bdffb0..30041c72706 100644 --- a/tests/javapc/src/test/scala/pc/CompletionMemberSelectSuite.scala +++ b/tests/javapc/src/test/scala/pc/CompletionMemberSelectSuite.scala @@ -53,7 +53,7 @@ class CompletionMemberSelectSuite extends BaseJavaCompletionSuite { "after-statement", """ |class Perfect { - | + | | void println() { | String name = "Tom"; | name.sub@@ @@ -71,7 +71,7 @@ class CompletionMemberSelectSuite extends BaseJavaCompletionSuite { "same-line", """ |class Perfect { - | + | | void println() { | String name = "Tom"; | name.sub@@ System.out.println("Perfect " + name); @@ -88,7 +88,7 @@ class CompletionMemberSelectSuite extends BaseJavaCompletionSuite { "inside-parens-no-space", """ |class Perfect { - | + | | void println() { | String name = "Tom"; | System.out.println(name.sub@@); @@ -105,7 +105,7 @@ class CompletionMemberSelectSuite extends BaseJavaCompletionSuite { "inside-word", """ |class Perfect { - | + | | void println() { | String name = "Tom"; | System.out.println(name.sub@@S ); @@ -122,7 +122,7 @@ class CompletionMemberSelectSuite extends BaseJavaCompletionSuite { "empty-select", """ |class Perfect { - | + | | void println() { | Perfect perfect = new Perfect(); | perfect.@@ @@ -151,7 +151,7 @@ class CompletionMemberSelectSuite extends BaseJavaCompletionSuite { |import java.util.concurrent.CompletableFuture; | |class Perfect { - | + | | void println() { | CompletableFuture.@@ | } diff --git a/tests/slow/src/test/scala/tests/bazel/BazelLspSuite.scala b/tests/slow/src/test/scala/tests/bazel/BazelLspSuite.scala index 79fe1db0ade..6f2e42bf378 100644 --- a/tests/slow/src/test/scala/tests/bazel/BazelLspSuite.scala +++ b/tests/slow/src/test/scala/tests/bazel/BazelLspSuite.scala @@ -250,7 +250,7 @@ class BazelLspSuite | |class Hello { | def hello: String = "Hello" - | + | | val asd: A = ??? | asd match { | case B(_) => diff --git a/tests/slow/src/test/scala/tests/feature/CompletionCrossLspSuite.scala b/tests/slow/src/test/scala/tests/feature/CompletionCrossLspSuite.scala index bfff8b79145..cd76ae02e01 100644 --- a/tests/slow/src/test/scala/tests/feature/CompletionCrossLspSuite.scala +++ b/tests/slow/src/test/scala/tests/feature/CompletionCrossLspSuite.scala @@ -237,7 +237,7 @@ class CompletionCrossLspSuite _ <- initialize( s"""/metals.json |{ - | "a": { + | "a": { | "scalaVersion": "${V.scala3}", | "libraryDependencies": [ | "org.virtuslab::iskra:0.0.3" @@ -248,7 +248,7 @@ class CompletionCrossLspSuite | |import org.virtuslab.iskra.api.* |import org.virtuslab.iskra.api.given - | + | |given spark: SparkSession = SparkSession | .builder() | .master("local") diff --git a/tests/slow/src/test/scala/tests/feature/CrossAnalyzeStacktraceSuite.scala b/tests/slow/src/test/scala/tests/feature/CrossAnalyzeStacktraceSuite.scala index 0461ecdef99..1aa865a8488 100644 --- a/tests/slow/src/test/scala/tests/feature/CrossAnalyzeStacktraceSuite.scala +++ b/tests/slow/src/test/scala/tests/feature/CrossAnalyzeStacktraceSuite.scala @@ -15,9 +15,9 @@ class CrossAnalyzeStacktraceSuite |<<1>> throw new Exception("") | |@main - |def main() = + |def main() = |<<2>> fetch() - | + | |def fetch(a: Int) = a + 2 |""".stripMargin, """|Exception in thread "main" java.lang.Exception: @@ -37,9 +37,9 @@ class CrossAnalyzeStacktraceSuite |<<1>> throw new Exception("") | |@main - |def main() = + |def main() = |<<2>> fetch() - | + | |def fetch(a: Int) = a + 2 |""".stripMargin, """|Exception in thread "main" java.lang.Exception: @@ -61,9 +61,9 @@ class CrossAnalyzeStacktraceSuite |<<1>> throw new Exception("") | |@main - |def main() = + |def main() = |<<2>> fetch() - | + | |def fetch(a: Int) = a + 2 |""".stripMargin, """|Exception in thread "main" java.lang.Exception: diff --git a/tests/slow/src/test/scala/tests/feature/CrossCodeLensLspSuite.scala b/tests/slow/src/test/scala/tests/feature/CrossCodeLensLspSuite.scala index 1d489ad5488..cb3793fd69c 100644 --- a/tests/slow/src/test/scala/tests/feature/CrossCodeLensLspSuite.scala +++ b/tests/slow/src/test/scala/tests/feature/CrossCodeLensLspSuite.scala @@ -34,7 +34,7 @@ class CrossCodeLensLspSuite extends BaseCodeLensLspSuite("cross-code-lens") { |} | |object Main { - | def main(args: Array[String]): Unit = + | def main(args: Array[String]): Unit = | println("Hello again!") |} |""".stripMargin @@ -51,7 +51,7 @@ class CrossCodeLensLspSuite extends BaseCodeLensLspSuite("cross-code-lens") { | |<><> |object Main { - | def main(args: Array[String]): Unit = + | def main(args: Array[String]): Unit = | println("Hello again!") |} |""".stripMargin, @@ -64,7 +64,7 @@ class CrossCodeLensLspSuite extends BaseCodeLensLspSuite("cross-code-lens") { |} | |object Main { - | def main(args: Array[String]): Unit = + | def main(args: Array[String]): Unit = | println("Hello again!") |} |""".stripMargin @@ -79,7 +79,7 @@ class CrossCodeLensLspSuite extends BaseCodeLensLspSuite("cross-code-lens") { | |<><> |object Main { - | def main(args: Array[String]): Unit = + | def main(args: Array[String]): Unit = | println("Hello again!") |} |""".stripMargin, @@ -93,7 +93,7 @@ class CrossCodeLensLspSuite extends BaseCodeLensLspSuite("cross-code-lens") { |} | |//object Main { - |// def main(args: Array[String]): Unit = + |// def main(args: Array[String]): Unit = |// println("Hello again!") |//} |""".stripMargin @@ -109,7 +109,7 @@ class CrossCodeLensLspSuite extends BaseCodeLensLspSuite("cross-code-lens") { |} | |//object Main { - |// def main(args: Array[String]): Unit = + |// def main(args: Array[String]): Unit = |// println("Hello again!") |//} |""".stripMargin, diff --git a/tests/slow/src/test/scala/tests/feature/FoldingCrossLspSuite.scala b/tests/slow/src/test/scala/tests/feature/FoldingCrossLspSuite.scala index 3a8670485a7..f89df373bed 100644 --- a/tests/slow/src/test/scala/tests/feature/FoldingCrossLspSuite.scala +++ b/tests/slow/src/test/scala/tests/feature/FoldingCrossLspSuite.scala @@ -63,7 +63,7 @@ class FoldingCrossLspSuite extends BaseLspSuite("foldingRange-cross") { | false | } | val args = List.empty[String] - | func(args*) + | func(args*) |} |""".stripMargin ) @@ -83,7 +83,7 @@ class FoldingCrossLspSuite extends BaseLspSuite("foldingRange-cross") { | false | }< c.toInt) | implicit val ec: scala.concurrent.ExecutionContext = scala.concurrent.ExecutionContext.global diff --git a/tests/slow/src/test/scala/tests/sbt/CancelCompileSuite.scala b/tests/slow/src/test/scala/tests/sbt/CancelCompileSuite.scala index c5722c80e61..2a9fd9be2ef 100644 --- a/tests/slow/src/test/scala/tests/sbt/CancelCompileSuite.scala +++ b/tests/slow/src/test/scala/tests/sbt/CancelCompileSuite.scala @@ -48,7 +48,7 @@ class CancelCompileSuite |package b |object B { | a.A.sleep() - | val x = a.A.x + | val x = a.A.x |} |/c/src/main/scala/c/C.scala |package c diff --git a/tests/slow/src/test/scala/tests/sbt/SbtBloopLspSuite.scala b/tests/slow/src/test/scala/tests/sbt/SbtBloopLspSuite.scala index 0c6c9fce7e4..9ab17ba4ddb 100644 --- a/tests/slow/src/test/scala/tests/sbt/SbtBloopLspSuite.scala +++ b/tests/slow/src/test/scala/tests/sbt/SbtBloopLspSuite.scala @@ -733,7 +733,7 @@ class SbtBloopLspSuite _ <- initialize( s"""|/build.sbt |def foo(): String = "2.13.2" - |def bar(): String = foo() + |def bar(): String = foo() |scalaVersion := "2.13.2" """.stripMargin ) @@ -744,7 +744,7 @@ class SbtBloopLspSuite |def foo(): String = "2.13.2" | ^^^ |build.sbt:2:21: info: reference - |def bar(): String = foo() + |def bar(): String = foo() | ^^^ |""".stripMargin, ) @@ -757,20 +757,20 @@ class SbtBloopLspSuite _ <- initialize( s"""|/build.sbt |def foo(): String = "2.13.2" - |def bar(): String = foo() + |def bar(): String = foo() |scalaVersion := "2.13.2" """.stripMargin ) _ <- server.assertRename( "build.sbt", s"""|def foo(): String = "2.13.2" - |def bar(): String = foo@@() + |def bar(): String = foo@@() |scalaVersion := "2.13.2" """.stripMargin, Map( "build.sbt" -> s"""|def foo2(): String = "2.13.2" - |def bar(): String = foo2() + |def bar(): String = foo2() |scalaVersion := "2.13.2" """.stripMargin ), @@ -835,7 +835,7 @@ class SbtBloopLspSuite _ <- initialize( s"""|/build.sbt |def foo() = "2.13.2" - |def bar() = foo() + |def bar() = foo() |scalaVersion := "2.13.2" """.stripMargin ) diff --git a/tests/slow/src/test/scala/tests/scalacli/ScalaCliSuite.scala b/tests/slow/src/test/scala/tests/scalacli/ScalaCliSuite.scala index 407b9ac5827..b188583f9dd 100644 --- a/tests/slow/src/test/scala/tests/scalacli/ScalaCliSuite.scala +++ b/tests/slow/src/test/scala/tests/scalacli/ScalaCliSuite.scala @@ -92,14 +92,14 @@ class ScalaCliSuite extends BaseScalaCliSuite("3.3.3") { for { _ <- scalaCliInitialize(useBsp)( s"""/MyTests.sc - |#!/usr/bin/env -S scala-cli shebang --java-opt -Xms256m --java-opt -XX:MaxRAMPercentage=80 + |#!/usr/bin/env -S scala-cli shebang --java-opt -Xms256m --java-opt -XX:MaxRAMPercentage=80 |//> using scala "$scalaVersion" |//> using dep "com.lihaoyi::utest::0.7.10" |//> using dep com.lihaoyi::pprint::0.6.6 | |import foo.Foo |import utest._ - | + | |pprint.log(2) // top-level statement should be fine in a script | |object MyTests extends TestSuite { @@ -196,14 +196,14 @@ class ScalaCliSuite extends BaseScalaCliSuite("3.3.3") { _ <- server.didOpen("MyTests.sc") _ <- server.assertInlayHints( "MyTests.sc", - s"""|#!/usr/bin/env -S scala-cli shebang --java-opt -Xms256m --java-opt -XX:MaxRAMPercentage=80 + s"""|#!/usr/bin/env -S scala-cli shebang --java-opt -Xms256m --java-opt -XX:MaxRAMPercentage=80 |//> using scala "$scalaVersion" |//> using dep "com.lihaoyi::utest::0.7.10" |//> using dep com.lihaoyi::pprint::0.6.6 | |import foo.Foo |import utest._ - | + | |pprint.log/*[Int<>]*/(2)/*(using generate<>, generate<>)*/ // top-level statement should be fine in a script | |object MyTests extends TestSuite { diff --git a/tests/unit/src/main/scala/tests/BaseAmmoniteSuite.scala b/tests/unit/src/main/scala/tests/BaseAmmoniteSuite.scala index 993ffb54f9e..765a61ae118 100644 --- a/tests/unit/src/main/scala/tests/BaseAmmoniteSuite.scala +++ b/tests/unit/src/main/scala/tests/BaseAmmoniteSuite.scala @@ -271,7 +271,7 @@ abstract class BaseAmmoniteSuite(scalaVersion: String) |/b/otherScript.sc | // scala $scalaVersion |val a = "" - | + | |/b/other.sc | // scala $scalaVersion |val a = "" diff --git a/tests/unit/src/main/scala/tests/BaseAnalyzeStacktraceSuite.scala b/tests/unit/src/main/scala/tests/BaseAnalyzeStacktraceSuite.scala index fde1cab9837..ee2e0cd5ab4 100644 --- a/tests/unit/src/main/scala/tests/BaseAnalyzeStacktraceSuite.scala +++ b/tests/unit/src/main/scala/tests/BaseAnalyzeStacktraceSuite.scala @@ -44,8 +44,8 @@ abstract class BaseAnalyzeStacktraceSuite(name: String) _ <- initialize( s""" |/metals.json - |{ - | "a": { + |{ + | "a": { | "scalaVersion": "$scalaVersion", | "libraryDependencies": [ $dependency ] | } diff --git a/tests/unit/src/main/scala/tests/BaseCodeLensLspSuite.scala b/tests/unit/src/main/scala/tests/BaseCodeLensLspSuite.scala index f4251884937..b1994179c5d 100644 --- a/tests/unit/src/main/scala/tests/BaseCodeLensLspSuite.scala +++ b/tests/unit/src/main/scala/tests/BaseCodeLensLspSuite.scala @@ -146,7 +146,7 @@ abstract class BaseCodeLensLspSuite( _ <- initialize( s"""|/metals.json |{ - | "a": { + | "a": { | "libraryDependencies" : [ ${wrap(library)} ], | "compilerPlugins" : [ ${wrap(plugin)} ], | "scalaVersion": "$actualScalaVersion" diff --git a/tests/unit/src/main/scala/tests/BuildServerLayout.scala b/tests/unit/src/main/scala/tests/BuildServerLayout.scala index 938eb8d07f2..3ebd23b5f7d 100644 --- a/tests/unit/src/main/scala/tests/BuildServerLayout.scala +++ b/tests/unit/src/main/scala/tests/BuildServerLayout.scala @@ -16,8 +16,8 @@ object QuickBuildLayout extends BuildToolLayout { scalaVersion: String, ): String = { s"""|/metals.json - |{ - | "a": {"scalaVersion": "$scalaVersion"}, "b": {"scalaVersion": "$scalaVersion"} + |{ + | "a": {"scalaVersion": "$scalaVersion"}, "b": {"scalaVersion": "$scalaVersion"} |} |$sourceLayout |""".stripMargin @@ -80,7 +80,7 @@ object MillBuildLayout extends BuildToolLayout { | def ivyDeps = Agg( | ivy"$dep" | ) - | } + | } |""".stripMargin case _ => "" } @@ -165,11 +165,11 @@ object BazelBuildLayout extends BuildToolLayout { | |load("@io_bazel_rules_scala//scala:scala.bzl", "rules_scala_setup", "rules_scala_toolchain_deps_repositories") | - |# loads other rules Rules Scala depends on + |# loads other rules Rules Scala depends on |rules_scala_setup() | - |# Loads Maven deps like Scala compiler and standard libs. On production projects you should consider - |# defining a custom deps toolchains to use your project libs instead + |# Loads Maven deps like Scala compiler and standard libs. On production projects you should consider + |# defining a custom deps toolchains to use your project libs instead |rules_scala_toolchain_deps_repositories(fetch_sources = True) | |load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") diff --git a/tests/unit/src/main/scala/tests/debug/BaseCrossDebugSuite.scala b/tests/unit/src/main/scala/tests/debug/BaseCrossDebugSuite.scala index f865a65f406..81bf6ddeab9 100644 --- a/tests/unit/src/main/scala/tests/debug/BaseCrossDebugSuite.scala +++ b/tests/unit/src/main/scala/tests/debug/BaseCrossDebugSuite.scala @@ -21,7 +21,7 @@ abstract class BaseCrossDebugSuite( source = """|/a/src/main/scala/a/Main.scala |package a | - |@main + |@main |def helloWorld(): Unit = { |>>println("Hello world") | System.exit(0) @@ -37,15 +37,15 @@ abstract class BaseCrossDebugSuite( source = """|/a/src/main/scala/a/Main.scala |package a | - |@main + |@main |def helloWorld(): Unit = { | object Even { |>> def unapply(s: String): Boolean = s.size % 2 == 0 | } | | "even" match { - | case Even() => - | case _ => + | case Even() => + | case _ => | } | System.exit(0) |} @@ -60,7 +60,7 @@ abstract class BaseCrossDebugSuite( source = """|/a/src/main/scala/a/Main.scala |package a | - |@main + |@main |def helloWorld(): Unit = { | object Hello{ | def run() = { @@ -82,12 +82,12 @@ abstract class BaseCrossDebugSuite( source = """|/a/src/main/scala/a/Main.scala |package a | - |@main - |def hello(): Unit = + |@main + |def hello(): Unit = | greet("Alice") | System.exit(0) | - |def greet(name: String) = + |def greet(name: String) = |>>val message = s"Hello, $name!" |>>println(message) | @@ -101,12 +101,12 @@ abstract class BaseCrossDebugSuite( source = """|/a/src/main/scala/a/Main.scala |package a | - |@main - |def hello(): Unit = + |@main + |def hello(): Unit = |>>greet("Alice") |>>System.exit(0) | - |def greet(name: String) = + |def greet(name: String) = | val message = s"Hello, $name!" | println(message) | diff --git a/tests/unit/src/test/scala/tests/AddPackageLspSuite.scala b/tests/unit/src/test/scala/tests/AddPackageLspSuite.scala index 7e1a7dc76fb..67171181cdb 100644 --- a/tests/unit/src/test/scala/tests/AddPackageLspSuite.scala +++ b/tests/unit/src/test/scala/tests/AddPackageLspSuite.scala @@ -29,7 +29,7 @@ class AddPackageLspSuite extends BaseLspSuite("add-package") { check("package-file")( "a/src/main/scala/a/package.scala", """|package object a { - | + | |} |""".stripMargin, ) @@ -39,7 +39,7 @@ class AddPackageLspSuite extends BaseLspSuite("add-package") { """|package a.b | |package object c { - | + | |} |""".stripMargin, ) @@ -73,7 +73,7 @@ class AddPackageLspSuite extends BaseLspSuite("add-package") { """|package `type`.a | |package object `this` { - | + | |} |""".stripMargin, ) diff --git a/tests/unit/src/test/scala/tests/AnalyzeStacktraceLspSuite.scala b/tests/unit/src/test/scala/tests/AnalyzeStacktraceLspSuite.scala index 71e9da86e06..c9fedfa4a58 100644 --- a/tests/unit/src/test/scala/tests/AnalyzeStacktraceLspSuite.scala +++ b/tests/unit/src/test/scala/tests/AnalyzeStacktraceLspSuite.scala @@ -125,7 +125,7 @@ class AnalyzeStacktraceLspSuite |<<4>>object Main extends IOApp.Simple { |<<2>> val io = IO(5) | override def run: IO[Unit] = io - |<<3>> .map { _ => + |<<3>> .map { _ => |<<1>> throw new Exception | () | } diff --git a/tests/unit/src/test/scala/tests/CallHierarchyLspSuite.scala b/tests/unit/src/test/scala/tests/CallHierarchyLspSuite.scala index 25184bab72d..08b53c00953 100644 --- a/tests/unit/src/test/scala/tests/CallHierarchyLspSuite.scala +++ b/tests/unit/src/test/scala/tests/CallHierarchyLspSuite.scala @@ -520,7 +520,7 @@ class CallHierarchyLspSuite extends BaseCallHierarchySuite("call-hierarchy") { |object Main { | def <>/*1*/(user: User) { | user match { - | case ?>/*1*/(name, age) => + | case ?>/*1*/(name, age) => | println(s"My name is $name and I'm $age") | } | } @@ -550,7 +550,7 @@ class CallHierarchyLspSuite extends BaseCallHierarchySuite("call-hierarchy") { |object Main { | def fo@@o(user: User) { | user match { - | case ?>/*1,2*/(name, age) => + | case ?>/*1,2*/(name, age) => | println(s"My name is $name and I'm $age") | } | } diff --git a/tests/unit/src/test/scala/tests/CancelCompileLspSuite.scala b/tests/unit/src/test/scala/tests/CancelCompileLspSuite.scala index 42fe4cac273..502efa1bf29 100644 --- a/tests/unit/src/test/scala/tests/CancelCompileLspSuite.scala +++ b/tests/unit/src/test/scala/tests/CancelCompileLspSuite.scala @@ -36,9 +36,9 @@ class CancelCompileLspSuite extends BaseLspSuite("compile-cancel") { | |/b/src/main/scala/b/B.scala |package b - |object B { + |object B { | a.A.sleep() - | val x = a.A.x + | val x = a.A.x |} |/c/src/main/scala/c/C.scala |package c diff --git a/tests/unit/src/test/scala/tests/CodeLensLspSuite.scala b/tests/unit/src/test/scala/tests/CodeLensLspSuite.scala index 78fa310219e..586fff254ce 100644 --- a/tests/unit/src/test/scala/tests/CodeLensLspSuite.scala +++ b/tests/unit/src/test/scala/tests/CodeLensLspSuite.scala @@ -59,7 +59,7 @@ class CodeLensLspSuite extends BaseCodeLensLspSuite("codeLenses") { """|<><> |package foo.bar | - |import dfhdl.* + |import dfhdl.* |@top class Foo extends EDDesign | |<><> @@ -320,7 +320,7 @@ class CodeLensLspSuite extends BaseCodeLensLspSuite("codeLenses") { | |object X { | def main = { - | class A { def afx(): Unit = ??? } + | class A { def afx(): Unit = ??? } | val t = new A { |<< afx goto-position[{"uri":"${workspace.toURI}a/src/main/scala/a/Foo.scala","range":{"start":{"line":4,"character":18},"end":{"line":4,"character":21}}}]>> | override def afx(): Unit = ??? diff --git a/tests/unit/src/test/scala/tests/DefinitionLspSuite.scala b/tests/unit/src/test/scala/tests/DefinitionLspSuite.scala index 439f5bdf879..5107f0b122d 100644 --- a/tests/unit/src/test/scala/tests/DefinitionLspSuite.scala +++ b/tests/unit/src/test/scala/tests/DefinitionLspSuite.scala @@ -465,8 +465,8 @@ class DefinitionLspSuite s""" |/metals.json |{ - | "a": { - | "libraryDependencies" : ["com.thoughtworks.dsl::dsl:2.0.0-M0+1-b691cde8"] + | "a": { + | "libraryDependencies" : ["com.thoughtworks.dsl::dsl:2.0.0-M0+1-b691cde8"] | } |} |/a/src/main/scala/example/MainA.scala @@ -519,7 +519,7 @@ class DefinitionLspSuite |} |/a/src/main/scala/a/Main.scala |class A( - | a: Int, + | a: Int, | b: Int |) {} |object Main { @@ -533,7 +533,7 @@ class DefinitionLspSuite server.workspaceDefinitions, """|/a/src/main/scala/a/Main.scala |class A/*L0*/( - | a/*L1*/: Int/*Int.scala*/, + | a/*L1*/: Int/*Int.scala*/, | b/*L2*/: Int/*Int.scala*/ |) {} |object Main/*L4*/ { @@ -657,7 +657,7 @@ class DefinitionLspSuite s""" |/metals.json |{ - | "a": { + | "a": { | "libraryDependencies": [ | "com.daml:bindings-rxjava:2.0.0" | ] diff --git a/tests/unit/src/test/scala/tests/DiagnosticsLspSuite.scala b/tests/unit/src/test/scala/tests/DiagnosticsLspSuite.scala index 132b4e8a6dd..d087d5baff0 100644 --- a/tests/unit/src/test/scala/tests/DiagnosticsLspSuite.scala +++ b/tests/unit/src/test/scala/tests/DiagnosticsLspSuite.scala @@ -365,7 +365,7 @@ class DiagnosticsLspSuite extends BaseLspSuite("diagnostics") { _ = assertNoDiff( client.workspaceDiagnostics, """|a/src/main/scala/a/A.scala:2:16: error: unclosed string literal - | val n: Int = " + | val n: Int = " | ^ |""".stripMargin, ) diff --git a/tests/unit/src/test/scala/tests/HoverLspSuite.scala b/tests/unit/src/test/scala/tests/HoverLspSuite.scala index ea29008b8a5..65e6bd45f5e 100644 --- a/tests/unit/src/test/scala/tests/HoverLspSuite.scala +++ b/tests/unit/src/test/scala/tests/HoverLspSuite.scala @@ -46,7 +46,7 @@ class HoverLspSuite extends BaseLspSuite("hover-") with TestHovers { |{ | "a": { | "scalaVersion": "${V.scala213}", - | "libraryDependencies" : [ "org.scala-lang:scala-reflect:${V.scala213}"] + | "libraryDependencies" : [ "org.scala-lang:scala-reflect:${V.scala213}"] | } |} |/a/src/main/scala/Main.scala diff --git a/tests/unit/src/test/scala/tests/ImplementationLspSuite.scala b/tests/unit/src/test/scala/tests/ImplementationLspSuite.scala index 40e473bb76a..68782557b41 100644 --- a/tests/unit/src/test/scala/tests/ImplementationLspSuite.scala +++ b/tests/unit/src/test/scala/tests/ImplementationLspSuite.scala @@ -559,7 +559,7 @@ class ImplementationLspSuite extends BaseImplementationSuite("implementation") { "type-implementation", """|/a/src/main/scala/a/Main.scala |trait Test { - | type C@@C + | type C@@C |} | |trait Other extends Test { diff --git a/tests/unit/src/test/scala/tests/JavaToplevelSuite.scala b/tests/unit/src/test/scala/tests/JavaToplevelSuite.scala index cbe82b2436a..5562dbd69a8 100644 --- a/tests/unit/src/test/scala/tests/JavaToplevelSuite.scala +++ b/tests/unit/src/test/scala/tests/JavaToplevelSuite.scala @@ -15,7 +15,7 @@ class JavaToplevelSuite extends BaseToplevelSuite { | */ |public class Abc { | public static void main(String[] args) { - | System.out.println("asdsad"); + | System.out.println("asdsad"); | // comment | } | public static void foo(int a, int, b) { diff --git a/tests/unit/src/test/scala/tests/NewProjectLspSuite.scala b/tests/unit/src/test/scala/tests/NewProjectLspSuite.scala index c349e06dc4d..9960102aee1 100644 --- a/tests/unit/src/test/scala/tests/NewProjectLspSuite.scala +++ b/tests/unit/src/test/scala/tests/NewProjectLspSuite.scala @@ -519,7 +519,7 @@ object NewProjectLspSuite { |(Akka Streams and Kafka) |- [shigemk2/minimal-akka-scala.g8](https://github.com/shigemk2/minimal-akka-scala.g8) |(very simple and minimal akka-scala template) - |- [mhamrah/sbt.g8](https://github.com/mhamrah/sbt.g8) + |- [mhamrah/sbt.g8](https://github.com/mhamrah/sbt.g8) |(A slimmer version of [ymasory's sbt](https://github.com/ymasory/sbt.g8) project with typesafe config, logback, scalatest and akka. Features a [spray](http://spray.io) option via `g8 mhamrah/sbt -b spray`.) |- [cfeduke/akka-scala-sbt.g8](https://github.com/cfeduke/akka-scala-sbt.g8) |(**2014**. Akka 2.2, Scala) diff --git a/tests/unit/src/test/scala/tests/RenameFilesLspSuite.scala b/tests/unit/src/test/scala/tests/RenameFilesLspSuite.scala index 0d341b55886..7423618bd2d 100644 --- a/tests/unit/src/test/scala/tests/RenameFilesLspSuite.scala +++ b/tests/unit/src/test/scala/tests/RenameFilesLspSuite.scala @@ -12,7 +12,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { "identity", s"""|/$prefix/A/Sun.scala |package A - |object Sun + |object Sun |""".stripMargin, fileRenames = Map(s"$prefix/A/Sun.scala" -> s"$prefix/A/Sun.scala"), expectedRenames = Map.empty, @@ -35,7 +35,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { renamed( "no-package", s"""|/$prefix/A/Sun.scala - |object Sun + |object Sun |""".stripMargin, fileRenames = Map(s"$prefix/A/Sun.scala" -> s"$prefix/A/Sun.scala"), expectedRenames = Map.empty, @@ -46,7 +46,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { "single-package", s"""|/$prefix/A/Sun.scala |package <> - |object Sun + |object Sun |""".stripMargin, fileRenames = Map(s"$prefix/A/Sun.scala" -> s"$prefix/A/B/Sun.scala"), expectedRenames = Map("A" -> "A.B"), @@ -57,7 +57,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { "outside-workspace", s"""|/$prefix/A/Sun.scala |package A - |object Sun + |object Sun |""".stripMargin, fileRenames = Map( s"$prefix/A/Sun.scala" -> Files.createTempFile("Sun", ".scala").toString() @@ -69,7 +69,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { "single-package-non-matching-structure", s"""|/$prefix/A/B/Sun.scala |package A - |object Sun + |object Sun |""".stripMargin, fileRenames = Map(s"$prefix/A/B/Sun.scala" -> s"$prefix/A/C/Sun.scala"), expectedRenames = Map(), @@ -94,7 +94,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { s"""|/$prefix/A/B/Sun.scala |package A |package <> - |object Sun + |object Sun |""".stripMargin, fileRenames = Map(s"$prefix/A/B/Sun.scala" -> s"$prefix/A/C/Sun.scala"), expectedRenames = Map("B" -> "C"), @@ -166,7 +166,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { s"""|/$prefix/A/B/Sun.scala |package A |package <> - |object Sun + |object Sun |""".stripMargin, fileRenames = Map(s"$prefix/A/B/Sun.scala" -> s"$prefix/A/C/B/Sun.scala"), expectedRenames = Map("B" -> "C.B"), @@ -177,7 +177,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { s"""|/$prefix/A/B/Sun.scala |package A |package <> - |object Sun + |object Sun |""".stripMargin, fileRenames = Map(s"$prefix/A/B/Sun.scala" -> s"$prefix/A/B/C/Sun.scala"), expectedRenames = Map("B" -> "B.C"), @@ -202,10 +202,10 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { "multi-package-dir-to-less-nested", s"""|/$prefix/A/B/Sun.scala |package <> - |object Sun + |object Sun |/$prefix/A/B/Moon.scala |package <> - |object Moon + |object Moon |""".stripMargin, fileRenames = Map( s"$prefix/A/B" -> s"$prefix/A" @@ -234,7 +234,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { "package-object", s"""|/$prefix/A/B/packageFile.scala |<> - |package object <> + |package object <> |""".stripMargin, fileRenames = Map( s"$prefix/A/B" -> s"$prefix/C/D" @@ -248,11 +248,11 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { "references-simple-file-move", s"""|/$prefix/A/Sun.scala |package <> - |object Sun + |object Sun |/$prefix/B/Moon.scala |package B |import <>.Sun - |object Moon + |object Moon |""".stripMargin, fileRenames = Map(s"$prefix/A/Sun.scala" -> s"$prefix/C/Sun.scala"), expectedRenames = Map("A" -> "C"), @@ -304,7 +304,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { |/$prefix/X/Moon.scala |package X |import <>.<>.Sun - |object Moon + |object Moon |""".stripMargin, fileRenames = Map(s"$prefix/A/B" -> s"$prefix/C/D"), expectedRenames = Map("B" -> "D", "A" -> "C"), @@ -328,7 +328,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { "references-same-package-no-imports", s"""|/$prefix/A/Mars.scala |package <> - |object Phobos + |object Phobos |object Deimos |/$prefix/A/Earth.scala |package A @@ -558,7 +558,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { s"""|/$prefix/A/Sun.scala |package <> |object Sun - |object Moon + |object Moon |/$prefix/B/Moon.scala |package B |import < _, _}>> @@ -576,7 +576,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { s"""|/$prefix/A/Sun.scala |package <> |object Sun - |object Moon + |object Moon |/$prefix/B/Moon.scala |package B |import <> @@ -614,7 +614,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { "qualified-refs", s"""|/$prefix/A/B/Sun.scala |package <>.B - |object Sun + |object Sun |/$prefix/X/Moon.scala |package X | @@ -674,7 +674,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { "qualified-refs-dir-move", s"""|/$prefix/A/B/Sun.scala |package <>.B - |object Sun + |object Sun |/$prefix/X/Moon.scala |package X | @@ -691,7 +691,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { "partially-qualified-names", s"""|/$prefix/A/B/Sun.scala |package A.<> - |object Sun + |object Sun |/$prefix/X/Moon.scala |package X |import A.B @@ -892,7 +892,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { "do-not-make-changes-when-outside-of-root", s"""|/$prefix/A/Sun.scala |package A - |object Sun + |object Sun |""".stripMargin, fileRenames = Map(s"$prefix/A/Sun.scala" -> s"random/path/Sun.scala"), expectedRenames = Map.empty, @@ -923,7 +923,7 @@ class RenameFilesLspSuite extends BaseRenameFilesLspSuite("rename_files") { "unsupported-package-renames".ignore, s"""|/$prefix/A/B/Sun.scala |package A.<> - |object Sun + |object Sun |/$prefix/X/Moon.scala |package X |import A.{<> => BB} diff --git a/tests/unit/src/test/scala/tests/RenameLspSuite.scala b/tests/unit/src/test/scala/tests/RenameLspSuite.scala index a2d0f1af639..21af4189e8b 100644 --- a/tests/unit/src/test/scala/tests/RenameLspSuite.scala +++ b/tests/unit/src/test/scala/tests/RenameLspSuite.scala @@ -75,7 +75,7 @@ class RenameLspSuite extends BaseRenameLspSuite(s"rename") { |import scala.util.{Try => <>} | |object Renaming { - | def foo(n: Int): <>[Int] = + | def foo(n: Int): <>[Int] = | <>(n) |} |""".stripMargin, @@ -471,7 +471,7 @@ class RenameLspSuite extends BaseRenameLspSuite(s"rename") { | | <> other; | public <>(){ - | + | | } |} |/a/src/main/scala/a/Main.scala @@ -491,7 +491,7 @@ class RenameLspSuite extends BaseRenameLspSuite(s"rename") { | | <> other; | public <>(){ - | + | | } |} |/a/src/main/scala/a/Main.scala diff --git a/tests/unit/src/test/scala/tests/ReportsSuite.scala b/tests/unit/src/test/scala/tests/ReportsSuite.scala index 51e0fa4ed07..ab5b722bc0c 100644 --- a/tests/unit/src/test/scala/tests/ReportsSuite.scala +++ b/tests/unit/src/test/scala/tests/ReportsSuite.scala @@ -52,7 +52,7 @@ class ReportsSuite extends BaseSuite { new String(Files.readAllBytes(path.get), StandardCharsets.UTF_8) assertNoDiff( s"""|${exampleText(StdReportContext.WORKSPACE_STR)} - |#### Short summary: + |#### Short summary: | |Test error report. |""".stripMargin, @@ -131,7 +131,7 @@ class ReportsSuite extends BaseSuite { assertNoDiff( s"""|error id: $testId |${exampleText(StdReportContext.WORKSPACE_STR)} - |#### Short summary: + |#### Short summary: | |Test error |""".stripMargin, diff --git a/tests/unit/src/test/scala/tests/ScalaToplevelSuite.scala b/tests/unit/src/test/scala/tests/ScalaToplevelSuite.scala index a96b0b8a1a3..70121866d58 100644 --- a/tests/unit/src/test/scala/tests/ScalaToplevelSuite.scala +++ b/tests/unit/src/test/scala/tests/ScalaToplevelSuite.scala @@ -441,7 +441,7 @@ class ScalaToplevelSuite extends BaseToplevelSuite { |given `given_Float`: Float = 3.0 |given `* *` : Long = 5 |given [T]: List[T] = - | val m = 3 + | val m = 3 | ??? |given listOrd[T](using ord: List[T]): List[List[T]] = ??? |""".stripMargin, @@ -564,7 +564,7 @@ class ScalaToplevelSuite extends BaseToplevelSuite { """|class A: | for | _ <- Some(1) - | _ <- + | _ <- | def a(i: Int) = if i > 0 then Some(i) else None | a(3) | yield () diff --git a/tests/unit/src/test/scala/tests/SemanticTokensLspSuite.scala b/tests/unit/src/test/scala/tests/SemanticTokensLspSuite.scala index f8e732f85cb..5030b8d4c5d 100644 --- a/tests/unit/src/test/scala/tests/SemanticTokensLspSuite.scala +++ b/tests/unit/src/test/scala/tests/SemanticTokensLspSuite.scala @@ -156,7 +156,7 @@ class SemanticTokensLspSuite extends BaseLspSuite("SemanticTokens") { | <>/*keyword*/ <>/*variable,definition*/ = <<123>>/*number*/ | <>/*keyword*/ <>/*variable,definition*/ = <>/*variable*/ <<+>>/*method,abstract*/ <<2>>/*number*/ | <>/*variable*/ = <>/*variable*/ <<->>/*method,abstract*/ <<2>>/*number*/ - | <>/*class*/.<>/*variable*/ = <>/*class*/.<>/*variable*/ + | <>/*class*/.<>/*variable*/ = <>/*class*/.<>/*variable*/ | | <>/*keyword*/ <>/*method,definition*/() = { | <>/*keyword*/ <>/*variable,definition*/ = <<3>>/*number*/ diff --git a/tests/unit/src/test/scala/tests/classFinder/ClassBreakpointSuite.scala b/tests/unit/src/test/scala/tests/classFinder/ClassBreakpointSuite.scala index d754950bbc5..46c83b9c23d 100644 --- a/tests/unit/src/test/scala/tests/classFinder/ClassBreakpointSuite.scala +++ b/tests/unit/src/test/scala/tests/classFinder/ClassBreakpointSuite.scala @@ -128,7 +128,7 @@ class ClassBreakpointSuite extends BaseClassFinderSuite { "inner-class-scala3", """|package a | - |@main + |@main |def helloWorld(): Unit = { | object Even { |>> def unapply(s: String): Boolean = s.size % 2 == 0 @@ -144,13 +144,13 @@ class ClassBreakpointSuite extends BaseClassFinderSuite { "optional-braces", """|package a | - |@main - |def hello(): Unit = + |@main + |def hello(): Unit = | greet("Alice") | greet("Bob") | System.exit(0) | - |def greet(name: String) = + |def greet(name: String) = | val message = s"Hello, $name!" |>>println(message) | diff --git a/tests/unit/src/test/scala/tests/codeactions/ConvertPatternMatchLspSuite.scala b/tests/unit/src/test/scala/tests/codeactions/ConvertPatternMatchLspSuite.scala index 4e1e85e4b71..5e231e0acdb 100644 --- a/tests/unit/src/test/scala/tests/codeactions/ConvertPatternMatchLspSuite.scala +++ b/tests/unit/src/test/scala/tests/codeactions/ConvertPatternMatchLspSuite.scala @@ -17,7 +17,7 @@ class ConvertPatternMatchLspSuite "with-placeholder", """|object Main { | var x = 0 - | List(1,2).map { + | List(1,2).map { | _ match { | case 1 => { | x = <<1>> @@ -35,7 +35,7 @@ class ConvertPatternMatchLspSuite PatternMatchRefactor.convertPatternMatch, """|object Main { | var x = 0 - | List(1,2).map { + | List(1,2).map { | case 1 => { | x = 1 | Nil diff --git a/tests/unit/src/test/scala/tests/codeactions/ConvertSingleLineCommentLspSuite.scala b/tests/unit/src/test/scala/tests/codeactions/ConvertSingleLineCommentLspSuite.scala index 60a8701c379..3e3c76c187a 100644 --- a/tests/unit/src/test/scala/tests/codeactions/ConvertSingleLineCommentLspSuite.scala +++ b/tests/unit/src/test/scala/tests/codeactions/ConvertSingleLineCommentLspSuite.scala @@ -126,7 +126,7 @@ class ConvertSingleLineCommentLspSuite checkNoAction( "show no action when cursor is before line comment", """| - |<<>> // start + |<<>> // start |""".stripMargin, fileName = "script.sc", ) @@ -259,7 +259,7 @@ class ConvertSingleLineCommentLspSuite checkNoAction( "should not show action when cursor is after block comment", """|val a = 1 - |/* comment middle */ <<>> + |/* comment middle */ <<>> |val b = 2""".stripMargin, fileName = "script2.sc", ) diff --git a/tests/unit/src/test/scala/tests/codeactions/ConvertToNamedArgumentsLspSuite.scala b/tests/unit/src/test/scala/tests/codeactions/ConvertToNamedArgumentsLspSuite.scala index 16261e49ba0..5e1dbe8196d 100644 --- a/tests/unit/src/test/scala/tests/codeactions/ConvertToNamedArgumentsLspSuite.scala +++ b/tests/unit/src/test/scala/tests/codeactions/ConvertToNamedArgumentsLspSuite.scala @@ -240,12 +240,12 @@ class ConvertToNamedArgumentsLspSuite check( "block", """|class C { - | def f(o: Int) = 1 + | def f(o: Int) = 1 | val g = f({<<>>2}) |}""".stripMargin, s"${ConvertToNamedArguments.title("f(...)")}", """|class C { - | def f(o: Int) = 1 + | def f(o: Int) = 1 | val g = f(o = {2}) |}""".stripMargin, filterAction = filterAction, diff --git a/tests/unit/src/test/scala/tests/codeactions/ExtractMethodLspSuite.scala b/tests/unit/src/test/scala/tests/codeactions/ExtractMethodLspSuite.scala index 8c1b6bfc6ce..0e39506ca52 100644 --- a/tests/unit/src/test/scala/tests/codeactions/ExtractMethodLspSuite.scala +++ b/tests/unit/src/test/scala/tests/codeactions/ExtractMethodLspSuite.scala @@ -62,7 +62,7 @@ class ExtractMethodLspSuite |} | |object A{ - | + | | <> |}""".stripMargin, @@ -73,7 +73,7 @@ class ExtractMethodLspSuite |} | |object A{ - | + | | def newMethod(): String = { | val s: Simple = ??? | s.well("") @@ -138,7 +138,7 @@ class ExtractMethodLspSuite | val b = 4 | val c = 3 | def method(i: Int, j: Int) = i + 1 - | val a = { + | val a = { | val c = 5 | <<123 + method(c, b) + method(b,c)>> | } @@ -153,7 +153,7 @@ class ExtractMethodLspSuite | def newMethod(c: Int): Int = | 123 + method(c, b) + method(b,c) | - | val a = { + | val a = { | val c = 5 | newMethod(c) | } diff --git a/tests/unit/src/test/scala/tests/codeactions/ExtractValueLspSuite.scala b/tests/unit/src/test/scala/tests/codeactions/ExtractValueLspSuite.scala index 32ea897eda7..14fccc7bfed 100644 --- a/tests/unit/src/test/scala/tests/codeactions/ExtractValueLspSuite.scala +++ b/tests/unit/src/test/scala/tests/codeactions/ExtractValueLspSuite.scala @@ -147,7 +147,7 @@ class ExtractValueLspSuite """|object Main { | def method2(i: Int) : Int = ??? | def method1(s: String): Unit = { - | println("Hello!"); + | println("Hello!"); | val newValue = 1 + 2 | method2(1 + method2(newValue)) | } @@ -464,7 +464,7 @@ class ExtractValueLspSuite """|import scala.util.Try | |def main = - | val newValue = + | val newValue = | Some(new Exception) | val x = Try(newValue)""".stripMargin, scalaVersion = "3.3.4", @@ -481,7 +481,7 @@ class ExtractValueLspSuite """|import scala.util.Try | |def main = - | val newValue = + | val newValue = | println("hello") | Some(new Exception) | val x = Try(newValue)""".stripMargin, diff --git a/tests/unit/src/test/scala/tests/codeactions/RewriteBracesParensLspSuite.scala b/tests/unit/src/test/scala/tests/codeactions/RewriteBracesParensLspSuite.scala index ef3511bb0af..a3a6bf1547b 100644 --- a/tests/unit/src/test/scala/tests/codeactions/RewriteBracesParensLspSuite.scala +++ b/tests/unit/src/test/scala/tests/codeactions/RewriteBracesParensLspSuite.scala @@ -124,7 +124,7 @@ class RewriteBracesParensLspSuite | | List(1,2).foreach { a => | println(a) - | <<>>a + | <<>>a | } |} |""".stripMargin, diff --git a/tests/unit/src/test/scala/tests/debug/CompletionDapSuite.scala b/tests/unit/src/test/scala/tests/debug/CompletionDapSuite.scala index 80aa43ac79c..1fcaf126f74 100644 --- a/tests/unit/src/test/scala/tests/debug/CompletionDapSuite.scala +++ b/tests/unit/src/test/scala/tests/debug/CompletionDapSuite.scala @@ -46,7 +46,7 @@ class CompletionDapSuite assertCompletion( "advanced", expression = "Preceding(@@)", - expectedCompletions = """|num = + expectedCompletions = """|num = |args: Array[String] |Main a |main(args: Array[String]): Unit diff --git a/tests/unit/src/test/scala/tests/formatting/OnTypeFormattingSuite.scala b/tests/unit/src/test/scala/tests/formatting/OnTypeFormattingSuite.scala index 170437888ab..e31f6505009 100644 --- a/tests/unit/src/test/scala/tests/formatting/OnTypeFormattingSuite.scala +++ b/tests/unit/src/test/scala/tests/formatting/OnTypeFormattingSuite.scala @@ -138,7 +138,7 @@ class OnTypeFormattingSuite extends BaseLspSuite("onTypeFormatting") { """ |object Main { | val x = List(1) - | val y = s'''|abc + | val y = s'''|abc | |${x.mkString(s"\n")}''''.stripMargin |}""".stripMargin, ) @@ -439,7 +439,7 @@ class OnTypeFormattingSuite extends BaseLspSuite("onTypeFormatting") { |object Main { | val str = sql'''SELECT 1 | FROM - | ''' + sql''' mytable + | ''' + sql''' mytable | ''' |}""".stripMargin, triggerCharacter = "\n", diff --git a/tests/unit/src/test/scala/tests/inlayHints/InlayHintsLspSuite.scala b/tests/unit/src/test/scala/tests/inlayHints/InlayHintsLspSuite.scala index 619b0d3c2cc..8edb3916aac 100644 --- a/tests/unit/src/test/scala/tests/inlayHints/InlayHintsLspSuite.scala +++ b/tests/unit/src/test/scala/tests/inlayHints/InlayHintsLspSuite.scala @@ -22,7 +22,7 @@ class InlayHintsLspSuite | hello()/*(andy<<(6:15)>>, boston<<(9:17)>>)*/ | hello()/*(andy<<(6:15)>>, boston<<(9:17)>>)*/; hello()/*(andy<<(6:15)>>, boston<<(9:17)>>)*/ | } - | + | | val ordered/*: String<>*/ = /*augmentString<>(*/"acb"/*)*/.sorted/*(Char<>)*/ | /*augmentString<>(*/"foo"/*)*/.map(c/*: Char<>*/ => c.toInt) | implicit val ec: scala.concurrent.ExecutionContext = scala.concurrent.ExecutionContext.global @@ -55,7 +55,7 @@ class InlayHintsLspSuite | hello()/*(andy<<(6:15)>>, boston<<(9:17)>>)*/ | hello()/*(andy<<(6:15)>>, boston<<(9:17)>>)*/; hello()/*(andy<<(6:15)>>, boston<<(9:17)>>)*/ | } - | + | | val ordered/*: String<>*/ = /*augmentString<>(*/"acb"/*)*/.sorted/*[Char<>]*//*(Char<>)*/ | /*augmentString<>(*/"foo"/*)*/.map/*[Int<>]*/(c/*: Char<>*/ => c.toInt) | implicit val ec: scala.concurrent.ExecutionContext = scala.concurrent.ExecutionContext.global @@ -255,8 +255,8 @@ class InlayHintsLspSuite _ <- server.assertInlayHints( "a/Main.worksheet.sc", """|def method(implicit str: String) = str + str - |implicit val name: String = "Susan".stripMargin/* // : String = "Susan"| name: String = "Susan" |*/ - |val greeting = s"Hello $$name"/* // : String = "Hello $name"| greeting: String = "Hello $name" |*/ + |implicit val name: String = "Susan".stripMargin/* // : String = "Susan"| name: String = "Susan" |*/ + |val greeting = s"Hello $$name"/* // : String = "Hello $name"| greeting: String = "Hello $name" |*/ |method/* // : String = "SusanSusan"| res0: String = "SusanSusan" |*/ |""".stripMargin, withTooltip = true, diff --git a/tests/unit/src/test/scala/tests/rangeFormatting/IndentWhenPastingSuite.scala b/tests/unit/src/test/scala/tests/rangeFormatting/IndentWhenPastingSuite.scala index 70e2c9c3243..69c90fab4c2 100644 --- a/tests/unit/src/test/scala/tests/rangeFormatting/IndentWhenPastingSuite.scala +++ b/tests/unit/src/test/scala/tests/rangeFormatting/IndentWhenPastingSuite.scala @@ -498,21 +498,21 @@ class IndentWhenPastingSuite "methods", """ |object Main { - | def hello() = + | def hello() = | println("hello") | println("hello") - | @@ + | @@ |}""".stripMargin, """|def bye() = | println("bye") | println("bye") """.stripMargin, """|object Main { - | def hello() = + | def hello() = | println("hello") | println("hello") | def bye() = | println("bye") - | println("bye") + | println("bye") |} |""".stripMargin, scalaVersion, @@ -523,10 +523,10 @@ class IndentWhenPastingSuite "methods-same-line", """ |object Main { - | def hello() = + | def hello() = | println("hello") | println("hello") - | @@ + | @@ |}""".stripMargin, """| |def bye() = @@ -535,7 +535,7 @@ class IndentWhenPastingSuite | println("bye") |""".stripMargin, """|object Main { - | def hello() = + | def hello() = | println("hello") | println("hello") | diff --git a/tests/unit/src/test/scala/tests/scalafix/ScalafixProviderLspSuite.scala b/tests/unit/src/test/scala/tests/scalafix/ScalafixProviderLspSuite.scala index 6d631b64229..fce78eafa34 100644 --- a/tests/unit/src/test/scala/tests/scalafix/ScalafixProviderLspSuite.scala +++ b/tests/unit/src/test/scala/tests/scalafix/ScalafixProviderLspSuite.scala @@ -52,7 +52,7 @@ class ScalafixProviderLspSuite extends BaseLspSuite("scalafix-provider") { |object Main{ | def debug { println("debug") } // ProcedureSyntax rule is not defined, should not be changed | val addTypeHere = new A{} - | private val notUsed = 123 + | private val notUsed = 123 |} |""".stripMargin ) @@ -64,7 +64,7 @@ class ScalafixProviderLspSuite extends BaseLspSuite("scalafix-provider") { |import java.io.File | ^^^^ |a/src/main/scala/Main.scala:7:15: warning: private val notUsed in object Main is never used - | private val notUsed = 123 + | private val notUsed = 123 | ^^^^^^^ |""".stripMargin, ) @@ -89,7 +89,7 @@ class ScalafixProviderLspSuite extends BaseLspSuite("scalafix-provider") { |object Main{ | def debug { println("debug") } // ProcedureSyntax rule is not defined, should not be changed | val addTypeHere: A = new A{} - | + | |} |""".stripMargin, ) @@ -118,7 +118,7 @@ class ScalafixProviderLspSuite extends BaseLspSuite("scalafix-provider") { |object Main{ | def debug: Unit = { println("debug") } // ProcedureSyntax rule is not defined, should not be changed | val addTypeHere: A = new A{} - | + | |} |""".stripMargin, ) @@ -142,7 +142,7 @@ class ScalafixProviderLspSuite extends BaseLspSuite("scalafix-provider") { |/a/src/main/scala/Main.scala |object Main{ | val addTypeHere = new A{} - | private val notUsed = 123 + | private val notUsed = 123 |} |""".stripMargin ) @@ -171,7 +171,7 @@ class ScalafixProviderLspSuite extends BaseLspSuite("scalafix-provider") { contents, """|object Main{ | val addTypeHere = new A{} - | private val notUsed = 123 + | private val notUsed = 123 |} |""".stripMargin, ) @@ -189,7 +189,7 @@ class ScalafixProviderLspSuite extends BaseLspSuite("scalafix-provider") { |/a/src/main/scala/Main.scala |class A |object Main{ - | private val notUsed = 123 + | private val notUsed = 123 |} |""".stripMargin ) @@ -211,7 +211,7 @@ class ScalafixProviderLspSuite extends BaseLspSuite("scalafix-provider") { """| |class A |object Main{ - | + | |} |""".stripMargin, ) @@ -241,7 +241,7 @@ class ScalafixProviderLspSuite extends BaseLspSuite("scalafix-provider") { contentsAfterConfigChange, """|class A |object Main{ - | + | |} |// Hello world! |""".stripMargin, @@ -269,7 +269,7 @@ class ScalafixProviderLspSuite extends BaseLspSuite("scalafix-provider") { |object RemoveMe |object A { | case class Bar(i: Int) - | def func(a: Int, b: Int, c: Int) = a + b + c + | def func(a: Int, b: Int, c: Int) = a + b + c |} |object Main{ | val used = List() @@ -296,7 +296,7 @@ class ScalafixProviderLspSuite extends BaseLspSuite("scalafix-provider") { contents, """|object A { | final case class Bar(i: Int) - | def func(a: Int, b: Int, c: Int) = a + b + c + | def func(a: Int, b: Int, c: Int) = a + b + c |} |object Main{ | val used = List.empty diff --git a/tests/unit/src/test/scala/tests/scalafix/ScalafixRunOnlyLspSuite.scala b/tests/unit/src/test/scala/tests/scalafix/ScalafixRunOnlyLspSuite.scala index af4789de078..6fa7f33b8a0 100644 --- a/tests/unit/src/test/scala/tests/scalafix/ScalafixRunOnlyLspSuite.scala +++ b/tests/unit/src/test/scala/tests/scalafix/ScalafixRunOnlyLspSuite.scala @@ -57,7 +57,7 @@ class ScalafixRunOnlyLspSuite extends BaseLspSuite("run-scalafix-rules") { |object Main{ | def debug { println("debug") } // ProcedureSyntax rule is not defined, should not be changed | val addTypeHere = new A{} - | private val notUsed = 123 + | private val notUsed = 123 |} |""".stripMargin @@ -79,7 +79,7 @@ class ScalafixRunOnlyLspSuite extends BaseLspSuite("run-scalafix-rules") { |object Main{ | def debug { println("debug") } // ProcedureSyntax rule is not defined, should not be changed | val addTypeHere: A = new A{} - | private val notUsed = 123 + | private val notUsed = 123 |} |""".stripMargin, ) @@ -107,7 +107,7 @@ class ScalafixRunOnlyLspSuite extends BaseLspSuite("run-scalafix-rules") { |object Main{ | def debug { println("debug") } // ProcedureSyntax rule is not defined, should not be changed | val addTypeHere = new A{} - | + | |} |""".stripMargin, ) From 4b9c9e268116d33f986ed642c9262d1e783ed9fa Mon Sep 17 00:00:00 2001 From: Scalameta Bot Date: Mon, 17 Feb 2025 01:12:16 +0000 Subject: [PATCH 3/3] Add 'Reformat with scalafmt 3.9.0' to .git-blame-ignore-revs --- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 0a6bf03d72d..61aa2880aec 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -19,3 +19,6 @@ cb3a4275b4536030d133d19be4fd1d4b1aa9135b # Scala Steward: Reformat with scalafmt 3.8.5 9105db9a4c85b101a3def29b7e6fc458a5afda71 + +# Scala Steward: Reformat with scalafmt 3.9.0 +7ee123ac8e25d1c9cf07aac590d0c26358f6b35a