Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable usage of @SuppressWarnings annotation instead of @silent in experimental mode #41

Closed
wants to merge 1 commit into from

Conversation

REDNBLACK
Copy link

Motivation for the change:

  • Other tools like a scalafix or WartRemover uses @SuppressWarning
  • It's hard to type and remember import com.github.ghik.silencer.silent if u're not using IntelliJ or other IDE
  • Requires useless provided dependency in classpath (silencer-lib), pollutes maven artifacts

@SuppressWarnings(Array("silencer")) works like @silent
@SuppressWarnings(Array("silencer:pattern")) works like @silent("pattern")

WDYT, @ghik ?

@SethTisue
Copy link
Contributor

fyi @lrytz

@ghik
Copy link
Owner

ghik commented Dec 10, 2019

First thought: since SuppressWarnings is used by other tools, some of these annotations may end up being interpreted by multiple tools at once, unintentionally, which doesn't seem good.

Also, since warning suppression will soon land in the compiler itself, I'm not sure if it's worth introducing the change into silencer, which will most likely become obsolete.

@ghik
Copy link
Owner

ghik commented May 12, 2020

Scala 2.13.2 introduced @nowarn and now this is the standard, also partially supported by silencer. See this comment for explanation why @nowarn is better than @SuppressWarnings in Scala.

@ghik ghik closed this May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants