Skip to content

(Lint) Don't modify parameters#185557

Draft
justinmc wants to merge 8 commits into
flutter:masterfrom
justinmc:lint-parameter-assignments
Draft

(Lint) Don't modify parameters#185557
justinmc wants to merge 8 commits into
flutter:masterfrom
justinmc:lint-parameter-assignments

Conversation

@justinmc

@justinmc justinmc commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

The final keyword 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

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.
@justinmc justinmc self-assigned this Apr 24, 2026
@github-actions github-actions Bot added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. a: animation Animation APIs f: material design flutter/packages/flutter/material repository. a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) f: scrolling Viewports, list views, slivers, etc. f: cupertino flutter/packages/flutter/cupertino repository f: routes Navigator, Router, and related APIs. f: gestures flutter/packages/flutter/gestures repository. f: focus Focus traversal, gaining or losing focus labels Apr 24, 2026
guidezpl
guidezpl previously approved these changes Apr 27, 2026

@guidezpl guidezpl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre-emptive approval, this is great

Thanks to Gemini.
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 28, 2026
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Apr 28, 2026
@Piinks Piinks added the Decoupling: Not ready to port yet Instructions will be provided when this is ready to move to flutter/packages. label Jun 24, 2026
@Piinks

Piinks commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

I've marked this PR as not ready to port to flutter/packages yet.
We'll provide instructions to move this change over to material_ui/cupertino_ui once ready to receive PRs. Thank you!

The changes not in the material or cupertino libraries will remain here.

@Piinks Piinks added the Decoupling: Split PR The PR will need to be split to separate Material & Cupertino changes label Jun 24, 2026
@Piinks

Piinks commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

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).

  • If that is the case here, consider opening a new PR with the non-material/cupertino changes to move forward with so that waiting period can be reduced. Up to you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: animation Animation APIs a: text input Entering text in a text field or keyboard related problems CICD Run CI/CD Decoupling: Not ready to port yet Instructions will be provided when this is ready to move to flutter/packages. Decoupling: Split PR The PR will need to be split to separate Material & Cupertino changes f: cupertino flutter/packages/flutter/cupertino repository f: focus Focus traversal, gaining or losing focus f: gestures flutter/packages/flutter/gestures repository. f: material design flutter/packages/flutter/material repository. f: routes Navigator, Router, and related APIs. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants