-
Notifications
You must be signed in to change notification settings - Fork 1.7k
proposal: deprecate (and remove?) lints for 3.0 #58947
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
Comments
|
Good catch @srawlins! We should also update the docs (and implementation) to reflect SDK API changes?
|
Thanks for the idea, @pq ! I audited the rule and found it could be dramatically simplified for null safety. dart-archive/linter#3918 |
Can we just delete these for 3.0? |
My understanding is that users would only see deprecation notices if they use one of the 3.0-dev releases. I don't know how common that will be, but that's the only reason I can think of to go through a deprecation period. |
I don't know why it would be meaningful to provide a deprecation period. The action-to-take is the same for a deprecated linter rule as a deleted one (remove the reference). And the consequence of using a deprecated linter rule is the same as the consequence of using a deleted one (a Hint in your analysis_options.yaml file). I think they can just be deleted. |
This is true for lints that don't have behavior (for example ones that are short-circuited in the presence of null-safety or language version like |
That's true. |
#58988 suggests we might consider deprecating /fyi @munificent |
Remaining work is picked up in dart-lang/core#789. Closing out. |
3.0 would be a good time to deprecate a host of lints that don't make sense in a null-safe world, are backed by stale advice or a have poor user experience (e.g., too many false positives).
always_require_non_null_named_parameters
[recommended]avoid_returning_null_for_future
avoid_returning_null
prefer_equal_for_default_values
[recommended] (analyzer now produces a diagnostic)Deprecate(DELAYED)iterable_contains_unrelated_type
andlist_remove_unrelated_type
#58958 [core]avoid_annotating_with_dynamic
deprecate:(DECISION: still valuable)null_closures
[recommended]We might also take this opportunity to deprecate lints that we no longer want to support.
The text was updated successfully, but these errors were encountered: