diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000..6f4647c --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# Scala Steward: Reformat with scalafmt 3.7.15 +5a8607e6ac2c317fb073f537fc0f3ce711a8f3df diff --git a/.scalafmt.conf b/.scalafmt.conf index a369c33..f409648 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 3.7.14 +version = 3.7.15 align.preset = most literals.double = Upper diff --git a/src/sbt-test/sbt-dotenv/check-load-dot-env-filename-changed/build.sbt b/src/sbt-test/sbt-dotenv/check-load-dot-env-filename-changed/build.sbt index 9e3685c..53d02a1 100644 --- a/src/sbt-test/sbt-dotenv/check-load-dot-env-filename-changed/build.sbt +++ b/src/sbt-test/sbt-dotenv/check-load-dot-env-filename-changed/build.sbt @@ -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) diff --git a/src/sbt-test/sbt-dotenv/check-load-dot-env-filename-changed/project/plugins.sbt b/src/sbt-test/sbt-dotenv/check-load-dot-env-filename-changed/project/plugins.sbt index ad0afd1..395ffcf 100644 --- a/src/sbt-test/sbt-dotenv/check-load-dot-env-filename-changed/project/plugins.sbt +++ b/src/sbt-test/sbt-dotenv/check-load-dot-env-filename-changed/project/plugins.sbt @@ -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 diff --git a/src/sbt-test/sbt-dotenv/check-load-dot-env/build.sbt b/src/sbt-test/sbt-dotenv/check-load-dot-env/build.sbt index f4ee417..b18e9f5 100644 --- a/src/sbt-test/sbt-dotenv/check-load-dot-env/build.sbt +++ b/src/sbt-test/sbt-dotenv/check-load-dot-env/build.sbt @@ -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) diff --git a/src/sbt-test/sbt-dotenv/check-load-dot-env/project/plugins.sbt b/src/sbt-test/sbt-dotenv/check-load-dot-env/project/plugins.sbt index ad0afd1..395ffcf 100644 --- a/src/sbt-test/sbt-dotenv/check-load-dot-env/project/plugins.sbt +++ b/src/sbt-test/sbt-dotenv/check-load-dot-env/project/plugins.sbt @@ -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 diff --git a/src/sbt-test/sbt-dotenv/check-load-on-demand-dot-env/build.sbt b/src/sbt-test/sbt-dotenv/check-load-on-demand-dot-env/build.sbt index 44c8182..8f16027 100644 --- a/src/sbt-test/sbt-dotenv/check-load-on-demand-dot-env/build.sbt +++ b/src/sbt-test/sbt-dotenv/check-load-on-demand-dot-env/build.sbt @@ -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) @@ -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") } diff --git a/src/sbt-test/sbt-dotenv/check-load-on-demand-dot-env/project/plugins.sbt b/src/sbt-test/sbt-dotenv/check-load-on-demand-dot-env/project/plugins.sbt index ad0afd1..395ffcf 100644 --- a/src/sbt-test/sbt-dotenv/check-load-on-demand-dot-env/project/plugins.sbt +++ b/src/sbt-test/sbt-dotenv/check-load-on-demand-dot-env/project/plugins.sbt @@ -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 diff --git a/src/sbt-test/sbt-dotenv/check-no-dot-env/build.sbt b/src/sbt-test/sbt-dotenv/check-no-dot-env/build.sbt index c5c7153..839aa35 100644 --- a/src/sbt-test/sbt-dotenv/check-no-dot-env/build.sbt +++ b/src/sbt-test/sbt-dotenv/check-no-dot-env/build.sbt @@ -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) diff --git a/src/sbt-test/sbt-dotenv/check-no-dot-env/project/plugins.sbt b/src/sbt-test/sbt-dotenv/check-no-dot-env/project/plugins.sbt index ad0afd1..395ffcf 100644 --- a/src/sbt-test/sbt-dotenv/check-no-dot-env/project/plugins.sbt +++ b/src/sbt-test/sbt-dotenv/check-no-dot-env/project/plugins.sbt @@ -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 diff --git a/src/sbt-test/sbt-dotenv/check-skip-invalid-lines/build.sbt b/src/sbt-test/sbt-dotenv/check-skip-invalid-lines/build.sbt index 75ecdc1..4b19c9a 100644 --- a/src/sbt-test/sbt-dotenv/check-skip-invalid-lines/build.sbt +++ b/src/sbt-test/sbt-dotenv/check-skip-invalid-lines/build.sbt @@ -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" ) diff --git a/src/sbt-test/sbt-dotenv/check-skip-invalid-lines/project/plugins.sbt b/src/sbt-test/sbt-dotenv/check-skip-invalid-lines/project/plugins.sbt index ad0afd1..395ffcf 100644 --- a/src/sbt-test/sbt-dotenv/check-skip-invalid-lines/project/plugins.sbt +++ b/src/sbt-test/sbt-dotenv/check-skip-invalid-lines/project/plugins.sbt @@ -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 diff --git a/src/sbt-test/sbt-dotenv/check-special-cases/build.sbt b/src/sbt-test/sbt-dotenv/check-special-cases/build.sbt index 915f904..c4e449f 100644 --- a/src/sbt-test/sbt-dotenv/check-special-cases/build.sbt +++ b/src/sbt-test/sbt-dotenv/check-special-cases/build.sbt @@ -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)) { diff --git a/src/sbt-test/sbt-dotenv/check-special-cases/project/plugins.sbt b/src/sbt-test/sbt-dotenv/check-special-cases/project/plugins.sbt index ad0afd1..395ffcf 100644 --- a/src/sbt-test/sbt-dotenv/check-special-cases/project/plugins.sbt +++ b/src/sbt-test/sbt-dotenv/check-special-cases/project/plugins.sbt @@ -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 diff --git a/src/sbt-test/sbt-dotenv/check-variable-expansion/build.sbt b/src/sbt-test/sbt-dotenv/check-variable-expansion/build.sbt index 4f30698..307ee42 100644 --- a/src/sbt-test/sbt-dotenv/check-variable-expansion/build.sbt +++ b/src/sbt-test/sbt-dotenv/check-variable-expansion/build.sbt @@ -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 ( diff --git a/src/sbt-test/sbt-dotenv/check-variable-expansion/project/plugins.sbt b/src/sbt-test/sbt-dotenv/check-variable-expansion/project/plugins.sbt index ad0afd1..395ffcf 100644 --- a/src/sbt-test/sbt-dotenv/check-variable-expansion/project/plugins.sbt +++ b/src/sbt-test/sbt-dotenv/check-variable-expansion/project/plugins.sbt @@ -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