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

Don't report annotation methods #13

Open MHajoha opened 4 years ago

MHajoha commented 4 years ago

First of all, thanks so much for making this. It's made my life a lot easier.

Currently, methods in annotations are also inspected and reported if not annotated. Since annotation attributes are inherently non-null, this isn't really necessary and an option to ignore them would be nice.

Example:

public @interface MyAnnotation {
    String value(); // <- reported as missing nullability annotations
}
stylismo commented 4 years ago

Hi, happy to hear the plugin is useful to others ;-)

The point you are raising makes complete sense, but to manage expectations: I'm not sure when I'll be able to pick this up. Not saying that I won't though.

Perhaps you could give it a try yourself and create a PR? I'll happily merge it.

MHajoha commented 4 years ago

Perhaps you could give it a try yourself and create a PR? I'll happily merge it.

Sure! Should be easy enough at first glance. Although I would also like to take the opportunity to update the gradle wrapper as well as the intellij plugin. From what I can make out, this would mean authenticating to the plugin repository with a token generated at https://hub.jetbrains.com, instead of with username & password.

Would that be okay with you?