scapegoat icon indicating copy to clipboard operation
scapegoat copied to clipboard

8 exception inspections ported to Scala 3

Open mccartney opened this issue 4 months ago • 4 comments

mccartney avatar Nov 28 '25 18:11 mccartney

 [error] -- Error: /home/runner/work/scapegoat/scapegoat/src/main/scala-3/com/sksamuel/scapegoat/inspections/exception/CatchException.scala:10:6 
[error]  9 |@SuppressWarnings(Array("IncorrectlyNamedExceptions"))
[error] 10 |class CatchException
[error]    |^
[error]    |[scapegoat] [IncorrectlyNamedExceptions] Incorrectly named exceptions

I wonder why does it work for Scala 2, but it doesn't for Scala 3 port.

===

At the same time we could consider renaming the inspection the ...Exception is indeed a misleading name for a class which is not an Exception or Throwable.

mccartney avatar Dec 04 '25 20:12 mccartney

Maybe it works with @nowarn in Scala 3?

saeltz avatar Dec 05 '25 13:12 saeltz

@mccartney, should we wait for you to open this PR or release a new version with Scala 2.12.21 before?

saeltz avatar Dec 09 '25 18:12 saeltz

Nah. Don't wait for this PR. This is not done yet. And I fail to know when I will be able to continue the work. So go ahead!

mccartney avatar Dec 09 '25 18:12 mccartney