@@ -241,6 +241,7 @@ lazy val commonSettings = Seq(
241
241
scalaVersion := " 2.12.20" ,
242
242
crossScalaVersions := Seq (" 2.12.20" ),
243
243
scalacOptions ++= buildScalacOptions(scalaVersion.value),
244
+ Test / scalacOptions ++= buildTestScalacOptions(scalaVersion.value),
244
245
Compile / compile / javacOptions ++= buildJavacOptions(),
245
246
logBuffered := true ,
246
247
transitiveClassifiers := Seq (" sources" , " javadoc" ),
@@ -297,7 +298,25 @@ def buildScalacOptions(scalaVersion: String) = {
297
298
// TODO: scala 2.12 phase out
298
299
// the import is needed for Scala 2.12 but issues an unused import warning under 2.13, so we add this to
299
300
// suppresss the warning
300
- " -Wconf:origin=scala.collection.compat.*:s"
301
+ " -Wconf:origin=scala.collection.compat.*:s" ,
302
+ // suppress nullary-unit warning in the specific trait
303
+ " -Wconf:cat=lint-nullary-unit:silent,site=org.apache.daffodil.junit.tdml.TdmlTests:silent"
304
+ )
305
+ case _ => Seq .empty
306
+ }
307
+
308
+ commonOptions ++ scalaVersionSpecificOptions
309
+ }
310
+
311
+ def buildTestScalacOptions (scalaVersion : String ) = {
312
+ val commonOptions = Seq .empty
313
+
314
+ val scalaVersionSpecificOptions = CrossVersion .partialVersion(scalaVersion) match {
315
+ case Some ((2 , 12 )) => Seq .empty
316
+ case Some ((2 , 13 )) =>
317
+ Seq (
318
+ // suppress nullary-unit warning in tests
319
+ " -Wconf:cat=lint-nullary-unit:silent"
301
320
)
302
321
case _ => Seq .empty
303
322
}
0 commit comments