Skip to content

Commit

Permalink
Merge pull request #806 from gabro/scalafmt-version-default
Browse files Browse the repository at this point in the history
Use Scalafmt 2.0.0 when setting the version in .scalafmt.conf
  • Loading branch information
tgodzik committed Jul 9, 2019
2 parents 3d09962 + a254856 commit a47c0e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions build.sbt
Expand Up @@ -145,7 +145,8 @@ lazy val V = new {
val bloop = "1.3.2"
val sbtBloop = bloop
val gradleBloop = bloop
val scalafmt = "2.0.0-RC4"
val scalafmt = "2.0.0"
val scalafmtDynamic = "2.0.0-RC4" // Not v2.0.0 because it has a regression https://github.com/scalameta/scalafmt/issues/1442
// List of supported Scala versions in SemanticDB. Needs to be manually updated
// for every SemanticDB upgrade.
def supportedScalaVersions =
Expand Down Expand Up @@ -238,7 +239,7 @@ lazy val metals = project
// Scala dependencies
// ==================
"org.scala-lang.modules" %% "scala-java8-compat" % "0.9.0",
"org.scalameta" %% "scalafmt-dynamic" % V.scalafmt,
"org.scalameta" %% "scalafmt-dynamic" % V.scalafmtDynamic,
// For reading classpaths.
// for fetching ch.epfl.scala:bloop-frontend and other library dependencies
"com.geirsson" %% "coursier-small" % "1.3.3",
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/src/test/scala/tests/FormattingSlowSuite.scala
Expand Up @@ -316,7 +316,7 @@ object FormattingSlowSuite extends BaseSlowSuite("formatting") {
)
assertNoDiff(
client.workspaceDiagnostics,
"""|.scalafmt.conf:1:1: error: missing setting 'version'. To fix this problem, add the following line to .scalafmt.conf: 'version=2.0.0-RC4'.
"""|.scalafmt.conf:1:1: error: missing setting 'version'. To fix this problem, add the following line to .scalafmt.conf: 'version=2.0.0'.
|maxColumn=40
|^^^^^^^^^^^^
|""".stripMargin
Expand Down

0 comments on commit a47c0e2

Please sign in to comment.