Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Update scalafmt to v2.7.0 #315

Merged
merged 1 commit into from
Sep 9, 2020
Merged
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: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "2.6.4"
version = "2.7.0"
style = defaultWithAlign
maxColumn = 120
align.openParenDefnSite = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ class ChildProcessTest extends AsyncFunSpec {
}
}
)
promise.future.map {
case (stdout, stderr) =>
assert(stdout.toString.trim.toInt === 19)
assert(stderr.toString.trim === "")
promise.future.map { case (stdout, stderr) =>
assert(stdout.toString.trim.toInt === 19)
assert(stderr.toString.trim === "")
}
}

Expand All @@ -58,10 +57,9 @@ class ChildProcessTest extends AsyncFunSpec {
}
}
)
promise.future.map {
case (stdout, stderr) =>
assert(stdout.toString.trim.linesIterator.length > 1)
assert(stderr.toString.trim === "")
promise.future.map { case (stdout, stderr) =>
assert(stdout.toString.trim.linesIterator.length > 1)
assert(stderr.toString.trim === "")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ class DNSAsyncTest extends AsyncFunSpec {
promise.success((hostname, service))
}
)
promise.future.map {
case (host, service) =>
assert(host === "localhost")
assert(service === "ssh")
promise.future.map { case (host, service) =>
assert(host === "localhost")
assert(service === "ssh")
}
}

Expand All @@ -64,16 +63,14 @@ class DNSAsyncTest extends AsyncFunSpec {

describe("DNS future extension") {
it("supports lookupFuture") {
DNS.lookupFuture(domain) map {
case (ipAddress, ttl) =>
assert(ttl > 0 && ipAddress.nonEmpty)
DNS.lookupFuture(domain) map { case (ipAddress, ttl) =>
assert(ttl > 0 && ipAddress.nonEmpty)
}
}

it("supports lookupServiceFuture:SSH") {
DNS.lookupServiceFuture("127.0.0.1", 22) map {
case (hostname, service) =>
assert(hostname.nonEmpty && service.nonEmpty)
DNS.lookupServiceFuture("127.0.0.1", 22) map { case (hostname, service) =>
assert(hostname.nonEmpty && service.nonEmpty)
}
}

Expand Down
12 changes: 5 additions & 7 deletions app/nodejs-v10/src/test/scala/io/scalajs/nodejs/fs/FsTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ class FsTest extends AsyncFunSpec {
)
)

promise.future.map {
case (eventType, file) =>
assert(eventType === "change")
assert(file === "1.txt")
promise.future.map { case (eventType, file) =>
assert(eventType === "change")
assert(file === "1.txt")
}
}

Expand Down Expand Up @@ -96,9 +95,8 @@ class FsTest extends AsyncFunSpec {
promise.success((Fs.statSync(file1), Fs.statSync(file2)))
}

promise.future.map {
case (stat1, stat2) =>
assert(stat1.size === stat2.size)
promise.future.map { case (stat1, stat2) =>
assert(stat1.size === stat2.size)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ class OSTest extends AnyFunSpec {
it("supports networkInterfaces()") {
val networkInterfaces = OS.networkInterfaces()
assert(isDefined(networkInterfaces))
networkInterfaces foreach {
case (name, iface) =>
assert(name.nonEmpty)
assert(iface.nonEmpty)
networkInterfaces foreach { case (name, iface) =>
assert(name.nonEmpty)
assert(iface.nonEmpty)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ class VMTest extends AnyFunSpec {

val script = new Script("""count += 1; name = "kitty" + count""")
val context = VM.createContext(sandbox)
expectedSet foreach {
case ExpectedData(animal, count, name) =>
script.runInContext(context)
assert(sandbox.animal === animal && sandbox.count === count && sandbox.name === name)
expectedSet foreach { case ExpectedData(animal, count, name) =>
script.runInContext(context)
assert(sandbox.animal === animal && sandbox.count === count && sandbox.name === name)
}
}

Expand Down