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

Update scalafmt-core to 3.8.4 #825

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Scala Steward: Reformat with scalafmt 3.7.0
2c02dc2aa89af5c3322d7ab66af6731f9d674b74

# Scala Steward: Reformat with scalafmt 3.8.4
2537acdfbf3912456468bcb531d59cc7168693cc
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.8.1
version = 3.8.4
style = defaultWithAlign
maxColumn = 100
runner.dialect = scala3
Expand Down
9 changes: 4 additions & 5 deletions src/main/scala/microsites/MicrositeKeys.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand Down Expand Up @@ -518,7 +517,7 @@ trait MicrositeAutoImportSettings extends MicrositeKeys {
}
}
.unsafeRunSync()
})
}
case (GitHub4s.name, GitHub.name) =>
Def.task(
log.error(
Expand Down
9 changes: 5 additions & 4 deletions src/test/scala/microsites/DocsLayoutTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 5 additions & 4 deletions src/test/scala/microsites/HomeLayoutTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
58 changes: 32 additions & 26 deletions src/test/scala/microsites/LayoutTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,56 +35,60 @@ 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)
}

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)
}

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)
}

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)
}

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
Expand All @@ -96,24 +100,26 @@ class LayoutTest extends AnyFunSuite with Checkers with Matchers with Arbitrarie

test("globalFooter TypeTag should have the appropriate number of </div>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

"</div>".r.findAllIn(layout.globalFooter.render).length === (4 + footer.fold(0)(_ => 2))
"</div>".r.findAllIn(layout.globalFooter.render).length === (4 + footer.fold(0)(_ => 2))
}

check(property)
}

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)
Expand Down
9 changes: 5 additions & 4 deletions src/test/scala/microsites/PageLayoutTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading