@@ -90,12 +90,17 @@ final case class SbtCommunityProject(
90
90
extraSbtArgs : List [String ] = Nil ,
91
91
dependencies : List [CommunityProject ] = Nil ,
92
92
sbtPublishCommand : String = null ,
93
- sbtDocCommand : String = null
93
+ sbtDocCommand : String = null ,
94
+ scalacOptions : List [String ] = List (" -Ycheck-init" )
94
95
) extends CommunityProject :
95
96
override val binaryName : String = " sbt"
96
97
98
+ private def scalacOptionsString : String =
99
+ scalacOptions.map(" \" " + _ + " \" " ).mkString(" List(" , " ," , " )" )
100
+
97
101
private val baseCommand =
98
102
" clean; set logLevel in Global := Level.Error; set updateOptions in Global ~= (_.withLatestSnapshots(false)); "
103
+ ++ (if scalacOptions.isEmpty then " " else s """ set scalacOptions in Global ++= $scalacOptionsString; """ )
99
104
++ s " ++ $compilerVersion!; "
100
105
101
106
override val testCommand =
@@ -307,7 +312,8 @@ object projects:
307
312
lazy val shapeless = SbtCommunityProject (
308
313
project = " shapeless" ,
309
314
sbtTestCommand = " test" ,
310
- sbtDocCommand = forceDoc(" typeable" , " deriving" , " data" )
315
+ sbtDocCommand = forceDoc(" typeable" , " deriving" , " data" ),
316
+ scalacOptions = Nil // disable -Ycheck-init, due to -Xfatal-warnings
311
317
)
312
318
313
319
lazy val xmlInterpolator = SbtCommunityProject (
@@ -466,7 +472,8 @@ object projects:
466
472
project = " discipline-specs2" ,
467
473
sbtTestCommand = " test" ,
468
474
sbtPublishCommand = " coreJVM/publishLocal;coreJS/publishLocal" ,
469
- dependencies = List (discipline)
475
+ dependencies = List (discipline),
476
+ scalacOptions = Nil // disable -Ycheck-init
470
477
)
471
478
472
479
lazy val simulacrumScalafixAnnotations = SbtCommunityProject (
@@ -479,7 +486,8 @@ object projects:
479
486
project = " cats" ,
480
487
sbtTestCommand = " set scalaJSStage in Global := FastOptStage;buildJVM;validateAllJS" ,
481
488
sbtPublishCommand = " catsJVM/publishLocal;catsJS/publishLocal" ,
482
- dependencies = List (discipline, disciplineMunit, scalacheck, simulacrumScalafixAnnotations)
489
+ dependencies = List (discipline, disciplineMunit, scalacheck, simulacrumScalafixAnnotations),
490
+ scalacOptions = Nil // disable -Ycheck-init, due to -Xfatal-warning
483
491
)
484
492
485
493
lazy val catsMtl = SbtCommunityProject (
0 commit comments