diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index d1362fa..e6fac9a 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -6,3 +6,6 @@ df4933f509193b30fb5d0654e2d16776efb9140b # Scala Steward: Reformat with scalafmt 3.8.4 0d74d14dcb684879af3cc1738418a05d2d9893b9 + +# Scala Steward: Reformat with scalafmt 3.10.7 +c1d4854ca519853aaa5896aa8d54c4f00206ca9b diff --git a/.scalafmt.conf b/.scalafmt.conf index d3c3995..f7b9a80 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.10.3" +version = "3.10.7" preset = default align.preset = some diff --git a/plugin/src/main/scala/com/github/eikek/sbt/openapi/Part.scala b/plugin/src/main/scala/com/github/eikek/sbt/openapi/Part.scala index 8f9f9d7..7e10f03 100644 --- a/plugin/src/main/scala/com/github/eikek/sbt/openapi/Part.scala +++ b/plugin/src/main/scala/com/github/eikek/sbt/openapi/Part.scala @@ -4,7 +4,7 @@ case class Part(cnt: String) { def ++(p: Part): Part = render match { case "" => p - case s => + case s => p.render match { case "" => this case s2 => Part(s + "\n" + s2) @@ -37,7 +37,7 @@ case class Part(cnt: String) { def semicolon: Part = render match { case "" => this - case s => + case s => Part( s.split('\n').toList.map(l => if (l.endsWith(";")) l else l + ";").mkString("\n") ) diff --git a/plugin/src/sbt-test/openapi-test/json-extra-scala/project/plugins.sbt b/plugin/src/sbt-test/openapi-test/json-extra-scala/project/plugins.sbt index fdfc201..9b30b85 100644 --- a/plugin/src/sbt-test/openapi-test/json-extra-scala/project/plugins.sbt +++ b/plugin/src/sbt-test/openapi-test/json-extra-scala/project/plugins.sbt @@ -1,6 +1,6 @@ sys.props.get("plugin.version") match { case Some(x) => addSbtPlugin("com.github.eikek" % "sbt-openapi-schema" % x) - case _ => + case _ => sys.error( """|The system property 'plugin.version' is not defined. |Specify this property using the scriptedLaunchOpts -D.""".stripMargin diff --git a/plugin/src/sbt-test/openapi-test/json-scala/project/plugins.sbt b/plugin/src/sbt-test/openapi-test/json-scala/project/plugins.sbt index fdfc201..9b30b85 100644 --- a/plugin/src/sbt-test/openapi-test/json-scala/project/plugins.sbt +++ b/plugin/src/sbt-test/openapi-test/json-scala/project/plugins.sbt @@ -1,6 +1,6 @@ sys.props.get("plugin.version") match { case Some(x) => addSbtPlugin("com.github.eikek" % "sbt-openapi-schema" % x) - case _ => + case _ => sys.error( """|The system property 'plugin.version' is not defined. |Specify this property using the scriptedLaunchOpts -D.""".stripMargin diff --git a/plugin/src/sbt-test/openapi-test/simple-scala/project/plugins.sbt b/plugin/src/sbt-test/openapi-test/simple-scala/project/plugins.sbt index fdfc201..9b30b85 100644 --- a/plugin/src/sbt-test/openapi-test/simple-scala/project/plugins.sbt +++ b/plugin/src/sbt-test/openapi-test/simple-scala/project/plugins.sbt @@ -1,6 +1,6 @@ sys.props.get("plugin.version") match { case Some(x) => addSbtPlugin("com.github.eikek" % "sbt-openapi-schema" % x) - case _ => + case _ => sys.error( """|The system property 'plugin.version' is not defined. |Specify this property using the scriptedLaunchOpts -D.""".stripMargin diff --git a/plugin/src/sbt-test/openapi-test/trait-scala/project/plugins.sbt b/plugin/src/sbt-test/openapi-test/trait-scala/project/plugins.sbt index fdfc201..9b30b85 100644 --- a/plugin/src/sbt-test/openapi-test/trait-scala/project/plugins.sbt +++ b/plugin/src/sbt-test/openapi-test/trait-scala/project/plugins.sbt @@ -1,6 +1,6 @@ sys.props.get("plugin.version") match { case Some(x) => addSbtPlugin("com.github.eikek" % "sbt-openapi-schema" % x) - case _ => + case _ => sys.error( """|The system property 'plugin.version' is not defined. |Specify this property using the scriptedLaunchOpts -D.""".stripMargin