Feature Request: Do not warn on assumeNonNull(nullUnmarkedThing)
E.g.:
warning: [NullAway] passing known @NonNull parameter 'tabGroupModelFilter' to CastToNonNullMethod (org.chromium.build.NullUtil.assumeNonNull) at position 0. This method argument should only take values that NullAway considers @Nullable at the invocation site, but which are known not to be null at runtime.
The warning is great for values that are known to be non-null, but for values from methods annotated with @NullUnmarked, it would make migrations easier if these warnings would not show (e.g. you could incrementally fix them, and then remove @NullUnmarked at the end).
This would take some work as we do not yet track an unknown nullness state. We may need to do so eventually for better JSpecify support. Possibly we could carve out something simpler to handle this case.
@agrieve @msridhar Hello! I'm interested in working on this issue. Would it be possible for me to take it on and start working on it? Additionally, if there are any guidelines or specific points I should keep in mind while addressing this issue, I'd appreciate it if you could share them.
Thanks for the offer @raccoonback!
Here is the code that emits this error:
https://github.com/uber/NullAway/blob/7b64688ae693825c350b31a20c9a3ba9bfdbdf89/nullaway/src/main/java/com/uber/nullaway/NullAway.java#L2059-L2078
The simplest change I can think of would be to check if the actual parameter actual is a call to an unmarked method, and if so, don't emit the error. Would this be helpful to you all @agrieve? It wouldn't handle the case where the result of the unmarked call is first stored in a local variable. That could also be handled but would require more work.
I think that would actually address the majority of our warnings of this type :)
@raccoonback are you able to take this one on?
@msridhar Sure, I will take this issue and work on it.