Fixed
Status Update
Comments
tn...@google.com <tn...@google.com>
tn...@google.com <tn...@google.com> #2
Some things to work out before making the annotations type-use:
- Determine guidelines for type nullability in public API
- Determine rules for when type nullability can change in public API
- Confirm that intellij nullability lint works as expected for type-use nullability annotations
- Test what the impact would be on existing arrays (due to ambiguities of type-use annotations on arrays)
- Confirm usage of type-use
androidx.annotation.NonNull/Nullable
in metalava won't break anything for platform
Description
I ran lint on a test project and got some API errors. It turns out that the code is properly checking for the SDK_INT level, but it stores this in an intermediate local variable.
Lint looks for SDK_INTs stored in fields and checked by utility methods, but not intermediate local variables.
Example: the "dynamicColor" variable inhttps://github.com/code-with-the-italians/bundel/blob/main/app/src/main/java/dev/sebastiano/bundel/ui/Theme.kt#L23