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

Commit 415e8c9

Browse files
authored
Merge pull request #323 from exoego/scalafmt2
Update scalafmt to 2.7.4
2 parents 6a9bbc1 + 3944aeb commit 415e8c9

File tree

129 files changed

+938
-1875
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+938
-1875
lines changed

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "2.7.3"
1+
version = "2.7.4"
22
style = defaultWithAlign
33
maxColumn = 120
44
align.openParenDefnSite = true

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/AssertTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ package io.scalajs.nodejs
33
import scala.scalajs.js
44
import org.scalatest.funspec.AnyFunSpec
55

6-
/**
7-
* Assert Test
6+
/** Assert Test
87
*/
98
class AssertTest extends AnyFunSpec {
109
describe("Assert") {

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/child_process/ChildProcessTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import scala.scalajs.js
99
import scala.scalajs.js.|
1010
import org.scalatest.funspec.AsyncFunSpec
1111

12-
/**
13-
* ChildProcess Test
12+
/** ChildProcess Test
1413
*/
1514
class ChildProcessTest extends AsyncFunSpec {
1615
override implicit val executionContext = ExecutionContext.Implicits.global

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/dns/DNSAsyncTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import scala.concurrent.{ExecutionContext, Promise}
55
import scala.scalajs.js
66
import org.scalatest.funspec.AsyncFunSpec
77

8-
/**
9-
* DNS Tests
8+
/** DNS Tests
109
*/
1110
class DNSAsyncTest extends AsyncFunSpec {
1211
private val domain = "google.com"

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/fs/FsTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import io.scalajs.nodejs.TestHelper._
66
import scala.concurrent.{ExecutionContext, Promise}
77
import org.scalatest.funspec.AsyncFunSpec
88

9-
/**
10-
* File System (Fs) Tests
9+
/** File System (Fs) Tests
1110
*/
1211
class FsTest extends AsyncFunSpec {
1312
override implicit val executionContext = ExecutionContext.Implicits.global

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/http/HttpTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ package http
44
import scala.scalajs.js
55
import org.scalatest.funspec.AnyFunSpec
66

7-
/**
8-
* Http Tests
7+
/** Http Tests
98
*/
109
class HttpTest extends AnyFunSpec {
1110
describe("Http") {

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/http/StatusCodeTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ package io.scalajs.nodejs.http
33
import scala.scalajs.js
44
import org.scalatest.funspec.AnyFunSpec
55

6-
/**
7-
* Http Tests
6+
/** Http Tests
87
*/
98
class StatusCodeTest extends AnyFunSpec {
109
describe("Http") {

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/net/NetTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ package io.scalajs.nodejs.net
22

33
import org.scalatest.funspec.AnyFunSpec
44

5-
/**
6-
* Network (Net) Tests
5+
/** Network (Net) Tests
76
*/
87
class NetTest extends AnyFunSpec {
98
describe("Net") {

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/os/OSTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ package io.scalajs.nodejs.os
33
import io.scalajs.nodejs.TestHelper._
44
import org.scalatest.funspec.AnyFunSpec
55

6-
/**
7-
* OS Tests
6+
/** OS Tests
87
*/
98
class OSTest extends AnyFunSpec {
109
describe("OS") {

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/querystring/QueryStringTest.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import io.scalajs.nodejs.querystring.QueryStringTest.MyParams
55
import scala.scalajs.js
66
import org.scalatest.funspec.AnyFunSpec
77

8-
/**
9-
* Query String Test
8+
/** Query String Test
109
*/
1110
class QueryStringTest extends AnyFunSpec {
1211
describe("QueryString") {
@@ -41,8 +40,7 @@ class QueryStringTest extends AnyFunSpec {
4140
}
4241
}
4342

44-
/**
45-
* Query String Test Companion
43+
/** Query String Test Companion
4644
*/
4745
object QueryStringTest {
4846
class MyParams(val foo: String, val bar: String) extends js.Object

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/readline/ReadlineTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import io.scalajs.nodejs.process.Process
66
import scala.concurrent.{ExecutionContext, Promise}
77
import org.scalatest.funspec.AsyncFunSpec
88

9-
/**
10-
* Readline Tests
9+
/** Readline Tests
1110
*/
1211
class ReadlineTest extends AsyncFunSpec {
1312
override implicit val executionContext = ExecutionContext.Implicits.global

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/tty/TTYTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ package io.scalajs.nodejs.tty
22

33
import org.scalatest.funspec.AnyFunSpec
44

5-
/**
6-
* TTY Test
5+
/** TTY Test
76
*/
87
class TTYTest extends AnyFunSpec {
98
describe("TTY") {

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/url/URLObjectTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import org.scalatest.funspec.AnyFunSpec
55

66
import scala.scalajs.js
77

8-
/**
9-
* URLObject Tests
8+
/** URLObject Tests
109
*/
1110
class URLObjectTest extends AnyFunSpec {
1211
describe("URLObject") {

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/vm/VMTest.scala

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import io.scalajs.nodejs.vm.VMTest.{ExpectedData, Sandbox}
55
import scala.scalajs.js
66
import org.scalatest.funspec.AnyFunSpec
77

8-
/**
9-
* VM Tests
8+
/** VM Tests
109
*/
1110
class VMTest extends AnyFunSpec {
1211
describe("VM") {
@@ -41,13 +40,11 @@ class VMTest extends AnyFunSpec {
4140
}
4241
}
4342

44-
/**
45-
* VM Test Companion
43+
/** VM Test Companion
4644
*/
4745
object VMTest {
4846

49-
/**
50-
* Sandbox Object
47+
/** Sandbox Object
5148
*/
5249
class Sandbox(var animal: String, var count: Int, var name: String) extends js.Object
5350

app/nodejs-v12/src/test/scala/io/scalajs/nodejs/buffer/BufferTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ package io.scalajs.nodejs.buffer
33
import scala.scalajs.js
44
import org.scalatest.funspec.AnyFunSpec
55

6-
/**
7-
* Buffer Tests
6+
/** Buffer Tests
87
*/
98
class BufferTest extends AnyFunSpec {
109
it("should support writeBigInt64BE, writeBigInt64LE, writeBigInt64BE and writeBigInt64BE") {

app/nodejs-v12/src/test/scala/io/scalajs/nodejs/fs/FsClassesTest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import org.scalatest.funspec.AnyFunSpec
55

66
import scala.scalajs.js.JavaScriptException
77

8-
/**
9-
* File System (Fs) Tests
8+
/** File System (Fs) Tests
109
*/
1110
class FsClassesTest extends AnyFunSpec {
1211
describe("ReadStream") {

app/nodejs-v14/src/main/scala/io/scalajs/nodejs/Assert.scala

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ package io.scalajs.nodejs
33
import scala.scalajs.js
44
import scala.scalajs.js.annotation.JSImport
55

6-
/**
7-
* The assert module provides a simple set of assertion tests that can be used to test invariants. The module is
6+
/** The assert module provides a simple set of assertion tests that can be used to test invariants. The module is
87
* intended for internal use by Node.js, but can be used in application code via require('assert'). However, assert
98
* is not a testing framework, and is not intended to be used as a general purpose assertion library.
109
*
@@ -14,16 +13,14 @@ import scala.scalajs.js.annotation.JSImport
1413
@js.native
1514
trait Assert extends js.Object {
1615

17-
/**
18-
* An alias of assert.ok() .
16+
/** An alias of assert.ok() .
1917
* @param expression the expression to evaluate
2018
* @example assert(value[, message])
2119
*/
2220
def apply(expression: js.Any, message: String): Unit = js.native
2321
def apply(expression: js.Any): Unit = js.native
2422

25-
/**
26-
* Generally identical to assert.deepEqual() with two exceptions. First, primitive values are compared using the
23+
/** Generally identical to assert.deepEqual() with two exceptions. First, primitive values are compared using the
2724
* strict equality operator ( === ). Second, object comparisons include a strict equality check of their prototypes.
2825
* @example assert.deepStrictEqual(actual, expected[, message])
2926
*/
@@ -43,8 +40,7 @@ trait Assert extends js.Object {
4340
def doesNotReject(asyncFn: js.Promise[_], message: String): Unit = js.native
4441
def doesNotReject(asyncFn: js.Promise[_]): Unit = js.native
4542

46-
/**
47-
* Asserts that the function block does not throw an error. See assert.throws() for more details.
43+
/** Asserts that the function block does not throw an error. See assert.throws() for more details.
4844
* When assert.doesNotThrow() is called, it will immediately call the block function. If an error is thrown
4945
* and it is the same type as that specified by the error parameter, then an AssertionError is thrown. If the
5046
* error is of a different type, or if the error parameter is undefined, the error is propagated back to the caller.
@@ -57,56 +53,48 @@ trait Assert extends js.Object {
5753
def doesNotThrow(block: js.Function, message: String): Unit = js.native
5854
def doesNotThrow(block: js.Function): Unit = js.native
5955

60-
/**
61-
* @see https://nodejs.org/api/assert.html#assert_assert_fail_message
56+
/** @see https://nodejs.org/api/assert.html#assert_assert_fail_message
6257
*/
6358
def fail(message: String): Unit = js.native
6459

65-
/**
66-
* @see https://nodejs.org/api/assert.html#assert_assert_fail_message
60+
/** @see https://nodejs.org/api/assert.html#assert_assert_fail_message
6761
*/
6862
def fail(message: js.Error): Unit = js.native
6963

7064
@deprecated("Use assert.fail([message]) or other assert functions instead.", "Node.js v10.0.0")
7165
def fail(actual: js.Any, expected: js.Any, message: String, operator: String): Unit = js.native
7266

73-
/**
74-
* Throws value if value is truthy. This is useful when testing the error argument in callbacks.
67+
/** Throws value if value is truthy. This is useful when testing the error argument in callbacks.
7568
* @example assert.ifError(value)
7669
*/
7770
def ifError(value: js.Any): Unit = js.native
7871

79-
/**
80-
* Tests for deep strict inequality. Opposite of assert.deepStrictEqual().
72+
/** Tests for deep strict inequality. Opposite of assert.deepStrictEqual().
8173
* @example assert.notDeepStrictEqual(actual, expected[, message])
8274
*/
8375
def notDeepStrictEqual(actual: js.Any, expected: js.Any, message: String): Unit = js.native
8476
def notDeepStrictEqual(actual: js.Any, expected: js.Any): Unit = js.native
8577

86-
/**
87-
* Tests strict inequality as determined by the strict not equal operator ( !== ).
78+
/** Tests strict inequality as determined by the strict not equal operator ( !== ).
8879
* @example assert.notStrictEqual(actual, expected[, message])
8980
*/
9081
def notStrictEqual(actual: js.Any, expected: js.Any, message: String): Unit = js.native
9182
def notStrictEqual(actual: js.Any, expected: js.Any): Unit = js.native
9283

93-
/**
94-
* Tests if value is truthy. It is equivalent to assert.equal(!!value, true, message). If value is not truthy,
84+
/** Tests if value is truthy. It is equivalent to assert.equal(!!value, true, message). If value is not truthy,
9585
* an AssertionError is thrown with a message property set equal to the value of the message parameter. If the
9686
* message parameter is undefined, a default error message is assigned.
9787
*/
9888
def ok(value: js.Any, message: String): Unit = js.native
9989
def ok(value: js.Any): Unit = js.native
10090

101-
/**
102-
* Tests strict equality as determined by the strict equality operator ( === ).
91+
/** Tests strict equality as determined by the strict equality operator ( === ).
10392
* @example assert.strictEqual(actual, expected[, message])
10493
*/
10594
def strictEqual(actual: js.Any, expected: js.Any, message: String): Unit = js.native
10695
def strictEqual(actual: js.Any, expected: js.Any): Unit = js.native
10796

108-
/**
109-
* If the values are not strictly equal, an AssertionError is thrown with a message property set equal to the value
97+
/** If the values are not strictly equal, an AssertionError is thrown with a message property set equal to the value
11098
* of the message parameter. If the message parameter is undefined, a default error message is assigned.
11199
* @example assert.throws(block[, error][, message])
112100
*/
@@ -123,8 +111,7 @@ trait Assert extends js.Object {
123111
def rejects(asyncFn: js.Promise[_]): Unit = js.native
124112
}
125113

126-
/**
127-
* Assert Singleton
114+
/** Assert Singleton
128115
*/
129116
@js.native
130117
@JSImport("assert", JSImport.Namespace)

app/nodejs-v14/src/main/scala/io/scalajs/nodejs/Error.scala

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import com.thoughtworks.enableIf
55
import scala.scalajs.js
66
import scala.scalajs.js.annotation.JSGlobal
77

8-
/**
9-
* Creates a new Error object and sets the error.message property to the provided text message.
8+
/** Creates a new Error object and sets the error.message property to the provided text message.
109
* If an object is passed as message, the text message is generated by calling message.toString().
1110
* The error.stack property will represent the point in the code at which new Error() was called.
1211
* Stack traces are dependent on V8's stack trace API. Stack traces extend only to either (a) the
@@ -18,31 +17,27 @@ import scala.scalajs.js.annotation.JSGlobal
1817
class Error() extends js.Object {
1918
def this(message0: String) = this()
2019

21-
/**
22-
* The `error.code` property is a string label that identifies the kind of error.
20+
/** The `error.code` property is a string label that identifies the kind of error.
2321
* `error.code` is the most stable way to identify an error.
2422
* It will only change between major versions of Node.js.
2523
* In contrast, error.message strings may change between any versions of Node.js
2624
* See Node.js Error Codes for details about specific codes.
2725
*/
2826
val code: String = js.native
2927

30-
/**
31-
* The error.message property is the string description of the error as set by calling new Error(message).
28+
/** The error.message property is the string description of the error as set by calling new Error(message).
3229
* The message passed to the constructor will also appear in the first line of the stack trace of the Error,
3330
* however changing this property after the Error object is created may not change the first line of the
3431
* stack trace (for example, when error.stack is read before this property is changed).
3532
*/
3633
val message: String = js.native
3734

38-
/**
39-
* The error.stack property is a string describing the point in the code at which the Error was instantiated.
35+
/** The error.stack property is a string describing the point in the code at which the Error was instantiated.
4036
*/
4137
val stack: js.Any = js.native
4238
}
4339

44-
/**
45-
* Error Singleton
40+
/** Error Singleton
4641
*/
4742
@js.native
4843
@JSGlobal
@@ -51,17 +46,15 @@ object Error extends js.Object {
5146
// Properties
5247
/////////////////////////////////////////////////////////////////////////////////
5348

54-
/**
55-
* Error.stackTraceLimit
49+
/** Error.stackTraceLimit
5650
*/
5751
def stackTraceLimit: Int = js.native
5852

5953
/////////////////////////////////////////////////////////////////////////////////
6054
// Methods
6155
/////////////////////////////////////////////////////////////////////////////////
6256

63-
/**
64-
* Creates a .stack property on targetObject, which when accessed returns a string representing the location in the
57+
/** Creates a .stack property on targetObject, which when accessed returns a string representing the location in the
6558
* code at which Error.captureStackTrace() was called.
6659
* @param targetObject The first line of the trace, instead of being prefixed with ErrorType: message, will be the
6760
* result of calling targetObject.toString().

0 commit comments

Comments
 (0)