Skip to content

Instantly share code, notes, and snippets.

@Daenyth
Created April 30, 2024 15:37
Show Gist options
  • Save Daenyth/a008964c61b1740974767b833064cc5e to your computer and use it in GitHub Desktop.
Save Daenyth/a008964c61b1740974767b833064cc5e to your computer and use it in GitHub Desktop.
Allow scalatest/scalamock to not ruin -Wnonunit-statement
Test / scalacOptions ++= Seq(
// Allow using -Wnonunit-statement to find bugs in tests without exploding from scalatest assertions
"-Wconf:msg=unused value of type org.scalatest.Assertion:s",
"-Wconf:msg=unused value of type org.scalamock:s"
)
@vpatryshev
Copy link

I had to add more. Like this:

    "-Wconf:msg=unused value of type org.scalatest.Assertion:s",
    "-Wconf:msg=unused value of type org.specs2.specification.core.Fragment:s",
    "-Wconf:msg=unused value of type org.specs2.matcher.MatchResult:s",
    "-Wconf:msg=unused value of type org.scalamock:s"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment