diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 686095a3..b6fd64bf 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -1,2 +1,5 @@ # Scala Steward: Reformat with scalafmt 3.7.0 2c02dc2aa89af5c3322d7ab66af6731f9d674b74 + +# Scala Steward: Reformat with scalafmt 3.8.5 +d5d561705b7ef12b307439ffab80217d0cfad4ef diff --git a/.scalafmt.conf b/.scalafmt.conf index cea3f3b9..1146cb1f 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 3.8.1 +version = 3.8.5 style = defaultWithAlign maxColumn = 100 runner.dialect = scala3 diff --git a/src/main/scala/microsites/MicrositeKeys.scala b/src/main/scala/microsites/MicrositeKeys.scala index 5ad51f32..f8962fbc 100644 --- a/src/main/scala/microsites/MicrositeKeys.scala +++ b/src/main/scala/microsites/MicrositeKeys.scala @@ -472,9 +472,8 @@ trait MicrositeAutoImportSettings extends MicrositeKeys { Def .sequential(createMicrositeVersions, clean, makeVersionedMicrosite, moveMicrositeVersions) .value, - ghpagesPrivateMappings := { - sbt.Path.allSubpaths((makeSite / target).value).toList - }, + ghpagesPrivateMappings := + sbt.Path.allSubpaths((makeSite / target).value).toList, pushMicrosite := Def.taskDyn { val siteDir: File = (makeSite / target).value val noJekyll: Boolean = ghpagesNoJekyll.value @@ -490,7 +489,7 @@ trait MicrositeAutoImportSettings extends MicrositeKeys { (pushSiteWith.name, gitHosting.name) match { case (GHPagesPlugin.name, _) => ghpagesPushSite case (GitHub4s.name, GitHub.name) if githubToken.nonEmpty => - Def.task({ + Def.task { val commitMessage = sys.env.getOrElse("SBT_GHPAGES_COMMIT_MESSAGE", "updated site") log.info(s"""Committing files from ${siteDir.getAbsolutePath} into branch '$branch' @@ -518,7 +517,7 @@ trait MicrositeAutoImportSettings extends MicrositeKeys { } } .unsafeRunSync() - }) + } case (GitHub4s.name, GitHub.name) => Def.task( log.error( diff --git a/src/test/scala/microsites/DocsLayoutTest.scala b/src/test/scala/microsites/DocsLayoutTest.scala index 96130e5c..75d7ae95 100644 --- a/src/test/scala/microsites/DocsLayoutTest.scala +++ b/src/test/scala/microsites/DocsLayoutTest.scala @@ -53,11 +53,12 @@ class DocsLayoutTest extends AnyFunSuite with Checkers with Matchers with Arbitr test("scriptsDocs TypeTag list shouldn't be empty") { - val property = forAll { implicit settings: MicrositeSettings ⇒ - val layout = new DocsLayout(settings) + val property = forAll { + implicit settings: MicrositeSettings ⇒ + val layout = new DocsLayout(settings) - layout.scriptsDocs should not be empty - layout.scriptsDocs.nonEmpty + layout.scriptsDocs should not be empty + layout.scriptsDocs.nonEmpty } check(property) diff --git a/src/test/scala/microsites/HomeLayoutTest.scala b/src/test/scala/microsites/HomeLayoutTest.scala index 1bad262a..baae9574 100644 --- a/src/test/scala/microsites/HomeLayoutTest.scala +++ b/src/test/scala/microsites/HomeLayoutTest.scala @@ -53,11 +53,12 @@ class HomeLayoutTest extends AnyFunSuite with Checkers with Matchers with Arbitr test("homeMain should return a `main` TypeTag") { - val property = forAll { implicit settings: MicrositeSettings ⇒ - val layout = new HomeLayout(settings) + val property = forAll { + implicit settings: MicrositeSettings ⇒ + val layout = new HomeLayout(settings) - layout.homeMain.tag shouldBe "main" - !layout.homeMain.void + layout.homeMain.tag shouldBe "main" + !layout.homeMain.void } check(property) diff --git a/src/test/scala/microsites/LayoutTest.scala b/src/test/scala/microsites/LayoutTest.scala index ea11e72f..f281ea61 100644 --- a/src/test/scala/microsites/LayoutTest.scala +++ b/src/test/scala/microsites/LayoutTest.scala @@ -35,11 +35,12 @@ class LayoutTest extends AnyFunSuite with Checkers with Matchers with Arbitrarie test("meta TypeTag list shouldn't be empty") { - val property = forAll { implicit settings: MicrositeSettings ⇒ - val layout = buildParentLayout + val property = forAll { + implicit settings: MicrositeSettings ⇒ + val layout = buildParentLayout - layout.metas should not be empty - layout.metas.nonEmpty + layout.metas should not be empty + layout.metas.nonEmpty } check(property) @@ -47,11 +48,12 @@ class LayoutTest extends AnyFunSuite with Checkers with Matchers with Arbitrarie test("styles TypeTag list shouldn't be empty") { - val property = forAll { implicit settings: MicrositeSettings ⇒ - val layout = buildParentLayout + val property = forAll { + implicit settings: MicrositeSettings ⇒ + val layout = buildParentLayout - layout.styles should not be empty - layout.styles.nonEmpty + layout.styles should not be empty + layout.styles.nonEmpty } check(property) @@ -59,11 +61,12 @@ class LayoutTest extends AnyFunSuite with Checkers with Matchers with Arbitrarie test("scripts TypeTag list shouldn't be empty") { - val property = forAll { implicit settings: MicrositeSettings ⇒ - val layout = buildParentLayout + val property = forAll { + implicit settings: MicrositeSettings ⇒ + val layout = buildParentLayout - layout.scripts should not be empty - layout.scripts.nonEmpty + layout.scripts should not be empty + layout.scripts.nonEmpty } check(property) @@ -71,11 +74,12 @@ class LayoutTest extends AnyFunSuite with Checkers with Matchers with Arbitrarie test("globalFooter TypeTag should be `footer`") { - val property = forAll { implicit settings: MicrositeSettings ⇒ - val layout = buildParentLayout + val property = forAll { + implicit settings: MicrositeSettings ⇒ + val layout = buildParentLayout - layout.globalFooter.tag shouldBe "footer" - !layout.globalFooter.void + layout.globalFooter.tag shouldBe "footer" + !layout.globalFooter.void } check(property) @@ -83,8 +87,8 @@ class LayoutTest extends AnyFunSuite with Checkers with Matchers with Arbitrarie test("globalFooter TypeTag should have the appropriate content") { - val property = forAll { implicit settings: MicrositeSettings ⇒ - (settings.templateTexts.footer.isDefined) ==> { + val property = forAll { + implicit settings: MicrositeSettings ⇒ (settings.templateTexts.footer.isDefined) ==> { val layout = buildParentLayout layout.globalFooter.render contains settings.templateTexts.footer.get @@ -96,12 +100,13 @@ class LayoutTest extends AnyFunSuite with Checkers with Matchers with Arbitrarie test("globalFooter TypeTag should have the appropriate number of s") { - val property = forAll { implicit settings: MicrositeSettings ⇒ - val layout = buildParentLayout + val property = forAll { + implicit settings: MicrositeSettings ⇒ + val layout = buildParentLayout - val footer = settings.templateTexts.footer + val footer = settings.templateTexts.footer - "".r.findAllIn(layout.globalFooter.render).length === (4 + footer.fold(0)(_ => 2)) + "".r.findAllIn(layout.globalFooter.render).length === (4 + footer.fold(0)(_ => 2)) } check(property) @@ -109,11 +114,12 @@ class LayoutTest extends AnyFunSuite with Checkers with Matchers with Arbitrarie test("buildCollapseMenu TypeTag should be a `div`") { - val property = forAll { implicit settings: MicrositeSettings ⇒ - val layout = buildParentLayout + val property = forAll { + implicit settings: MicrositeSettings ⇒ + val layout = buildParentLayout - layout.buildCollapseMenu.tag shouldBe "nav" - !layout.buildCollapseMenu.void + layout.buildCollapseMenu.tag shouldBe "nav" + !layout.buildCollapseMenu.void } check(property) diff --git a/src/test/scala/microsites/PageLayoutTest.scala b/src/test/scala/microsites/PageLayoutTest.scala index fdc353b7..1c950b01 100644 --- a/src/test/scala/microsites/PageLayoutTest.scala +++ b/src/test/scala/microsites/PageLayoutTest.scala @@ -53,11 +53,12 @@ class PageLayoutTest extends AnyFunSuite with Checkers with Matchers with Arbitr test("pageMain should return a `main` TypeTag") { - val property = forAll { implicit settings: MicrositeSettings ⇒ - val layout = new PageLayout(settings) + val property = forAll { + implicit settings: MicrositeSettings ⇒ + val layout = new PageLayout(settings) - layout.pageMain.tag shouldBe "main" - !layout.pageMain.void + layout.pageMain.tag shouldBe "main" + !layout.pageMain.void } check(property)