FWIW, it isn't clear to me that the rule has any value in a null safe world. If the return type is non-nullable, then returning null is a compiler error and a lint is useless. If the return type is nullable, then I'm proposing that we not produce a lint. Hence, I think the right course of action is to deprecate the lint and disable it in null safe code.
Agreed.
False positive

It states: "Avoid returning null from members whose return type is bool, double, int, or num"
but return type is not int but int?
consider improving this linter rule to distinct nullable types
Most helpful comment
FWIW, it isn't clear to me that the rule has any value in a null safe world. If the return type is non-nullable, then returning null is a compiler error and a lint is useless. If the return type is nullable, then I'm proposing that we not produce a lint. Hence, I think the right course of action is to deprecate the lint and disable it in null safe code.