-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from typelevel/replicate-issue-78
Try to replicate issue #78
- Loading branch information
Showing
7 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import _root_.io.github.davidgregory084.CiMode | ||
import _root_.io.github.davidgregory084.DevMode | ||
import munit.Assertions._ | ||
import scala.util.Try | ||
|
||
val Scala211 = "2.11.12" | ||
val Scala212 = "2.12.15" | ||
val Scala213 = "2.13.8" | ||
val Scala30 = "3.0.2" | ||
val Scala31 = "3.1.1" | ||
|
||
crossScalaVersions := Seq( | ||
Scala211, | ||
Scala212, | ||
Scala213, | ||
Scala30, | ||
Scala31 | ||
) | ||
|
||
Compile / tpolecatOptionsMode := CiMode | ||
Test / tpolecatOptionsMode := DevMode | ||
|
||
TaskKey[Unit]("checkCompileOptions") := { | ||
val hasFatalWarnings = | ||
scalacOptions.value.contains("-Xfatal-warnings") | ||
|
||
assert(hasFatalWarnings) | ||
} | ||
|
||
TaskKey[Unit]("checkTestOptions") := { | ||
val hasFatalWarnings = | ||
(Test / scalacOptions).value.contains("-Xfatal-warnings") | ||
|
||
assert(!hasFatalWarnings) | ||
} |
1 change: 1 addition & 0 deletions
1
src/sbt-test/sbt-tpolecat/modePerConfiguration/project/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=1.6.2 |
1 change: 1 addition & 0 deletions
1
src/sbt-test/sbt-tpolecat/modePerConfiguration/project/build.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
libraryDependencies += "org.scalameta" %% "munit" % "0.7.29" |
1 change: 1 addition & 0 deletions
1
src/sbt-test/sbt-tpolecat/modePerConfiguration/project/plugins.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % System.getProperty("plugin.version")) |
4 changes: 4 additions & 0 deletions
4
src/sbt-test/sbt-tpolecat/modePerConfiguration/src/main/scala/Main.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
object Main { | ||
def main(args: Array[String]): Unit = | ||
println("Hello world") | ||
} |
4 changes: 4 additions & 0 deletions
4
src/sbt-test/sbt-tpolecat/modePerConfiguration/src/test/scala/HasWarnings.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Unused import | ||
import scala.collection.immutable.ListSet | ||
|
||
object HasWarnings {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Check that the mode is applied in Compile | ||
> +checkCompileOptions | ||
> +compile | ||
# Check that the mode is applied in Test | ||
> +checkTestOptions | ||
> +Test/compile |