-
Notifications
You must be signed in to change notification settings - Fork 30
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
remove prefer_void_to_null
from recommended
#154
Comments
For other readers, the docs for the lint are here: https://dart.dev/tools/linter-rules/prefer_void_to_null And in-lined from the dart-lang/linter discussion, from @srawlins:
Which sounds like the lint may be producing more false positives than we'd want. |
It is worth noting that in particular for return types,
This is actually a simplification of a real situation that came up recently 🤷 |
I am not familiar with all the details here, but I have no objection to removing this lint. While it hasn't caused any trouble in our code base, it also hasn't been all that useful. |
prefer_void_to_null
from recommendedprefer_void_to_null
from recommended
I agree with removing this. As discussed elsewhere, there are cases where you should prefer The problem that this lint solves is now small enough, and well known enough, that it can be handled in code-review instead. |
LGTM. I have slight reservations that the same patterns this lint was intended to avoid might start coming back, but I do think it's less useful with null safety, and I do think I recall some places where I wanted to violate this lint. |
This proposal is accepted. |
In dart-lang/sdk#59309, @eernstg proposes we eliminate
prefer_void_to_null
and I'm inclined to agree. Unless there are strong reservations here, I'd propose that as a change to make before publishing 3.0./cc @devoncarew @lrhn @natebosch @jakemac53 @goderbauer
The text was updated successfully, but these errors were encountered: