stylismo / nullability-annotations-inspection

IntelliJ IDEA nullability annotations inspection
https://plugins.jetbrains.com/idea/plugin/9418-nullability-annotations-inspection
MIT License
18 stars 5 forks source link

Feature request: Groovy support #10

Open aristotll opened 6 years ago

aristotll commented 6 years ago

Is it possible to add Groovy support? Like Java, Groovy also need the annotations to make it null safe.

stylismo commented 6 years ago

Hi,

Sorry for the late response, I missed this somehow.

I don't use Groovy myself so not sure how this would work, but please feel free to make a PR and I'm happy to pull it in.

aristotll commented 6 years ago

@stylismo Actually, I have done the groovy part myself,and use it daily. But I changed some of your origin code to reduce the duplication (like visibilities of some class,methods,etc.) and I wonder if it is a good way to do, and make a PR( or maybe there is a better choice).

Also the bad part is intellij Groovy plugin do not check the null problems like the Java counterpart do. So even if you annotate the method NotNull, still in groovy file when you check the result == nulland intellij won't warn about it ( Only Java will warn about it, so when you call this method from Java side and check the nullability you will get the warning and quick fix).