Skip to content

Update scalafmt-core to 3.9.8 #141

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
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.9.8
551722a91f484baa1136adc20c1c89bf1948ff4e
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "3.7.17"
version = "3.9.8"
runner.dialect = scala213
2 changes: 1 addition & 1 deletion snabbdom/src/main/scala/snabbdom/VNode.scala
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ object VNode {
private def prettyPrint(vnode: VNode): String = {
def go(indent: Int, vnode: VNode): String = {
vnode match {
case Text(content) => s"${" " * indent}$content"
case Text(content) => s"${" " * indent}$content"
case Element(sel, data, children) =>
s"""|${" " * indent}<$sel${data.key.fold("")(key => s" key=$key")}>
|${children.map(go(indent + 2, _)).mkString("\n")}
Expand Down
8 changes: 4 additions & 4 deletions snabbdom/src/main/scala/snabbdom/h.scala
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ object h {

private[snabbdom] def addNS(vnode: PatchedVNode): PatchedVNode = {
vnode match {
case Comment(_, _) => vnode
case PatchedVNode.Text(_, _) => vnode
case Comment(_, _) => vnode
case PatchedVNode.Text(_, _) => vnode
case PatchedVNode.Element(sel, data, children, elm) =>
PatchedVNode.Element(
sel,
Expand All @@ -128,8 +128,8 @@ object h {

private[snabbdom] def addNS(vnode: VNode): VNode = {
vnode match {
case VNode.Comment(_) => vnode
case VNode.Text(_) => vnode
case VNode.Comment(_) => vnode
case VNode.Text(_) => vnode
case VNode.Element(sel, data, children) =>
VNode.Element(
sel,
Expand Down
4 changes: 2 additions & 2 deletions snabbdom/src/test/scala/snabbdom/RandomizedSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class RandomizedSuite extends BaseSuite {
(0 until nSamples).map { _ =>
Future(nodesGen.sample)
.map {
case None => Future.unit
case None => Future.unit
case Some(vnodes) =>
val elm = dom.document.createElement("div")
val vnode = vnodes.tail.foldLeft(patch(elm, vnodes.head)) {
Expand Down Expand Up @@ -127,7 +127,7 @@ class RandomizedSuite extends BaseSuite {
Future.sequence {
(0 until nSamples).map { _ =>
Future(nodesGen.sample).map {
case None => Future.unit
case None => Future.unit
case Some(vnodes) =>
val elm = dom.document.createElement("div")

Expand Down
4 changes: 2 additions & 2 deletions snabbdom/src/test/scala/snabbdom/VNodeGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,15 @@ object VNodeGen {

private def keys(vnode: VNode): Set[String] =
vnode match {
case VNode.Comment(_) => Set.empty
case VNode.Comment(_) => Set.empty
case VNode.Element(_, data, children) =>
data.key.toSet.union(children.map(keys).toList.flatten.toSet)
case VNode.Text(_) => Set.empty
}

private def depth(vnode: VNode): Long =
vnode match {
case VNode.Comment(_) => 1
case VNode.Comment(_) => 1
case VNode.Element(_, _, children) =>
1 + children.map(depth).maxOption.getOrElse(0L)
case VNode.Text(_) => 1
Expand Down
Loading