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

sort_constructors_first rule: accessors proposal #57651

Open
aemino opened this issue Oct 30, 2017 · 4 comments
Open

sort_constructors_first rule: accessors proposal #57651

aemino opened this issue Oct 30, 2017 · 4 comments
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@aemino
Copy link

aemino commented Oct 30, 2017

After enabling the sort_constructors_first rule, I noticed that accessors are considered by the rule to be methods rather than properties. I'd like to start a quick discussion about whether this should be the case. In my code, I usually sort these first because to me, they more or less appeal as properties. However, I can completely understand the other side of this argument. Wondering what other people think about this.

@a14n
Copy link
Contributor

a14n commented Oct 30, 2017

Flutter style guide prefers grouping by function not by type.

@aemino
Copy link
Author

aemino commented Oct 30, 2017

Perhaps I'm not reading it properly, but what you linked seems to be about the ordering of methods and fields; I don't see the relation to the constructor.

@a14n
Copy link
Contributor

a14n commented Oct 31, 2017

I have misunderstood your request because I thought sort_constructors_first came from Flutter style guide's rule Order class members by typical lifecycle (I dunno if this comment should be seen as a side note or as an issue).

@pq : was sort_constructors_first implemented to enforce Flutter style guide rule Order class members by typical lifecycle ?

@pq
Copy link
Member

pq commented Oct 31, 2017

@a14n : 👍 it was for Flutter style.

@pq pq added the type-enhancement A request for a change that isn't a bug label Jun 29, 2018
@srawlins srawlins added the P3 A lower priority bug or feature request label Sep 22, 2022
@devoncarew devoncarew added analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Nov 18, 2024
@devoncarew devoncarew transferred this issue from dart-lang/linter Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. 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

5 participants