Skip to content

Commit

Permalink
Merge pull request #191 from scala-steward/update/scalafmt-core-3.7.15
Browse files Browse the repository at this point in the history
Update scalafmt-core to 3.7.15
  • Loading branch information
Philippus authored Oct 30, 2023
2 parents 6d86900 + 2431b85 commit f4dbdbd
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 35 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Scala Steward: Reformat with scalafmt 3.7.15
5a8607e6ac2c317fb073f537fc0f3ce711a8f3df
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.7.14
version = 3.7.15

align.preset = most
literals.double = Upper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ ThisBuild / envFileName := "dotenv"

TaskKey[Unit]("check") := {
val lastLog: File = BuiltinCommands.lastLogFile(state.value).get
val last: String = IO.read(lastLog)
val contains = last.contains("Configured .env environment")
val last: String = IO.read(lastLog)
val contains = last.contains("Configured .env environment")
if (!contains)
sys.error("expected log message")
if (sys.env.get("LINE_ONE").isEmpty || sys.env.get("LINE_TWO").isEmpty)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sys.props.get("plugin.version") match {
case Some(x) => addSbtPlugin("nl.gn0s1s" %% "sbt-dotenv" % x)
case _ =>
case _ =>
sys.error(
"""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
Expand Down
4 changes: 2 additions & 2 deletions src/sbt-test/sbt-dotenv/check-load-dot-env/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ version := "0.1"

TaskKey[Unit]("check") := {
val lastLog: File = BuiltinCommands.lastLogFile(state.value).get
val last: String = IO.read(lastLog)
val contains = last.contains("Configured .env environment")
val last: String = IO.read(lastLog)
val contains = last.contains("Configured .env environment")
if (!contains)
sys.error("expected log message")
if (sys.env.get("LINE_ONE").isEmpty || sys.env.get("LINE_TWO").isEmpty)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sys.props.get("plugin.version") match {
case Some(x) => addSbtPlugin("nl.gn0s1s" %% "sbt-dotenv" % x)
case _ =>
case _ =>
sys.error(
"""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
Expand Down
22 changes: 11 additions & 11 deletions src/sbt-test/sbt-dotenv/check-load-on-demand-dot-env/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ lazy val root = (project in file("."))
.configs(IntegrationTest)
.settings(Defaults.itSettings)
.settings(
version := "0.1",
ThisBuild / envFileName := "build.env",
Test / envFileName := "test.env",
version := "0.1",
ThisBuild / envFileName := "build.env",
Test / envFileName := "test.env",
IntegrationTest / envFileName := "integration.env",
test / fork := true,
IntegrationTest / fork := true
test / fork := true,
IntegrationTest / fork := true
)

TaskKey[Unit]("checkGlobal") := {
val lastLog: File = BuiltinCommands.lastLogFile(state.value).get
val last: String = IO.read(lastLog)
val contains = last.contains(
val last: String = IO.read(lastLog)
val contains = last.contains(
".env file not found (fileName=build.env), no .env environment configured."
)
if (!contains)
Expand All @@ -22,16 +22,16 @@ TaskKey[Unit]("checkGlobal") := {

TaskKey[Unit]("checkTest") := {
val lastLog: File = BuiltinCommands.lastLogFile(state.value).get
val last: String = IO.read(lastLog)
val contains = last.contains(".env detected (fileName=test.env)")
val last: String = IO.read(lastLog)
val contains = last.contains(".env detected (fileName=test.env)")
if (!contains)
sys.error("expected log message")
}

TaskKey[Unit]("checkIntegrationTest") := {
val lastLog: File = BuiltinCommands.lastLogFile(state.value).get
val last: String = IO.read(lastLog)
val contains = last.contains(".env detected (fileName=integration.env)")
val last: String = IO.read(lastLog)
val contains = last.contains(".env detected (fileName=integration.env)")
if (!contains)
sys.error("expected log message")
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sys.props.get("plugin.version") match {
case Some(x) => addSbtPlugin("nl.gn0s1s" %% "sbt-dotenv" % x)
case _ =>
case _ =>
sys.error(
"""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
Expand Down
4 changes: 2 additions & 2 deletions src/sbt-test/sbt-dotenv/check-no-dot-env/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ version := "0.1"

TaskKey[Unit]("check") := {
val lastLog: File = BuiltinCommands.lastLogFile(state.value).get
val last: String = IO.read(lastLog)
val contains = last.contains(
val last: String = IO.read(lastLog)
val contains = last.contains(
".env file not found (fileName=.env), no .env environment configured."
)
if (!contains)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sys.props.get("plugin.version") match {
case Some(x) => addSbtPlugin("nl.gn0s1s" %% "sbt-dotenv" % x)
case _ =>
case _ =>
sys.error(
"""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
Expand Down
8 changes: 3 additions & 5 deletions src/sbt-test/sbt-dotenv/check-skip-invalid-lines/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ version := "0.1"

TaskKey[Unit]("check") := {
val lastLog: File = BuiltinCommands.lastLogFile(state.value).get
val last: String = IO.read(lastLog)
val contains = last.contains("Configured .env environment")
val last: String = IO.read(lastLog)
val contains = last.contains("Configured .env environment")
if (!contains)
sys.error("expected log message")
if (
sys.env.get("INVALID_LINE").isDefined || sys.env.get("VALID_LINE").isEmpty
)
if (sys.env.get("INVALID_LINE").isDefined || sys.env.get("VALID_LINE").isEmpty)
sys.error(
"environment variables not set correctly, INVALID_LINE should be skipped and VALID_LINE should be defined"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sys.props.get("plugin.version") match {
case Some(x) => addSbtPlugin("nl.gn0s1s" %% "sbt-dotenv" % x)
case _ =>
case _ =>
sys.error(
"""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
Expand Down
6 changes: 3 additions & 3 deletions src/sbt-test/sbt-dotenv/check-special-cases/build.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version := "0.1"

TaskKey[Unit]("check") := {
val log = sLog.value
val log = sLog.value
val lastLog: File = BuiltinCommands.lastLogFile(state.value).get
val last: String = IO.read(lastLog)
val expected = "Configured .env environment"
val last: String = IO.read(lastLog)
val expected = "Configured .env environment"

log.info(s"checking for $expected in log output:\n$last")
if (!last.contains(expected)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sys.props.get("plugin.version") match {
case Some(x) => addSbtPlugin("nl.gn0s1s" %% "sbt-dotenv" % x)
case _ =>
case _ =>
sys.error(
"""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
Expand Down
4 changes: 2 additions & 2 deletions src/sbt-test/sbt-dotenv/check-variable-expansion/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ version := "0.1"

TaskKey[Unit]("check") := {
val lastLog: File = BuiltinCommands.lastLogFile(state.value).get
val last: String = IO.read(lastLog)
val contains = last.contains("Configured .env environment")
val last: String = IO.read(lastLog)
val contains = last.contains("Configured .env environment")
if (!contains)
sys.error("expected log message")
if (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sys.props.get("plugin.version") match {
case Some(x) => addSbtPlugin("nl.gn0s1s" %% "sbt-dotenv" % x)
case _ =>
case _ =>
sys.error(
"""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
Expand Down

0 comments on commit f4dbdbd

Please sign in to comment.