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

Remove redundant 'default annotations' #6

Open stylismo opened 7 years ago

stylismo commented 7 years ago

When applying a default annotation to package scope should remove redundant default annotations in the same package.

For example a class annotated with @NonnullByDefault, or @ParamsAreNonnullByDefault in the same package where a @NonnullByDefault annotation gets applied to package-info.class.

Or a package-info.java which already has @ParamsAreNonnullByDefault but now gets @NonnullByDefault applied.

christophercolumbusdog commented 5 years ago

Same thought here. More specifically, if we have a package-info.java that is marked with @NonnullByDefault, it would be nice if there were then warnings for classes in that package that use @NotNull, as those annotations would be unnecessary.