Allow respecting SuppressWarning when checking for def - #2
Conversation
| @@ -156,9 +159,9 @@ class EnterpriseGroovyASTTransformation extends AbstractASTTransformation { | |||
| * | |||
| * @param parameters an array of parameters to check, for dynamic typing. | |||
There was a problem hiding this comment.
I'm not sure this method needs to be changed in this way, but if it does the documentation needs to be updated to refect that.
There was a problem hiding this comment.
Well the point is to have the methodNode at hand to be able to check whether there is a@SuppressWarnings annotation on it. The check could also be done before calling the method, but then you could get inconsistent behaviour if the caller doesn't perform the check.
I'll do the docs, but I haven't been able to figure out how to update a PR between forks with new commits except by closing the PR and creating a new one. Do you know how?
| } | ||
|
|
||
| @Memoized | ||
| private static boolean isDefRequiredSurpressed(AnnotatedNode node) { |
There was a problem hiding this comment.
All the methods you added should have java doc comments, documenting the inputs and outputs.
|
I simplified the code a bit and added the missing javadocs. |
|
Issue: virtualdogbert/enterprise-groovy-plugin#15 |
A suggestion to provide for selectively allowing usage of def where it is unavoidable, without having to disable the def checking entirely.
It could also be expanded to only apply in compiledynamic blocks of code.