typelevel / sbt-tpolecat

scalac options for the enlightened
Apache License 2.0
376 stars 52 forks source link

`-Wnonunit-statement` seems not to work for scala-3 (3.3.3) #208

Closed froth closed 3 months ago

froth commented 3 months ago

I created the following reproducing example: https://github.com/froth/sbt-tpolecat-reproducer

I added the plugin to the build: https://github.com/froth/sbt-tpolecat-reproducer/blob/main/project/plugins.sbt

And created code that should warn(but does not): https://github.com/froth/sbt-tpolecat-reproducer/blob/main/src/main/scala/example/ShouldWarn.scala#L6

But if I add the following line to sbt it does warn: scalacOptions += "-Wnonunit-statement" (https://github.com/froth/sbt-tpolecat-reproducer/blob/main/build.sbt#L9)

Running sbt tpolecatScalacOptions however contains ScalacOption(-Wnonunit-statement) and therefore I am really confused what exactly is wrong.

froth commented 3 months ago

This has already been fixed in main (https://github.com/typelevel/sbt-tpolecat/commit/c48d7d9ddaac861df020ee4637ace5f8e5728db6) @TonioGela would it be possible to cut a new release?

TonioGela commented 3 months ago

This has already been fixed in main (c48d7d9) @TonioGela would it be possible to cut a new release?

0.5.1 has been released

froth commented 3 months ago

Thanks! 😊