Skip to content
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

Add quick fix for unnecessary_getters_setters #45929

Closed
Tracked by #45932
bwilkerson opened this issue May 5, 2021 · 3 comments
Closed
Tracked by #45932

Add quick fix for unnecessary_getters_setters #45929

bwilkerson opened this issue May 5, 2021 · 3 comments
Assignees
Labels
analyzer-quick-fix area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on

Comments

@bwilkerson
Copy link
Member

The fix should rename the field and remove the getter and setter.

@bwilkerson bwilkerson added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-quick-fix labels May 5, 2021
@devoncarew devoncarew added the P2 A bug or feature request we're likely to work on label May 7, 2021
@bwilkerson
Copy link
Member Author

This rule generates a lint on both the getter and the setter. A single-use fix could be invoked on either and fix both, but when applied in bulk the two would conflict with each other.

One possibility would be to change the rule to only lint one or the other. Thoughts?

@pq

@pq
Copy link
Member

pq commented Jun 28, 2021

One possibility would be to change the rule to only lint one or the other.

This works for me and seems consistent with what we've done elsewhere.

@bwilkerson
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-quick-fix area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

3 participants