He-Pin commented on code in PR #1505:
URL: https://github.com/apache/pekko/pull/1505#discussion_r1901925961
##########
project/PekkoDisciplinePlugin.scala:
##########
@@ -101,16 +102,18 @@ object PekkoDisciplinePlugin extends AutoPlugin {
lazy val docs =
Seq(
Compile / scalacOptions -= defaultScalaOptions.value,
- Compile / scalacOptions ++= (
- if (scalaVersion.value.startsWith("3.")) Nil
- else Seq("-Wconf:cat=unused:s,cat=deprecation:s,cat=unchecked:s,any:e")
- ),
+ Compile / scalacOptions ++=
(CrossVersion.partialVersion(scalaVersion.value).get match {
+ case (3, _) =>
Seq("-Wconf:cat=unused:s,cat=deprecation,cat=other-shadowing:s,any:e")
+ case (2, 13) =>
Seq("-Wconf:any:e,cat=unused:s,cat=deprecation:s,cat=unchecked:s")
+ case (2, 12) =>
Seq("-Wconf:cat=unused:s,cat=deprecation:s,cat=unchecked:s,any:e")
+ }),
Test / scalacOptions --= Seq("-Xlint", "-unchecked", "-deprecation"),
Test / scalacOptions -= defaultScalaOptions.value,
- Test / scalacOptions ++= (
- if (scalaVersion.value.startsWith("3.")) Nil
- else Seq("-Wconf:cat=unused:s,cat=deprecation:s,cat=unchecked:s,any:e")
- ),
+ Test / scalacOptions ++=
(CrossVersion.partialVersion(scalaVersion.value).get match {
+ case (3, _) =>
Seq("-Wconf:cat=unused:s,cat=deprecation,cat=other-shadowing:s,any:e")
+ case (2, 13) =>
Seq("-Wconf:any:e,cat=unused:s,cat=deprecation:s,cat=unchecked:s")
+ case (2, 12) =>
Seq("-Wconf:cat=unused:s,cat=deprecation:s,cat=unchecked:s,any:e")
+ }),
Review Comment:
painful to tweak this, hope @som-snytt can back port this to 2.12.x too
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]