-
Notifications
You must be signed in to change notification settings - Fork 34
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
Doesn’t play well with -Ywarn-unused-import
.
#16
Comments
@sellout maybe this plugin can help? https://github.com/ghik/silencer (disclaimer: haven't used it myself) |
One solution would be to make the acyclic plugin remove that import when it sees it. If anyone wants to send a PR doing so, I'll gladly merge it |
Or you could use |
Yeah, our codebase is far from compliant. We’ll need to add the import one file at a time. |
If the import acyclic.file
object MyClass {
file.workaroundUnusedImportWarning |
Adding Silencer is fine for handling this, but I'm curious for why you didn't use annotations instead of an import? That feels like it would read better and be less surprising. EDIT: annotations were a stupid idea. I see now why you did it this way. You can't put annotations on a package. |
If anyone still needs this, you can silence (that is what the
|
We use
-Ywarn-unused-import
(and-Xfatal-warnings
), and geton any file I add it to.
I don’t know of any way to silence an unused import warning (e.g., using
@SuppressWarnings
), but I’d happily do that if possible.The text was updated successfully, but these errors were encountered: