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

Commit 0a062e4

Browse files
author
exoego
committed
Disable -Wunused:privates to allow private constructor.
Also enable more lint options for quality.
1 parent 37516f9 commit 0a062e4

File tree

3 files changed

+33
-5
lines changed

3 files changed

+33
-5
lines changed

app/current/src/main/scala/io/scalajs/nodejs/dgram/Socket.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import scala.scalajs.js.annotation.JSImport
1616
*/
1717
@js.native
1818
@JSImport("dgram", "Socket")
19-
class Socket extends IEventEmitter {
19+
class Socket private[this] () extends IEventEmitter {
2020

2121
/**
2222
* Tells the kernel to join a multicast group at the given multicastAddress and multicastInterface using the

core/src/main/scala/io/scalajs/util/PromiseHelper.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ object PromiseHelper {
261261
case Success(_) =>
262262
val elapsedTime = System.currentTimeMillis - startTime
263263
println(f"$action took $elapsedTime msecs")
264-
case Failure(e) =>
264+
case Failure(_) =>
265265
val elapsedTime = System.currentTimeMillis - startTime
266266
println(f"$action took $elapsedTime msecs")
267267
}

project/MySettings.scala

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,37 @@ object MySettings {
1212
"-deprecation",
1313
"-unchecked",
1414
"-feature",
15-
"-language:implicitConversions",
16-
"-Xlint"
17-
),
15+
"-language:implicitConversions"
16+
) ++ Seq(
17+
"adapted-args",
18+
"nullary-unit",
19+
"inaccessible",
20+
"nullary-override",
21+
"infer-any",
22+
"missing-interpolator",
23+
"doc-detached",
24+
"private-shadow",
25+
"type-parameter-shadow",
26+
"poly-implicit-overload",
27+
"option-implicit",
28+
"delayedinit-select",
29+
"package-object-classes",
30+
"stars-align",
31+
"constant",
32+
"nonlocal-return",
33+
"implicit-not-found",
34+
"serial",
35+
"valpattern",
36+
"eta-zero",
37+
"eta-sam",
38+
"deprecation"
39+
).map(s => s"-Xlint:${s}") ++ Seq(
40+
// no privates to allow private constructor
41+
"imports",
42+
"patvars",
43+
"locals",
44+
"implicits"
45+
).map(s => s"-Wunused:${s}"),
1846
scalacOptions in Compile in compile ++= Seq(
1947
"-Xfatal-warnings"
2048
),

0 commit comments

Comments
 (0)