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

Silence warnings based on line content #42

Closed
ghik opened this issue Jan 7, 2020 · 6 comments
Closed

Silence warnings based on line content #42

ghik opened this issue Jan 7, 2020 · 6 comments

Comments

@ghik
Copy link
Owner

ghik commented Jan 7, 2020

This would be particularly useful in order to silence "unused import" warnings (#30) based on what's being imported, e.g. with regex-based compiler option like:

-P:silencer:lineContentFilters=import scala\.collection\.compat\._

@ghik ghik changed the title Silencer warnings based on line content Silence warnings based on line content Jan 7, 2020
@tjarvstrand
Copy link

This would be great! We get a lot of false positives for unused import when using implicits

@ghik
Copy link
Owner Author

ghik commented Feb 17, 2020

Fixed in 1.5.0

@ghik ghik closed this as completed Feb 17, 2020
@tjarvstrand
Copy link

Sweet!

@som-snytt
Copy link

@tjarvstrand There should be zero false positives in recent Scala versions. If you're using macros that require imports but don't emit code that uses them, that's a different kettle of fish.

@tjarvstrand
Copy link

We mostly get them in code related to pureconfig's automatic derivation which I think uses macros so maybe the problem is in there somewhere

@som-snytt
Copy link

@tjarvstrand thanks for the feedback.

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

No branches or pull requests

3 participants