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

Disable all warnings on generated code. #120

Closed
lombokissues opened this issue Jul 14, 2015 · 5 comments
Closed

Disable all warnings on generated code. #120

lombokissues opened this issue Jul 14, 2015 · 5 comments

Comments

@lombokissues
Copy link

Migrated from Google Code (issue 47)

@lombokissues
Copy link
Author

👤 reinierz   🕗 Sep 15, 2009 at 07:16 UTC

Warnings like 'missing javadoc from public method' show up. We can't very well fix all of them, so
instead we should put in some effort to disable all warnings. Possibly by 'cheating' and sticking a
@ SuppressWarnings("all") on everything generated.

@lombokissues
Copy link
Author

👤 rgagnon934   🕗 Sep 16, 2009 at 13:43 UTC

This is a show stopper for us, since we do not tolerate warnings in our code and are
not willing to add a @ SuppressWarnings("all") to classes that are not entirely generated.

I tried modifying Lombok's source to add the @ SuppressWarnings("all") annotation to
injected methods. However, I am not familiar with eclipse compiler development, and
the internal classes, such as
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration are not documented. I
have no idea on how to create a proper
org.eclipse.jdt.internal.compiler.ast.Annotation, I could not find an example of the
construction of such an object.

Could you give me an idea where I could find the proper information to be able to
modify Lombok myself?

@lombokissues
Copy link
Author

👤 reinierz   🕗 Sep 17, 2009 at 00:20 UTC

Is there a way for @ SupressWarnings("all") itself to cause warnings? I know eclipse's "redundant
SuppressWarnings" warning never triggers on 'all', but is there some sort of system that warns on all uses of
SuppressWarnings? I'm guessing no.

We just fixed auto-format (which now works again in a test built on my machine, still need to polish this code a
bit before I push it upstream and cut a new version). Taking care of this one is next on our agenda, as it's indeed
a showstopper for some.

@lombokissues
Copy link
Author

👤 reinierz   🕗 Jul 17, 2010 at 23:27 UTC

Added this in commit a5e1995 - also for the $lock/$LOCK fields that are generated by @ Synchronized.

Note that there's a bug in eclipse helios where having any annotation on any class generates a phantom missing javadoc warning on the class, whether or not it has javadoc. Uninstalling lombok doesn't fix it, so it seems to be an eclipse problem.

Will be in release 0.9.3.

@lombokissues
Copy link
Author

End of migration

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

1 participant