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

False positive-ish: no way to suppress warnings on imports #22

Open
marconilanna opened this issue Nov 11, 2017 · 2 comments
Open

False positive-ish: no way to suppress warnings on imports #22

marconilanna opened this issue Nov 11, 2017 · 2 comments
Assignees

Comments

@marconilanna
Copy link

This relates to wartremover/wartremover#410

Given that there is no way to annotate imports, maybe OldTime should not be warning about them, but only about usage sites.

import java.util.Date // wartremover error here. how to whitelist it?

@SuppressWarnings(Array(Warts.OldTime))
class X {
  def y = legacyJavaApi.z(new Date)
}
@amanjpro
Copy link
Collaborator

That should be easy, will try to find time to address it.

@amanjpro amanjpro self-assigned this Nov 13, 2017
amanjpro pushed a commit to amanjpro/wartremover-contrib that referenced this issue Nov 14, 2017
@pmpfr
Copy link

pmpfr commented May 4, 2018

I only notice this now it's no longer a problem, but a workaround would probably be to move the import in to more local scope inside an annotation.

amanjpro pushed a commit that referenced this issue May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants