NullAway
NullAway copied to clipboard
Suggestion: Accept a `Nullable` annotation name and suggest it in cases where it's missing
Error-prone itself has some checks for this, but nullaway is obviously better at it.
Given an error like this
/Users/zsweers/dev/slack/restructure/slack-android-ng/libraries/foundation/slack-commons/src/main/java/slack/commons/logger/DebugLogger.java:62: error: [NullAway] parameter tag is @NonNull, but parameter in superclass method slack.commons.logger.Logger.log(java.lang.String,java.lang.String,java.lang.Throwable) is @Nullable
public void log(final String tag, final String message, final Throwable throwable) {
^
(see http://t.uber.com/nullaway )
I'd like to be able to define my desired @Nullable annotation as an option and have nullaway suggest adding the annotation.
We are actively working on this, actually! 😉
Just to set expectations, though: the general version of "take an annotated codebase and add annotations in all the right places" is a hard research problem. Also, by "we", I mean @nimakarimipour is working on this for Ph.D. under @msridhar's direction.
So, @nimakarimipour, assigning this one to you.