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

Published NonNull Present #948

Closed
xenoterracide opened this issue Apr 12, 2024 · 6 comments
Closed

Published NonNull Present #948

xenoterracide opened this issue Apr 12, 2024 · 6 comments

Comments

@xenoterracide
Copy link

So, this may be against the spirit of nullaway and jspecify... However, I think that for a long time it'd be good to annotate any published "interfaces" completley. Meaning that @nonnull should be present on something that is public/protected. Bonus points if it also checks to see if the package is exported if a module-info.java is present.

I'm going to speculate this will be closed ;)

@msridhar
Copy link
Collaborator

Not sure this is a NullAway issue really? Like are you asking for an error message if @NonNull is not present? If so then yes NullAway is not likely to report an error for that :-)

@xenoterracide
Copy link
Author

yeah, basically. Didn't hurt to ask?

@msridhar
Copy link
Collaborator

FWIW if I understand the ask correctly this may not be very hard to implement as a separate Error Prone check

@xenoterracide
Copy link
Author

yeah, probably not, I was thinking might be of your guys interest to implement. Could have 2 separate checks even... One that is "thorough" (public/protected must have something) and one that is just looking for NullMarked.

I could also ask EP itself.

@xenoterracide
Copy link
Author

let me know if you want me to re-open

@msridhar
Copy link
Collaborator

I think it's very unlikely we would be able to prioritize implementing this any time in the near future. So probably best to leave this closed for now. If you or one of your colleagues has the cycles, I don't think it would be too hard of an EP check to implement yourselves and try out, and I'd be happy to give feedback on it

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

2 participants