Skip to content

Commit 4b3c2ba

Browse files
committed
Don't set -Xlint for Scala 3
1 parent 1e315f2 commit 4b3c2ba

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/scala/ScalaModulePlugin.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,13 @@ object ScalaModulePlugin extends AutoPlugin {
6767
organization := "org.scala-lang.modules",
6868

6969
// don't use for doc scope, scaladoc warnings are not to be reckoned with
70-
Compile / compile / scalacOptions ++= Seq("-feature", "-deprecation", "-unchecked", "-Xlint"),
70+
Compile / compile / scalacOptions ++= Seq("-feature", "-deprecation", "-unchecked"),
71+
Compile / compile / scalacOptions ++= {
72+
CrossVersion.partialVersion(scalaVersion.value) match {
73+
case Some((2, _)) => Seq("-Xlint")
74+
case _ => Seq.empty
75+
}
76+
},
7177

7278
// Generate $name.properties to store our version as well as the scala version used to build
7379
Compile / resourceGenerators += Def.task {

0 commit comments

Comments
 (0)