(Lint) Don't modify parameters#185557
Conversation
Looks like 213 failures in the framework and 400+ in the whole flutter/flutter. Really I should turn this on everywhere but I'll start with the framework.
guidezpl
left a comment
There was a problem hiding this comment.
pre-emptive approval, this is great
Thanks to Gemini.
|
I've marked this PR as not ready to port to flutter/packages yet. The changes not in the material or cupertino libraries will remain here. |
|
Advice for PR splitting: Since this touches material/cupertino along with other parts of flutter/flutter, it will need to be split up. If the material/cupertino changes are dependent on the other non-material/cupertino changes in this PR, then the material/cupertino changes will need to wait for them to roll to stable before they can be ported over to material_ui/cupertino_ui in flutter/packages (which uses the stable branch).
|
The
finalkeyword in parameter lists is being removed from Dart! This PR turns on the parameter_assignments lint to enforce via lint that parameters are not modified in the function body. Currently we do this all over the place, so it's a ton of little migrations.This is just a bit of fantasy cleanup of mine. If people disagree with the premise of the lint here, or if the PR is too overwhelming to land, we should probably forget about it.
#185704