Skip to content

Commit 50becd3

Browse files
committed
go (nearly) warning-free on 2.13
1 parent 5453050 commit 50becd3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

build.sbt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor
1616
file -> url(s"http://www.scala-lang.org/api/${scalaVersion.value}/")
1717
}.toMap,
1818

19+
// go nearly warning-free, but only on 2.13, it's too hard across all versions
20+
Compile / scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match {
21+
case Some((2, 13)) => Seq("-Werror",
22+
// ideally we'd do something about this. `^?` is the responsible method
23+
"-Wconf:site=scala.util.parsing.combinator.Parsers.*&cat=lint-multiarg-infix:i",
24+
// not sure what resolving this would look like? didn't think about it too hard
25+
"-Wconf:site=scala.util.parsing.combinator.lexical.StdLexical.*&cat=other-match-analysis:i",
26+
)
27+
case _ => Seq()
28+
}),
1929
Compile / doc / scalacOptions ++= {
2030
if (isDotty.value)
2131
Seq("-language:Scala2")

0 commit comments

Comments
 (0)