Skip to content

new lint to prefer Center (over Align) #58193

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

Open
pq opened this issue Jun 18, 2020 · 2 comments
Open

new lint to prefer Center (over Align) #58193

pq opened this issue Jun 18, 2020 · 2 comments
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. customer-flutter devexp-linter Issues with the analyzer's support for the linter package linter-lint-request P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@pq
Copy link
Member

pq commented Jun 18, 2020

From flutter/devtools#2097 (comment),

Lint if Align is used in a case where Center would have the same effect and quick fix to using Center.

@pq
Copy link
Member Author

pq commented Jun 18, 2020

@jacob314: can you elaborate on conditions that would trigger this lint? Is it sufficient to check if the alignment property is unset?

@jacob314
Copy link
Member

That is sufficient. The great lint you have already added for parameters at their default value should catch the case where the alignment property was set to https://api.flutter.dev/flutter/painting/Alignment/center-constant.html.

@devoncarew devoncarew added devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. labels Nov 18, 2024
@devoncarew devoncarew transferred this issue from dart-archive/linter Nov 18, 2024
@pq pq added the P3 A lower priority bug or feature request label Nov 20, 2024
@bwilkerson bwilkerson added area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. and removed legacy-area-analyzer Use area-devexp instead. labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. customer-flutter devexp-linter Issues with the analyzer's support for the linter package linter-lint-request P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants