Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scalafmt-core 3.7.2 (was 3.7.1) #11726

Merged
merged 3 commits into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ e7923768a51fd30e549572c57506f2387b5337d4
87bcdac6fd18ec4a0de058fd3da1458334e1d209
ea97026a71db35ac4dcb0d312fa6370fbbe035d9
27d45299c9af048a10d948bf63a9506f1f61384a

# Scala Steward: Reformat with scalafmt 3.7.2
b8a4e49711895a2b1e088696d91713e6231abfca
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Keep this in sync with documentation/.scalafmt.conf

# Version https://scalameta.org/scalafmt/docs/configuration.html#version
version = 3.7.1
version = 3.7.2
# Dialect https://scalameta.org/scalafmt/docs/configuration.html#scala-dialects
runner.dialect = scala213

Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

name := """akka-fork-join-pool"""
name := """akka-fork-join-pool"""
organization := "com.lightbend.play"

version := "1.0-SNAPSHOT"

lazy val root = (project in file("."))
.enablePlugins(PlayJava)
.settings(
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
updateOptions := updateOptions.value.withLatestSnapshots(false),
update / evictionWarningOptions ~= (_.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false)),
PlayKeys.playInteractionMode := play.sbt.StaticPlayNonBlockingInteractionMode,
libraryDependencies += guice,
InputKey[Unit]("callIndex") := {
try ScriptedTools.callIndex() catch { case e: java.net.ConnectException =>
play.sbt.run.PlayRun.stop(state.value)
throw e
try ScriptedTools.callIndex()
catch {
case e: java.net.ConnectException =>
play.sbt.run.PlayRun.stop(state.value)
throw e
}
},
InputKey[Unit]("checkLines") := {
val args = Def.spaceDelimited("<source> <target>").parsed
val source :: target :: _ = args
try ScriptedTools.checkLines(source, target) catch { case e: java.net.ConnectException =>
try ScriptedTools.checkLines(source, target)
catch {
case e: java.net.ConnectException =>
play.sbt.run.PlayRun.stop(state.value)
throw e
}
}
}
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

updateOptions := updateOptions.value.withLatestSnapshots(false)
updateOptions := updateOptions.value.withLatestSnapshots(false)
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % sys.props("project.version"))
addSbtPlugin("com.typesafe.play" % "sbt-scripted-tools" % sys.props("project.version"))
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ lazy val root = (project in file("."))
.enablePlugins(PlayService)
.enablePlugins(RoutesCompiler)
.settings(
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
updateOptions := updateOptions.value.withLatestSnapshots(false),
update / evictionWarningOptions ~= (_.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false)),
PlayKeys.playInteractionMode := play.sbt.StaticPlayNonBlockingInteractionMode,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

updateOptions := updateOptions.value.withLatestSnapshots(false)
updateOptions := updateOptions.value.withLatestSnapshots(false)
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % sys.props("project.version"))
addSbtPlugin("com.typesafe.play" % "sbt-scripted-tools" % sys.props("project.version"))
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import play.api.mvc._
/**
* A very small controller that renders a home page.
*/
class HomeController @Inject()(cc: ControllerComponents) extends AbstractController(cc) {
class HomeController @Inject() (cc: ControllerComponents) extends AbstractController(cc) {

def index: Action[AnyContent] = Action { implicit request =>
Ok("Hello, this is Play!")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
lazy val root = (project in file("."))
.enablePlugins(PlayService)
.settings(
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
updateOptions := updateOptions.value.withLatestSnapshots(false),
update / evictionWarningOptions ~= (_.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false)),
PlayKeys.playInteractionMode := play.sbt.StaticPlayNonBlockingInteractionMode,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

updateOptions := updateOptions.value.withLatestSnapshots(false)
updateOptions := updateOptions.value.withLatestSnapshots(false)
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % sys.props("project.version"))
addSbtPlugin("com.typesafe.play" % "sbt-scripted-tools" % sys.props("project.version"))
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import play.api.mvc._
/**
* A very small controller that renders a home page.
*/
class HomeController @Inject()(cc: ControllerComponents) extends AbstractController(cc) {
class HomeController @Inject() (cc: ControllerComponents) extends AbstractController(cc) {

def index: Action[AnyContent] = Action { implicit request =>
Ok("Hello, this is Play!")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ package router
import javax.inject.Inject

import play.api.mvc._
import play.api.routing.sird._
import play.api.routing.Router
import play.api.routing.SimpleRouter
import play.api.routing.sird._

class Routes @Inject()(controller: controllers.HomeController) extends SimpleRouter {
class Routes @Inject() (controller: controllers.HomeController) extends SimpleRouter {
override def routes: Router.Routes = {
case GET(p"/") => controller.index
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ lazy val root = (project in file("."))
.aggregate(`sub-project-inside`, `sub-project-outside`)

def commonSettings: Seq[Setting[_]] = Seq(
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
updateOptions := updateOptions.value.withLatestSnapshots(false),
update / evictionWarningOptions ~= (_.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false)),
// This makes it possible to run tests on the output regardless of scala version
Expand All @@ -21,4 +21,5 @@ def commonSettings: Seq[Setting[_]] = Seq(
lazy val `sub-project-inside` = (project in file("./modules/sub-project-inside"))
.settings(commonSettings: _*)

lazy val `sub-project-outside` = ProjectRef(file("./dev-mode-compile-and-config-error-source-sub-project-outside"), "sub-project-outside")
lazy val `sub-project-outside` =
ProjectRef(file("./dev-mode-compile-and-config-error-source-sub-project-outside"), "sub-project-outside")
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ lazy val `sub-project-outside` = (project in file("."))
.settings(commonSettings: _*)

def commonSettings: Seq[Setting[_]] = Seq(
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
updateOptions := updateOptions.value.withLatestSnapshots(false),
update / evictionWarningOptions ~= (_.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false)),
// This makes it possible to run tests on the output regardless of scala version
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

updateOptions := updateOptions.value.withLatestSnapshots(false)
updateOptions := updateOptions.value.withLatestSnapshots(false)
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % sys.props("project.version"))
addSbtPlugin("com.typesafe.play" % "sbt-scripted-tools" % sys.props("project.version"))
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ lazy val root = (project in file("."))
.aggregate(`sub-project-inside`, `sub-project-outside`)

def commonSettings: Seq[Setting[_]] = Seq(
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
updateOptions := updateOptions.value.withLatestSnapshots(false),
update / evictionWarningOptions ~= (_.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false)),
// This makes it possible to run tests on the output regardless of scala version
Expand All @@ -21,4 +21,5 @@ def commonSettings: Seq[Setting[_]] = Seq(
lazy val `sub-project-inside` = (project in file("./modules/sub-project-inside"))
.settings(commonSettings: _*)

lazy val `sub-project-outside` = ProjectRef(file("./dev-mode-runtime-error-source-sub-project-outside"), "sub-project-outside")
lazy val `sub-project-outside` =
ProjectRef(file("./dev-mode-runtime-error-source-sub-project-outside"), "sub-project-outside")
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ lazy val `sub-project-outside` = (project in file("."))
.settings(commonSettings: _*)

def commonSettings: Seq[Setting[_]] = Seq(
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
updateOptions := updateOptions.value.withLatestSnapshots(false),
update / evictionWarningOptions ~= (_.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false)),
// This makes it possible to run tests on the output regardless of scala version
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

updateOptions := updateOptions.value.withLatestSnapshots(false)
updateOptions := updateOptions.value.withLatestSnapshots(false)
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % sys.props("project.version"))
addSbtPlugin("com.typesafe.play" % "sbt-scripted-tools" % sys.props("project.version"))
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

package controllers

import play.api.mvc._
import javax.inject.Inject

class Application @Inject()(c: ControllerComponents) extends AbstractController(c) {
import play.api.mvc._

class Application @Inject() (c: ControllerComponents) extends AbstractController(c) {
def index = Action {
Ok("original")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
lazy val root = (project in file("."))
.enablePlugins(PlayScala)
.settings(
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
updateOptions := updateOptions.value.withLatestSnapshots(false),
update / evictionWarningOptions ~= (_.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false)),
PlayKeys.playInteractionMode := play.sbt.StaticPlayNonBlockingInteractionMode,
PlayKeys.fileWatchService := play.dev.filewatch.FileWatchService.polling(500),
PlayKeys.fileWatchService := play.dev.filewatch.FileWatchService.polling(500),
libraryDependencies += guice,
TaskKey[Unit]("resetReloads") := (target.value / "reload.log").delete(),
InputKey[Unit]("verifyReloads") := {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

updateOptions := updateOptions.value.withLatestSnapshots(false)
updateOptions := updateOptions.value.withLatestSnapshots(false)
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % sys.props("project.version"))
addSbtPlugin("com.typesafe.play" % "sbt-scripted-tools" % sys.props("project.version"))
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.1.2")
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

import java.net.URLClassLoader

import com.typesafe.sbt.packager.Keys.executableScriptName

lazy val root = (project in file("."))
.enablePlugins(PlayScala)
.settings(
name := "assets-sample",
version := "1.0-SNAPSHOT",
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
name := "assets-sample",
version := "1.0-SNAPSHOT",
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
updateOptions := updateOptions.value.withLatestSnapshots(false),
update / evictionWarningOptions ~= (_.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false)),
Assets / LessKeys.less / includeFilter := "*.less",
Assets / LessKeys.less / excludeFilter := "_*.less",
PlayKeys.generateAssetsJar := false
PlayKeys.generateAssetsJar := false
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

updateOptions := updateOptions.value.withLatestSnapshots(false)
updateOptions := updateOptions.value.withLatestSnapshots(false)
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % sys.props("project.version"))
addSbtPlugin("com.typesafe.play" % "sbt-scripted-tools" % sys.props("project.version"))
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.1.2")
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

package controllers

import javax.inject.Inject

import play.api._
import play.api.mvc._

import javax.inject.Inject

/**
* i will fail since I check for a undefined class [[Documentation]]
*/
class Application @Inject()(action: DefaultActionBuilder) extends ControllerHelpers {
class Application @Inject() (action: DefaultActionBuilder) extends ControllerHelpers {

def index = action {
Ok
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
lazy val root = (project in file("."))
.enablePlugins(PlayScala)
.settings(
name := "dist-no-documentation-sample",
version := "1.0-SNAPSHOT",
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
name := "dist-no-documentation-sample",
version := "1.0-SNAPSHOT",
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
updateOptions := updateOptions.value.withLatestSnapshots(false),
update / evictionWarningOptions ~= (_.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false)),
// actually it should fail on any warning so that we can check that packageBin won't include any documentation
Compile / scalacOptions := Seq("-Xfatal-warnings", "-deprecation"),
libraryDependencies += guice,
play.sbt.PlayImport.PlayKeys.includeDocumentationInBinary := false,
Compile / packageDoc := file(".")
Compile / packageDoc := file(".")
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

updateOptions := updateOptions.value.withLatestSnapshots(false)
updateOptions := updateOptions.value.withLatestSnapshots(false)
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % sys.props("project.version"))
addSbtPlugin("com.typesafe.play" % "sbt-scripted-tools" % sys.props("project.version"))
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

package controllers

import javax.inject.Inject

import play.api._
import play.api.mvc._

import javax.inject.Inject

class Application @Inject()(env: Environment, configuration: Configuration, c: ControllerComponents)
class Application @Inject() (env: Environment, configuration: Configuration, c: ControllerComponents)
extends AbstractController(c) {

def index = Action {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
lazy val root = (project in file("."))
.enablePlugins(PlayScala)
.settings(
name := "dist-sample",
version := "1.0-SNAPSHOT",
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
name := "dist-sample",
version := "1.0-SNAPSHOT",
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
updateOptions := updateOptions.value.withLatestSnapshots(false),
update / evictionWarningOptions ~= (_.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false)),
PlayKeys.playInteractionMode := play.sbt.StaticPlayNonBlockingInteractionMode,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

updateOptions := updateOptions.value.withLatestSnapshots(false)
updateOptions := updateOptions.value.withLatestSnapshots(false)
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % sys.props("project.version"))
addSbtPlugin("com.typesafe.play" % "sbt-scripted-tools" % sys.props("project.version"))
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.1.2")
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

name := """auto-apply-false"""
name := """auto-apply-false"""
organization := "com.lightbend.play"

version := "1.0-SNAPSHOT"

lazy val root = (project in file("."))
.enablePlugins(PlayJava)
.settings(
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
updateOptions := updateOptions.value.withLatestSnapshots(false),
update / evictionWarningOptions ~= (_.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false)),
PlayKeys.playInteractionMode := play.sbt.StaticPlayNonBlockingInteractionMode,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

updateOptions := updateOptions.value.withLatestSnapshots(false)
updateOptions := updateOptions.value.withLatestSnapshots(false)
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % sys.props("project.version"))
addSbtPlugin("com.typesafe.play" % "sbt-scripted-tools" % sys.props("project.version"))
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

name := """auto-apply-true"""
name := """auto-apply-true"""
organization := "com.lightbend.play"

version := "1.0-SNAPSHOT"

lazy val root = (project in file("."))
.enablePlugins(PlayJava)
.settings(
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
scalaVersion := ScriptedTools.scalaVersionFromJavaProperties(),
updateOptions := updateOptions.value.withLatestSnapshots(false),
update / evictionWarningOptions ~= (_.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false)),
PlayKeys.playInteractionMode := play.sbt.StaticPlayNonBlockingInteractionMode,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

updateOptions := updateOptions.value.withLatestSnapshots(false)
updateOptions := updateOptions.value.withLatestSnapshots(false)
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % sys.props("project.version"))
addSbtPlugin("com.typesafe.play" % "sbt-scripted-tools" % sys.props("project.version"))