Re: Compiler plugin for warning suppression
Eugene Burmako <[email protected]>
| Newsgroups | gmane.comp.lang.scala |
|---|---|
| Message-ID | <[email protected]> |
Some questions: 1) treeRangePos says "approximate". Is it possible to make it non-approximate? 2) Will this work with Scala IDE? Iirc it only runs up until typer and then stops compilation. 3) In general, what about extensibility? If an AnalyzerPlugin and/or MacroPlugin plugin wants to check whether there are warnings reported, how does it do that? 4) What do you think of per-file and per-project suppressions? On Tuesday, April 14, 2015 at 11:46:01 PM UTC+2, Roman Janusz wrote: > > Hello, > > Recently, inspired by the Towards a Safer Scala > <http://confreaks.tv/videos/pnws2014-towards-a-safer-scala> talk from > this year's ScalaDays, I wanted to try out the set of scalac options > recommended by the speaker: > > scalacOptions ++= Seq( > "-Xlint", > "-Xdeprecation", > "-Xfatal-warnings" > ) > > Unfortunately, almost immediately I ran into a show-stopper: Scala has no > warning suppression similar to Java's @SuppressWarnings. I googled around > and unpleasantly found out that requests for this feature have been > rejected. See for example SI-1781 > <https://issues.scala-lang.org/browse/SI-1781>. > > But I realized that writing a compiler plugin which could fill that gap > would not be that hard. > > So here it is: > > *silencer <https://github.com/ghik/silencer>*It would be nice to have > some feedback from you, Scala users, to see if there is any interest in > maintaining such plugin. The current proof-of-concept implementation is > really simple and small, but uses internal scalac API, so I guess there's > no guarantee that it won't break with some new Scala version. That is also > why I think some community support would help a lot. > > Cheers, > Roman > -- You received this message because you are subscribed to the Google Groups "scala-language" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.