@@ -90,12 +90,17 @@ final case class SbtCommunityProject(
9090 extraSbtArgs : List [String ] = Nil ,
9191 dependencies : List [CommunityProject ] = Nil ,
9292 sbtPublishCommand : String = null ,
93- sbtDocCommand : String = null
93+ sbtDocCommand : String = null ,
94+ scalacOptions : List [String ] = List (" -Ycheck-init" )
9495 ) extends CommunityProject :
9596 override val binaryName : String = " sbt"
9697
98+ private def scalacOptionsString : String =
99+ scalacOptions.map(" \" " + _ + " \" " ).mkString(" List(" , " ," , " )" )
100+
97101 private val baseCommand =
98102 " 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; """ )
99104 ++ s " ++ $compilerVersion!; "
100105
101106 override val testCommand =
@@ -307,7 +312,8 @@ object projects:
307312 lazy val shapeless = SbtCommunityProject (
308313 project = " shapeless" ,
309314 sbtTestCommand = " test" ,
310- sbtDocCommand = forceDoc(" typeable" , " deriving" , " data" )
315+ sbtDocCommand = forceDoc(" typeable" , " deriving" , " data" ),
316+ scalacOptions = Nil // disable -Ycheck-init, due to -Xfatal-warnings
311317 )
312318
313319 lazy val xmlInterpolator = SbtCommunityProject (
@@ -466,7 +472,8 @@ object projects:
466472 project = " discipline-specs2" ,
467473 sbtTestCommand = " test" ,
468474 sbtPublishCommand = " coreJVM/publishLocal;coreJS/publishLocal" ,
469- dependencies = List (discipline)
475+ dependencies = List (discipline),
476+ scalacOptions = Nil // disable -Ycheck-init
470477 )
471478
472479 lazy val simulacrumScalafixAnnotations = SbtCommunityProject (
@@ -479,7 +486,8 @@ object projects:
479486 project = " cats" ,
480487 sbtTestCommand = " set scalaJSStage in Global := FastOptStage;buildJVM;validateAllJS" ,
481488 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
483491 )
484492
485493 lazy val catsMtl = SbtCommunityProject (
0 commit comments