Skip to content

Commit dfc8a09

Browse files
committed
fix: suppress warnings exposed by -Xfatal-warnings/-Werror
Remove unused classTag import in HttpMessage.scala. Add -Wconf suppressions for structural type warning (Scala 2), synchronized warning and override-deprecated warning (Scala 3).
1 parent bccf46f commit dfc8a09

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/HttpMessage.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import scala.collection.immutable
2424
import scala.concurrent.{ ExecutionContext, Future }
2525
import scala.concurrent.duration._
2626
import scala.jdk.FutureConverters._
27-
import scala.reflect.{ classTag, ClassTag }
27+
import scala.reflect.ClassTag
2828

2929
import org.apache.pekko
3030
import pekko.Done

project/Common.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,12 @@ object Common extends AutoPlugin {
4141
// Exhaustivity checking is only useful for simple sealed hierarchies and matches without filters.
4242
// In all other cases, the warning is non-actionable: you get spurious warnings that need to be suppressed
4343
// verbosely. So, opt out of those in general.
44-
"-Wconf:cat=other-match-analysis&msg=match may not be exhaustive:s")).value,
44+
"-Wconf:cat=other-match-analysis&msg=match may not be exhaustive:s",
45+
"-Wconf:msg=inferred structural type:s")).value,
4546
scalacOptions ++= onlyOnScala3(Seq(
46-
"-Werror")).value,
47+
"-Werror",
48+
"-Wconf:msg=Suspicious top-level unqualified call to synchronized:s",
49+
"-Wconf:msg=overrides concrete, non-deprecated definition:s")).value,
4750
scalacOptions ++= onlyOnScala3Below39(Seq("-Yfuture-lazy-vals")).value,
4851
javacOptions ++=
4952
Seq("-encoding", "UTF-8", "--release", javacTarget),

0 commit comments

Comments
 (0)